COMPOSITION OF FUNCTIONS INTERMEDIATE GROUP - MAY 21, 2017 Finishing Up Last Week Problem 1. (Challenge) Consider the set Z 5 = {congruence classes of integers mod 5} (1) List the elements of Z 5. (2) Consider the function f : Z 5! Z 5, given by f(x) 3x (mod 5). Fill out the table representing the function below. x f(x) 0 1 2 3 4 (3) Explain why f(x) is a bijection. Copyright c 2014-2017 Ivy Wang/Los Angeles Math Circle/UCLA Department of Mathematics. 1
LAMC handout 2 (4) Find the table of values for f 1 (x). Can you express f 1 (x)in the form f 1 (x) = kx for some k 2 Z 5? x f 1 (x) 0 1 2 3 4 (5) Finding the inverse function using multiplicative inverses: (a) Find the multiplicative inverse of 3 in mod 5. That is, find a number n 2 Z 5 such that 3 n n 3 1 (mod 5). (b) Therefore, in Z 5, 3 1 = (c) Use this to find the inverse of the function y =3x in Z 5. Does this agree with the answer you go before by reversing the table? 2
LAMC handout 3 (6) Find the inverse of g : Z 5! Z 5 where g(x) 2x 1 (mod 5). (7) Prove that any function h : Z 5! Z 5 of the form h(x) ax + b (mod 5) where a 6 0 has an inverse. Hint: Start by showing that for every a 2 Z 5 where a 6 0, there is an a 1 such that a 1 a a a 1 1 (mod 5). 3
LAMC handout 4 (8) Suppose we re given a number n 2 N. Are functions of the form h : Z n! Z n given by h(x) ax + b (mod n) where a 6 0 guaranteed to have an inverse? Give a proof of your answer. 4
LAMC handout 5 Composition of Functions A composition of two functions f g is a function where the output of the inner function, g, is the input of the outer function, f. For the composition to work, the range of the function g must be a subset of the domain of the function f. In other words, (f g)(x) =f(g(x)). Example 1. Let S be a function that takes positive integers as inputs and produces the sums of their digits as outputs. For example, S(2017) = 2 + 0 + 1 + 7 = 10. Let P be be a function that takes integers as inputs and outputs whether they are even or odd. For example, P (10) = even. Then (P S)(2017) = P (S(2017)) = P (10) = even. Problem 2. For the functions S and P from the example above, find (P S)(1994). Example 2. Let f(x) =x 2 and g(x) =3x +5. To obtain the formula of the function (f g)(x), we must feed the formula for g(x) into the formula for f(x). Since the function f squares its input, then it must also square its input of g(x) =3x +5. This gives (f g)(x) =f(g(x)) = (3x +5) 2 Problem 3. For the functions f and g from the example above, find the function g f. 5
LAMC handout 6 Problem 4. In the function f domain of f. g, explain why the range of g must be a subset of the Problem 5. Let f(x) = 1 and h(x) =2x x as much as possible. (1) (f h)(x) 1. Find the following. Simplify your answers (2) (h f)(x) 6
LAMC handout 7 (3) (f f)(x) (4) (h h)(x) (5) Is the operation of composing functions commutative? That is, does (f h)(x) = (h f)(x)? Problem 6. Consider the function f : X! Y and its inverse f 1 : Y! X. (1) What is the domain and range of f 1 f? (2) Suppose we re given an element x 2 X. What is (f 1 f)(x)? 7
LAMC handout 8 Problem 7. Prove that if f and g are one-to-one, then f g must also be one-to-one. Problem 8. Prove that if f and g are onto, then f g must also be onto. 8
LAMC handout 9 Problem 9. Prove that if f and g are bijections, then f g must also be a bijection. Let f(x) =x 2 and g(x) =x +1. (1) Finding g 1 f 1 : (a) Find f 1 (x). (b) Find g 1 (x). (c) Find g 1 f 1. (2) Finding (f g) 1 : (a) Find f g. 9
LAMC handout 10 (b) Find (f g) 1. (3) Does (f g) 1 =(g 1 f 1 )? Can you explain why this is true for any invertible functions f and g? 10
LAMC handout 11 Composition of More Than Two Functions Example 3. Suppose we re given the functions f(x) =x 2, g(x) =3x +5and h(x) = 2x 1. These three functions can be composed as the function (f g) h, where the order of composing these functions is given by the parenthesis. To find the formula for (f g) h, we must first find the function f g. As shown in the previous example, this gives (f g)(x) =(3x +5) 2. To compute (f g) h, we must feed the formula of h(x) =2x 1 to the formula we obtained for f g. This gives (f g) h =(3(2x 1) + 5) 2 =(6x +2) 2. Problem 10. For the same functions as described above, find the composition f (g h) : (1) Find the formula for (g h)(x) =g(h(x)) by feeding the formula of h(x) into g. (2) Find the formula for (f (g h))(x) by feeding the formula you obtained for (g h)(x) into f. (3) Does the formula you obtained for f (g h) equal the formula for (f g) h obtained in the example? 11
LAMC handout 12 Problem 11. Let p(z) =z 3 3z, q(z) =z 10, r(z) =2/z. Check whether (p q) r = p (q r). 12
LAMC handout 13 Problem 12. Choose three functions f, g, and h such that the range of h is a subset of the domain of g and the range of g is a subset of the domain of f. The functions can be given by formulas, graphs, or tables. Check whether f (g h) =(f g) h. 13
LAMC handout 14 Problem 13. The answer to the last three questions suggests that the operation of composing functions is associative. That is, f (g h) =(f g) h for any three functions f, g, and h such that the range of h is a subset of the domain of g and the range of g is a subset of the domain of f. We will prove that this is true. Suppose that we are given an x in the range of h. We must show that (f (g h))(x) = ((f g) h)(x). Let h(x) =y, g(y) =z and f(z) =p. (1) To find (f (g h))(x) : (a) First find (g h)(x) : (g h)(x) =g(h(x)) = g( ) = (b) Using your answer from (a), find (f (g h))(x) : (2) To find ((f g) h)(x) : (f (g h))(x) =f((g h)(x)) = f( ) = ((f g) h)(x) =(f g)(h(x)) =(f g)( ) = f(g( )) = f( ) = Since the two values are equal, the operation of composing functions is associative. 14