Why this matters#
Do one function, then another, and you get a composite function. Undo a function and you get its inverse, but only bijections can be undone. Here we practise putting functions together, finding inverses, and then finish the chapter with a mixed set of questions.
Composition#
For f : A → B f : A \to B f : A → B and g : B → C g : B \to C g : B → C , the composite g ∘ f : A → C g \circ f : A \to C g ∘ f : A → C is ( g ∘ f ) ( x ) = g ( f ( x ) ) (g \circ f)(x) = g(f(x)) ( g ∘ f ) ( x ) = g ( f ( x )) . Read it from the inside out: apply f f f first.
Example 1. f ( x ) = 2 x + 1 f(x) = 2x + 1 f ( x ) = 2 x + 1 , g ( x ) = x 2 g(x) = x^2 g ( x ) = x 2 : ( g ∘ f ) ( x ) = ( 2 x + 1 ) 2 (g \circ f)(x) = (2x + 1)^2 ( g ∘ f ) ( x ) = ( 2 x + 1 ) 2 and ( f ∘ g ) ( x ) = 2 x 2 + 1 (f \circ g)(x) = 2x^2 + 1 ( f ∘ g ) ( x ) = 2 x 2 + 1 . The two orders give different answers, so composition is not commutative.
Example 2. f ( x ) = ∣ x ∣ f(x) = \lvert x \rvert f ( x ) = ∣ x ∣ , g ( x ) = ∣ 3 x − 2 ∣ g(x) = \lvert 3x - 2 \rvert g ( x ) = ∣ 3 x − 2 ∣ : ( g ∘ f ) ( x ) = ∣ 3 ∣ x ∣ − 2 ∣ (g \circ f)(x) = \lvert 3\lvert x \rvert - 2 \rvert ( g ∘ f ) ( x ) = ∣ 3 ∣ x ∣ − 2 ∣ ; ( f ∘ g ) ( x ) = ∣ 3 x − 2 ∣ (f \circ g)(x) = \lvert 3x - 2 \rvert ( f ∘ g ) ( x ) = ∣ 3 x − 2 ∣ .
Composition is, however, associative: h ∘ ( g ∘ f ) = ( h ∘ g ) ∘ f h \circ (g \circ f) = (h \circ g) \circ f h ∘ ( g ∘ f ) = ( h ∘ g ) ∘ f . And if f f f and g g g are both one-one (or both onto), then g ∘ f g \circ f g ∘ f is too.
Inverse functions#
f : X → Y f : X \to Y f : X → Y is invertible if there is g : Y → X g : Y \to X g : Y → X with g ∘ f = I X g \circ f = I_X g ∘ f = I X and f ∘ g = I Y f \circ g = I_Y f ∘ g = I Y ; then we write g = f − 1 g = f^{-1} g = f − 1 . Keep this fact in mind: a function is invertible exactly when it is a bijection.
Finding the inverse. Write y = f ( x ) y = f(x) y = f ( x ) and solve for x x x in terms of y y y . Then check that your formula really lands inside the domain.
Example 3. f : R → R f : \mathbf{R} \to \mathbf{R} f : R → R , f ( x ) = 4 x − 7 f(x) = 4x - 7 f ( x ) = 4 x − 7 . Solving gives x = y + 7 4 \displaystyle x = \tfrac{y + 7}{4} x = 4 y + 7 , so f − 1 ( y ) = y + 7 4 \displaystyle f^{-1}(y) = \tfrac{y + 7}{4} f − 1 ( y ) = 4 y + 7 .
Example 4. f : [ 0 , ∞ ) → [ 5 , ∞ ) f : [0, \infty) \to [5, \infty) f : [ 0 , ∞ ) → [ 5 , ∞ ) , f ( x ) = x 2 + 5 f(x) = x^2 + 5 f ( x ) = x 2 + 5 . On these particular sets it is bijective, and f − 1 ( y ) = y − 5 f^{-1}(y) = \sqrt{y - 5} f − 1 ( y ) = y − 5 .
A function and its inverse are reflections of each other in the line y = x.
Example 5. f : R − { − 1 3 } → R − { 2 3 } \displaystyle f : \mathbf{R} - \{-\tfrac{1}{3}\} \to \mathbf{R} - \{\tfrac{2}{3}\} f : R − { − 3 1 } → R − { 3 2 } , f ( x ) = 2 x − 1 3 x + 1 \displaystyle f(x) = \tfrac{2x - 1}{3x + 1} f ( x ) = 3 x + 1 2 x − 1 . Here y ( 3 x + 1 ) = 2 x − 1 y(3x + 1) = 2x - 1 y ( 3 x + 1 ) = 2 x − 1 gives x = 1 + y 2 − 3 y \displaystyle x = \tfrac{1 + y}{2 - 3y} x = 2 − 3 y 1 + y .
Example 6. If f f f and g g g are invertible, ( g ∘ f ) − 1 = f − 1 ∘ g − 1 (g \circ f)^{-1} = f^{-1} \circ g^{-1} ( g ∘ f ) − 1 = f − 1 ∘ g − 1 . It is like taking off socks and shoes: you undo the last step first.
Mixed practice for the chapter#
f = { ( 1 , 3 ) , ( 2 , 5 ) , ( 3 , 1 ) } f = \{(1, 3), (2, 5), (3, 1)\} f = {( 1 , 3 ) , ( 2 , 5 ) , ( 3 , 1 )} and g = { ( 1 , 2 ) , ( 3 , 4 ) , ( 5 , 6 ) } g = \{(1, 2), (3, 4), (5, 6)\} g = {( 1 , 2 ) , ( 3 , 4 ) , ( 5 , 6 )} . Find g ∘ f g \circ f g ∘ f .
f ( x ) = x + 3 f(x) = x + 3 f ( x ) = x + 3 , g ( x ) = x 2 − 2 g(x) = x^2 - 2 g ( x ) = x 2 − 2 . Find f ∘ g f \circ g f ∘ g , g ∘ f g \circ f g ∘ f , f ∘ f f \circ f f ∘ f .
f ( x ) = 3 x + 2 5 x − 3 \displaystyle f(x) = \tfrac{3x + 2}{5x - 3} f ( x ) = 5 x − 3 3 x + 2 , x ≠ 3 5 \displaystyle x \ne \tfrac{3}{5} x = 5 3 . Show that f ∘ f ( x ) = x f \circ f(x) = x f ∘ f ( x ) = x . What does that tell you about f − 1 f^{-1} f − 1 ?
Find the inverse of each: f ( x ) = 6 − 5 x f(x) = 6 - 5x f ( x ) = 6 − 5 x ; f ( x ) = x − 1 3 f(x) = \sqrt[3]{x - 1} f ( x ) = 3 x − 1 ; f ( x ) = x x + 2 \displaystyle f(x) = \tfrac{x}{x + 2} f ( x ) = x + 2 x on R − { − 2 } \mathbf{R} - \{-2\} R − { − 2 } .
Is f : { 1 , 2 , 3 } → { a , b , c } f : \{1, 2, 3\} \to \{a, b, c\} f : { 1 , 2 , 3 } → { a , b , c } , f = { ( 1 , b ) , ( 2 , a ) , ( 3 , b ) } f = \{(1, b), (2, a), (3, b)\} f = {( 1 , b ) , ( 2 , a ) , ( 3 , b )} invertible? Give a reason.
Show that f : N → N f : \mathbf{N} \to \mathbf{N} f : N → N , f ( n ) = n + 1 f(n) = n + 1 f ( n ) = n + 1 for odd n n n and n − 1 n - 1 n − 1 for even n n n , is a bijection and is its own inverse.
On Z \mathbf{Z} Z , a R b ⟺ a + b a \, R \, b \iff a + b a R b ⟺ a + b is even. Is R R R an equivalence relation? If so, what are its classes?
On A = N × N A = \mathbf{N} \times \mathbf{N} A = N × N , ( a , b ) R ( c , d ) ⟺ a + d = b + c (a, b) \, R \, (c, d) \iff a + d = b + c ( a , b ) R ( c , d ) ⟺ a + d = b + c . Show R R R is an equivalence relation.
Is R = { ( a , b ) : b = a + 1 } R = \{(a, b) : b = a + 1\} R = {( a , b ) : b = a + 1 } on { 1 , 2 , 3 , 4 } \{1, 2, 3, 4\} { 1 , 2 , 3 , 4 } reflexive? Symmetric? Transitive?
Let f ( x ) = 3 x + 2 f(x) = 3x + 2 f ( x ) = 3 x + 2 and g ( x ) = x − 2 3 \displaystyle g(x) = \tfrac{x - 2}{3} g ( x ) = 3 x − 2 . Verify g = f − 1 g = f^{-1} g = f − 1 by working out both composites.
Answers#
Show answers
{ ( 1 , 4 ) , ( 2 , 6 ) , ( 3 , 2 ) } \{(1, 4), (2, 6), (3, 2)\} {( 1 , 4 ) , ( 2 , 6 ) , ( 3 , 2 )} .
x 2 + 1 x^2 + 1 x 2 + 1 ; x 2 + 6 x + 7 x^2 + 6x + 7 x 2 + 6 x + 7 ; x + 6 x + 6 x + 6 .
Substitute and simplify: the numerator becomes 19 x 5 x − 3 \displaystyle \tfrac{19x}{5x - 3} 5 x − 3 19 x , and the denominator 19 5 x − 3 \displaystyle \tfrac{19}{5x - 3} 5 x − 3 19 . So f − 1 = f f^{-1} = f f − 1 = f .
6 − y 5 \displaystyle \tfrac{6 - y}{5} 5 6 − y ; y 3 + 1 y^3 + 1 y 3 + 1 ; 2 y 1 − y \displaystyle \tfrac{2y}{1 - y} 1 − y 2 y , y ≠ 1 y \ne 1 y = 1 .
No: it is not one-one, since 1 1 1 and 3 3 3 both go to b b b .
It swaps 1 ↔ 2 1 \leftrightarrow 2 1 ↔ 2 , 3 ↔ 4 3 \leftrightarrow 4 3 ↔ 4 , …; applying it twice brings you back to n n n .
Yes. a + a a + a a + a is even; it is clearly symmetric; and if a + b a + b a + b and b + c b + c b + c even then a + c = ( a + b ) + ( b + c ) − 2 b a + c = (a + b) + (b + c) - 2b a + c = ( a + b ) + ( b + c ) − 2 b is even. The classes are the evens and the odds.
It is reflexive, since a + b = b + a a + b = b + a a + b = b + a . It is symmetric, just by rearranging. For transitivity, add a + d = b + c a + d = b + c a + d = b + c and c + f = d + e c + f = d + e c + f = d + e to get a + f = b + e a + f = b + e a + f = b + e .
It has none of the three properties.
You get g ( f ( x ) ) = x g(f(x)) = x g ( f ( x )) = x and f ( g ( x ) ) = x f(g(x)) = x f ( g ( x )) = x .