We demonstrated that if a relation is one-to-one and onto then its inverse is a function. Therefore, since every function is a relation, we have also demonstrated that if a function is one-to-one and onto then its inverse is a function. How do we show that its inverse is also one-toone and onto? Let r be a one-to-one and onto function. Let s be r’s inverse, a function Let x be any element in r’s domain Let y = r(x) Then, since, s is r’s inverse, s(y) = x Therefore, s is onto Now we show that s is one-to-one Suppose s(y1) = s(y2) = t Then, since r is s’s inverse, r(t) = y1 and r(t) = y2. But r is a function. Therefore, y1 = y2 and therefore s is also one-to-one Composition of functions The composition of two functions associates the domain of the first function with the range of the second function. What does that mean? It means that the range of the first function is a subset of the domain of the second function. f◦ g is the composition of f with g. The range of g is a subset of the domain of f. It must be so. If there were elements in the range of g that were not elements of the domain of f then we could not define the composition. We will build some composite functions A = {1,2,3} B = {4,5,6} C = {7,8,9} but first we will define some relations and pay special attention to their domains and ranges. Define a relation such that its domain is a subset of its range Define a relation such that its range is a subset of its domain Define a function such that its domain is a subset of its range Define a function such that its range is a subset of its domain What is the composition of f and f-1? f = {(1,5), (2,6), (3,4)} f-1 = {(5,1), (6,2), (4,3)} f f-1 = ? f-1f = ? Define f:A->B Define g:B->C Define f g:C->A Define g f:A->C A x B = {(1,4), (1,5), (1,6), (2,4), (2,5), (2,6), (3,4), (3,5), (3,6)} B x C = {(4,7), (4,8), (4,9), (5,7), (5,8), (5,9), (6,7), (6,8), (6,9)} A x C = {(1,7), (1,8), (1,9), (2,7), (2,8), (2,9), (3,7), (3,8), (3,9)} C x A = {(7,1), (7,2), (7,3), (8,1), (8,2), (8,3), (9,1), (9,2), (9,3)} f g f g = = {(1,4), (2,5), (3,6)} Is f one to one? Is f onto? {(4,7), (5,8), (6,9)} = Is g one to one? Is g onto? g = ? f = ? A composition rule Consider the composition f g. The composition exists if and only if the range of g is a subset of the domain of f. Why? By the composition rule, f g is impossible! g f = {(1,7), (2,8), (3,9)} Is g f a subset of A x C? Let A = (0,1,2) Let B = (3,4,5,6) Let C = (7,8,9} Can Can Can Can we we we we define define define define a one-to-one function an onto function from a one-to-one function an onto function from from A to from B to A to B? B? B to C? C? Traditional Composition Let f:Z ->Z:f(x) = x + 1 Let g:Z ->Z:g(x) = 3x f g(x) = f(3x) = 3x + 1 Why? g f(x) = g(x + 1) = 3(x + 1) 3x + 3 f f(x) = f(x + 1) = (x + 1) + 1 = x + 2 f3(x) = fff(x) = ff(x + 1) = f(x + 2) = x + 3 g2(x) = gg(x) = g(3x) = 9x g3(x) = ggg(x) = gg(3x) = g(9x) = 27x What is fn(x)? What is gn(x)?