Inner function first: A composite (f∘g)(x) = f(g(x)) means: do the inner function g first, then feed its output into f. Read it right-to-left — "f of g of x."
Order matters: In general f∘g ≠ g∘f. Which function is on the inside changes the answer, so always apply the inner one first.
A machine into a machine: Picture two machines in a row: x goes into g, g's output goes into f. (f∘g) is "g, then f".
Work inside-out: To find (f∘g)(a): compute g(a) first, then put that answer into f.
IB-style question — a number in
f(x) = 2x + 1 and g(x) = x². Find (f∘g)(3) and (g∘f)(3).
Step by step
- (f∘g)(3): inner first, g(3) = 9, then f(9).
- (g∘f)(3): now f(3) = 7, then g(7).
Final answer
(f∘g)(3) = 19, but (g∘f)(3) = 49 — order matters!
One number at a time: Don't try to do both functions at once — evaluate the inner one to a single number, then the outer one.
Practice with real exam questions
Answer exam-style questions and get AI feedback that shows you exactly what examiners want to see in a full-marks response.
Substitute the whole inner function: To get (f∘g)(x), replace every x in f with the entire expression g(x) (in brackets), then simplify.
IB-style question — build both composites
f(x) = 2x + 1 and g(x) = x². Find (f∘g)(x) and (g∘f)(x).
Step by step
- (f∘g)(x): put g(x) = x² into f.
- (g∘f)(x): put f(x) = 2x + 1 into g.
Final answer
(f∘g)(x) = 2x² + 1 ≠ (g∘f)(x) = 4x² + 4x + 1.
Use brackets: When the inner function goes into a square or a product, wrap it in brackets: (2x + 1)², not 2x + 1².
Build it, then solve or match: Form the composite expression, then either solve an equation in it, or match coefficients to find an unknown function or constant.
IB-style question — solve a composite equation
f(x) = 3x − 2 and g(x) = x + 5. Solve (f∘g)(x) = 10.
Step by step
- Form the composite.
- Set equal to 10 and solve.
Final answer
x = −1.
IB-style question — find f from a composite
g(x) = x². Find the linear function f(x) = ax + b such that (f∘g)(x) = 2x² − 3.
Step by step
- Compose: f(x²) = a·x² + b.
- Match to 2x² − 3.
Final answer
f(x) = 2x − 3.