Page 167 - Discrete Mathematics and Its Applications
P. 167
146 2 / Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
EXAMPLE 18 Let f be the function from {a, b, c} to {1, 2, 3} such that f(a) = 2, f(b) = 3, and f(c) = 1.
Is f invertible, and if it is, what is its inverse?
Solution: The function f is invertible because it is a one-to-one correspondence. The in-
verse function f −1 reverses the correspondence given by f ,so f −1 (1) = c, f −1 (2) = a, and
f −1 (3) = b. ▲
EXAMPLE 19 Let f : Z → Z be such that f(x) = x + 1. Is f invertible, and if it is, what is its inverse?
Solution: The function f has an inverse because it is a one-to-one correspondence, as follows
from Examples 10 and 14. To reverse the correspondence, suppose that y is the image of x,so
that y = x + 1. Then x = y − 1. This means that y − 1 is the unique element of Z that is sent
to y by f . Consequently, f −1 (y) = y − 1. ▲
2
EXAMPLE 20 Let f be the function from R to R with f(x) = x .Is f invertible?
Solution: Because f(−2) = f(2) = 4, f is not one-to-one. If an inverse function were defined,
it would have to assign two elements to 4. Hence, f is not invertible. (Note we can also show
that f is not invertible because it is not onto.) ▲
Sometimes we can restrict the domain or the codomain of a function, or both, to obtain an
invertible function, as Example 21 illustrates.
2
EXAMPLE 21 Show that if we restrict the function f(x) = x in Example 20 to a function from the set of all
nonnegative real numbers to the set of all nonnegative real numbers, then f is invertible.
2
Solution: The function f(x) = x from the set of nonnegative real numbers to the set of non-
2
2
negative real numbers is one-to-one. To see this, note that if f(x) = f(y), then x = y ,so
2
2
x − y = (x + y)(x − y) = 0. This means that x + y = 0or x − y = 0, so x =−y or x = y.
Because both x and y are nonnegative, we must have x = y. So, this function is one-to-one.
2
Furthermore, f(x) = x is onto when the codomain is the set of all nonnegative real numbers,
because each nonnegative real number has a square root. That is, if y is a nonnegative real
√ 2
number, there exists a nonnegative real number x such that x = y, which means that x = y.
2
Because the function f(x) = x from the set of nonnegative real numbers to the set of non-
negative real numbers is one-to-one and onto, it is invertible. Its inverse is given by the rule
√
f −1 (y) = y. ▲
DEFINITION 10 Let g be a function from the set A to the set B and let f be a function from the set B to the
set C. The composition of the functions f and g, denoted for all a ∈ A by f ◦ g, is defined
by
(f ◦ g)(a) = f (g(a)).
In other words, f ◦ g is the function that assigns to the element a of A the element assigned
by f to g(a). That is, to find (f ◦ g)(a) we first apply the function g to a to obtain g(a) and
then we apply the function f to the result g(a) to obtain (f ◦ g)(a) = f(g(a)). Note that the
composition f ◦ g cannot be defined unless the range of g is a subset of the domain of f .In
Figure 7 the composition of functions is shown.