Page 169 - Discrete Mathematics and Its Applications
P. 169
148 2 / Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
The Graphs of Functions
We can associate a set of pairs in A × B to each function from A to B. This set of pairs is called
the graph of the function and is often displayed pictorially to aid in understanding the behavior
of the function.
DEFINITION 11 Let f be a function from the set A to the set B. The graph of the function f is the set of
ordered pairs {(a, b) | a ∈ A and f(a) = b}.
From the definition, the graph of a function f from A to B is the subset of A × B containing the
ordered pairs with the second entry equal to the element of B assigned by f to the first entry.
Also, note that the graph of a function f from A to B is the same as the relation from A to B
determined by the function f , as described on page 139.
EXAMPLE 24 Display the graph of the function f (n) = 2n + 1 from the set of integers to the set of integers.
Solution: The graph of f is the set of ordered pairs of the form (n, 2n + 1), where n is an integer.
This graph is displayed in Figure 8. ▲
2
EXAMPLE 25 Display the graph of the function f(x) = x from the set of integers to the set of integers.
2
Solution: The graph of f is the set of ordered pairs of the form (x, f (x)) = (x, x ), where x is
an integer. This graph is displayed in Figure 9. ▲
Some Important Functions
Next,weintroducetwoimportantfunctionsindiscretemathematics,namely,thefloorandceiling
functions. Let x be a real number. The floor function rounds x down to the closest integer less
than or equal to x, and the ceiling function rounds x up to the closest integer greater than or
equal to x. These functions are often used when objects are counted. They play an important
role in the analysis of the number of steps used by procedures to solve problems of a particular
size.
(–3,9) (3,9)
(–2,4) (2,4)
(–1,1) (1,1)
(0,0)
FIGURE 8 The Graph of FIGURE 9 The Graph of
2
f (n) = 2n + 1 from Z to Z. f(x) = x from Z to Z.