Page 168 - Discrete Mathematics and Its Applications
P. 168

2.3 Functions  147


                                                                                    ( f       g)(a)

                                                                        g(a)                      f(g(a))


                                                            a                        g(a)                      f(g(a))
                                                                         g                          f


                                                            A                         B                         C



                                                                                     f   g
                                                     FIGURE 7 The Composition of the Functions f and g.

                                     EXAMPLE 22      Let g be the function from the set {a, b, c} to itself such that g(a) = b, g(b) = c, and g(c) = a.
                                                     Let f be the function from the set {a, b, c} to the set {1, 2, 3} such that f(a) = 3, f(b) = 2, and
                                                     f(c) = 1. What is the composition of f and g, and what is the composition of g and f ?

                                                     Solution: The composition f ◦ g is defined by (f ◦ g)(a) = f(g(a)) = f(b) = 2,
                                                     (f ◦ g) (b) = f(g(b)) = f(c) = 1, and (f ◦ g)(c) = f(g(c)) = f(a) = 3.
                                                        Note that g ◦ f is not defined, because the range of f is not a subset of the domain of g. ▲


                                     EXAMPLE 23      Let f and g be the functions from the set of integers to the set of integers defined by
                                                     f(x) = 2x + 3 and g(x) = 3x + 2. What is the composition of f and g? What is the com-
                                                     position of g and f ?

                                                     Solution: Both the compositions f ◦ g and g ◦ f are defined. Moreover,

                                                        (f ◦ g)(x) = f(g(x)) = f(3x + 2) = 2(3x + 2) + 3 = 6x + 7

                                                     and
                                                        (g ◦ f )(x) = g(f (x)) = g(2x + 3) = 3(2x + 3) + 2 = 6x + 11.               ▲


                                                     Remark: Note that even though f ◦ g and g ◦ f are defined for the functions f and g in
                                                     Example 23, f ◦ g and g ◦ f are not equal. In other words, the commutative law does not hold
                                                     for the composition of functions.

                                                        When the composition of a function and its inverse is formed, in either order, an identity
                                                     function is obtained. To see this, suppose that f is a one-to-one correspondence from the set A
                                                     to the set B. Then the inverse function f  −1  exists and is a one-to-one correspondence from B
                                                     to A. The inverse function reverses the correspondence of the original function, so f  −1 (b) = a
                                                     when f(a) = b, and f(a) = b when f  −1 (b) = a. Hence,

                                                        (f  −1  ◦ f )(a) = f −1 (f (a)) = f  −1 (b) = a,

                                                     and

                                                        (f ◦ f −1 )(b) = f(f  −1 (b)) = f(a) = b.
                                                     Consequently f  −1  ◦ f = ι A and f ◦ f  −1  = ι B , where ι A and ι B are the identity functions on
                                                     the sets A and B, respectively. That is, (f  −1 −1  = f .
                                                                                          )
   163   164   165   166   167   168   169   170   171   172   173