Composition of functions
A two-step machine: first it adds 2, then it triples. Feeding the output of one machine into the next is composition.
For f : A → B and g : B → C, the composite function g∘f : A → C is defined by (g∘f)(x) = g(f(x)). First f acts, then g.
Formula: (g∘f)(x) = g(f(x))
Rule 1: Find the composite — Put the whole of f(x) in place of x in g.
- Easy: f(x) = x + 2, g(x) = 3x gives (g∘f)(x) = 3x + 6 and (f∘g)(x) = 3x + 2.
- Medium: f(x) = x², g(x) = x − 1 gives (g∘f)(x) = x² − 1 and (f∘g)(x) = (x − 1)².
- Exam-type: f(x) = x − 4, g(x) = √x: (g∘f)(x) = √(x − 4), defined only for x ≥ 4.
Rule 2: Evaluate at a number — Work inside out.
- Easy: f(x) = 2x + 1, g(x) = x²: (g∘f)(3) = g(7) = 49.
- Medium: With the same f and g, (f∘g)(3) = f(9) = 19.
- Exam-type: (g∘f)(x) = (2x + 1)², so (g∘f)(−1) = 1.
g∘f is read right to left: f acts first.
Thinking g∘f = f∘g; composition is usually not commutative.
g∘f: "g of f of x" — the inside one goes first.
Practice questions
- 1f(x) = x + 5, g(x) = 2x. Find (g∘f)(x).
- 2With the same f and g, find (f∘g)(x).
- 3f(x) = 3x, g(x) = x + 1. Find (g∘f)(2).
- 4f(x) = x², g(x) = 2x + 3. Find (g∘f)(x) and (f∘g)(x).
- 5f(x) = 1 / x for x not 0 and g(x) = x + 2. Find (g∘f)(x).
- 6f(x) = x + 1, g(x) = x − 1. Find f∘g and g∘f.
- 7f(x) = |x|, g(x) = x². Find (g∘f)(x) and (f∘g)(x).
- 8f(x) = x − 3, g(x) = √x. Find the domain of g∘f.
Show answers (try them yourself first)
- 12(x + 5) = 2x + 10
- 22x + 5
- 3f(2) = 6, g(6) = 7
- 4(g∘f)(x) = 2x² + 3; (f∘g)(x) = (2x + 3)²
- 51 / x + 2, for x not 0
- 6Both are the identity function, x
- 7Both equal x² (and also |x|² = x²)
- 8x ≥ 3
Invertible functions
Putting on socks, then shoes. To undo it, take off the shoes first, then the socks. The inverse undoes the steps in reverse order.
A function f : A → B is invertible exactly when it is bijective. Its inverse f⁻¹ : B → A sends y back to the x with f(x) = y, so f∘f⁻¹ and f⁻¹∘f are identity functions.
Formula: y = f(x) ⇔ x = f⁻¹(y). (g∘f)⁻¹ = f⁻¹∘g⁻¹
Rule 1: Find the inverse — Write y = f(x), solve for x, then rename.
- Easy: f(x) = x + 7 gives f⁻¹(y) = y − 7.
- Medium: f(x) = 3x − 5 gives f⁻¹(y) = (y + 5) / 3.
- Exam-type: f(x) = x³ + 1 on R gives f⁻¹(y) = ∛(y − 1).
Rule 2: Check or combine inverses — Use the identity checks or reverse the order.
- Easy: For f(x) = x + 1 and g(x) = 2x: g∘f = 2x + 2, so (g∘f)⁻¹(y) = (y − 2) / 2.
- Medium: f⁻¹(y) = y − 1 and g⁻¹(y) = y / 2, so f⁻¹(g⁻¹(y)) = y / 2 − 1 = (y − 2) / 2, the same as above.
- Exam-type: f(x) = x² on R is not invertible, but on [0, ∞) it is and f⁻¹(y) = √y.
Only bijective functions have inverses. Check one-one and onto first.
Writing f⁻¹(x) as 1 / f(x); the −1 here means inverse, not reciprocal.
Socks, then shoes — undo shoes, then socks (the order reverses).
Practice questions
- 1Find the inverse of f(x) = x − 9.
- 2Find the inverse of f(x) = 4x.
- 3Is f : R → R, f(x) = x² invertible?
- 4Find the inverse of f(x) = 2x + 7.
- 5If f(x) = 5x − 2, find f⁻¹(8).
- 6f(x) = x + 3 and g(x) = 2x. Find (g∘f)⁻¹(y).
- 7Show that f(x) = (x + 4) / 3 and g(x) = 3x − 4 are inverses of each other.
- 8Is f : R → R, f(x) = x³ invertible? Write f⁻¹.
Show answers (try them yourself first)
- 1f⁻¹(y) = y + 9
- 2f⁻¹(y) = y / 4
- 3No: it is not one-one (f(2) = f(−2)) and not onto
- 4f⁻¹(y) = (y − 7) / 2
- 55x − 2 = 8 gives x = 2
- 6g∘f = 2x + 6, so (g∘f)⁻¹(y) = (y − 6) / 2
- 7g(f(x)) = 3 (x + 4) / 3 − 4 = x and f(g(x)) = (3x − 4 + 4) / 3 = x
- 8Yes, it is bijective; f⁻¹(y) = ∛y