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".
[Diagram: math-function-machine] - Available in full study mode
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².
The linear function f(x) = ax + b is such that (f∘g)(x) = 2x² − 3.
Find a and b, and hence write down f(x).
Step by step
- Write the composite as f acting on the inner function, then put in g(x) = x².
- f(x) = ax + b means “multiply the input by a, then add b”. Here the input is x², so replace every x in ax + b with x².
- This composite must equal the given 2x² − 3, so the two expressions are the same for every x.
- Compare the x² terms on each side: a must be the coefficient on the right.
- Compare the constant (number-only) terms on each side: b must be the constant on the right.
- Put a = 2 and b = −3 back into f(x) = ax + b.
Final answer
a = 2 and b = −3, so f(x) = 2x − 3.
Feeling unprepared for exams?
Get a clear study plan, practice with real questions, and know exactly where you stand before exam day. No more guessing.
Work the inner function first: When f and g are given by a table, a composite like (f∘g)(a) is read inside-out: first find g(a) in the g-row, then look that answer up in the f-row.
No algebra — just two lookups, in the right order.
| x | −1 | 0 | 2 | 5 |
|---|---|---|---|---|
| f(x) | 4 | 2 | −1 | 6 |
| g(x) | 2 | 5 | 0 | −1 |
IB-style question — composite from a table
The table shows values of f(x) and g(x); both f and g are one-to-one.
Find:
(a) (f∘g)(0);
(b) (g∘f)(0).
Step by step
- (a) Inside first: read g(0) from the g-row.
- Then apply f to that result: read f(5) from the f-row.
- (b) Now the other order — inside first: read f(0).
- Then apply g to it: read g(2).
Final answer
(a) (f∘g)(0) = 6. (b) (g∘f)(0) = 0. They differ — order matters.
Composites: work from the inside out: For (f∘g)(0) = f(g(0)), do the inside first — find g(0), then feed that answer into f.
The order matters: (g∘f)(0) = g(f(0)) is usually a different value.