Functions • Topic 3 of 4

Composite Functions

Composition feeds the output of one function into another: (f∘g)(x) = f(g(x)), meaning apply g first, then f. The order matters — f(g(x)) is almost never the same as g(f(x)), so read the brackets carefully from the inside out. CAT loves two angles. First, plain evaluation: given f and g, compute f(g(x)) or a numeric value like f(g(2)) by substituting step by step. Second, repeated composition: define f₂(x) = f(f(x)), f₃ = f(f₂), and so on, then ask for f₁₀₀(x). The trick there is to compute the first few iterates and look for a cycle — many CAT functions (such as f(x) = 1/(1 − x) or f(x) = (x − 1)/(x + 1)) repeat with a short period, so f applied n times depends only on n modulo that period. A function that satisfies f(f(x)) = x is its own inverse, the period-2 case. Always track the domain too: g(x) must land inside the domain of f for the composite to be defined.

✅ Solved examples

1. If f(x) = 2x + 1 and g(x) = x², find f(g(3)) and g(f(3)).
g(3) = 9, so f(g(3)) = 2·9 + 1 = 19. f(3) = 7, so g(f(3)) = 7² = 49. They differ — order matters.
2. If f(x) = x/(x + 1), find f(f(x)).
f(f(x)) = f(x)/(f(x) + 1) = [x/(x+1)] / [x/(x+1) + 1] = [x/(x+1)] / [(2x+1)/(x+1)] = x/(2x + 1).
3. Let f(x) = 1/(1 − x). Find f(f(f(x))).
f(f(x)) = (x − 1)/x, and f(f(f(x))) = f((x−1)/x) = 1/(1 − (x−1)/x) = 1/(1/x) = x. So f has period 3.
4. If f(x) = x + 2 and g(x) = 3x, find (g∘f)(x) − (f∘g)(x).
g(f(x)) = 3(x + 2) = 3x + 6; f(g(x)) = 3x + 2. Difference = (3x + 6) − (3x + 2) = 4.

✏️ Practice — try these, take hints as needed

1. f(x) = x − 4, g(x) = x². Find g(f(6)).
Work inside out.
f(6) = 2.
g(2) = 2².
4
2. f(x) = 2x, g(x) = x + 3. Find f(g(x)).
Apply g first.
g(x) = x + 3.
Then double it.
2x + 6
3. f(x) = 1/(1 − x). Find f₁₀₀(x), the 100th iterate.
Compute the first few iterates.
f has period 3 (f₃(x) = x).
100 mod 3 = 1.
f₁₀₀(x) = f(x) = 1/(1 − x)
4. f(x) = (x − 1)/(x + 1). Find f(f(x)).
Substitute f(x) into itself.
Numerator: f(x) − 1; denominator: f(x) + 1.
Simplify the compound fraction.
−1/x
5. f(x) = x², g(x) = x + 1. For which x does f(g(x)) = g(f(x))?
f(g(x)) = (x + 1)².
g(f(x)) = x² + 1.
Set equal: 2x + 1 = 1.
x = 0

📝 Topic test — 8 questions

Auto-graded with full solutions; saved to your dashboard. Use the calculator and formula sheet (top-right) any time.

Loading questions…