IB Maths AA HLTopic 2 โ FunctionsPaper 1 & 2~7 min read
Composite Functions
A composite function is one function applied to the output of another โ like a two-stage machine. Feed x into g, take whatever pops out, then feed that into f. The whole chain is written f(g(x)) or (f โ g)(x). The single thing you must remember: the order matters. f(g(x)) and g(f(x)) are usually different functions.
๐ What you need to know
Three notations, same thing: (f โ g)(x) = fg(x) = f(g(x)).
Read inside-out: in f(g(x)), apply g first, then f to the result. The function closest to the x goes first.
Order matters: in general f(g(x)) โ g(f(x)).
Composing with itself is allowed: ff(x) = (f โ f)(x) means apply f twice. It is NOT the same as [f(x)]2.
To find f(g(x)), substitute the whole expression for g(x) wherever x appears in f.
Domain of f(g(x)): start with the domain of g, then keep only those inputs whose g-outputs lie inside the domain of f.
The two-stage machine
f(g(x)) โ apply g first, then f
Composition
(f โ g)(x) = f(g(x))
How to compute f(g(x))
Two scenarios โ at a number or as an expression:
At a number
f(g(5))
work inside-out: compute g(5) first, then put that into f
As an expression
f(g(x))
substitute the whole expression for g(x) into f wherever x appears
For “at a number” questions, never expand the algebra โ just plug in numbers. It’s faster and harder to mess up.
Order matters โ f(g(x)) โ g(f(x))
Quick demo with f(x) = x + 1 and g(x) = 2x:
f(g(x))
f(2x) = 2x + 1
double, then add 1
g(f(x))
g(x + 1) = 2(x + 1) = 2x + 2
add 1, then double
Same two functions, two completely different composites. Always check which one the question is asking for.
Watch out โ ff(x) is not [f(x)]2
Common confusionff(x) = f(f(x)) โ [f(x)]2
Take f(x) = x + 3:
ff(x) โ apply f twice
f(x + 3) = x + 6
composition
[f(x)]2 โ square the output
(x + 3)2 = x2 + 6x + 9
multiplication
Domain of a composite function
The input x has to satisfy two conditions:
๐งญ Recipe โ domain of f(g(x))
Start with the domain of g โ only inputs that g can accept.
Find the outputs of g on that domain (the range of g).
Restrict further so those outputs lie inside the domain of f. Whatever inputs of g produce that restricted set become the domain of the composite.
Let f(x) = 3x โ 2 with domain โ2 โค x โค 4, and let g(x) = โx with domain 1 โค x โค 49. Find the domain of (f โ g)(x).
Step 1: g acts first โ input must be in g’s domain1 โค x โค 49Step 2: g’s outputs (range of g)g(x) = โx โ 1 โค g(x) โค 7Step 3: These outputs must fit f’s domain โ2 โค input โค 4need g(x) โค 4 โ โx โค 4 โ x โค 16(g(x) โฅ โ2 is automatic since โx โฅ 0)Step 4: Combine with original 1 โค x โค 49domain of (f โ g): 1 โค x โค 16f’s restricted domain shrinks the composite’s domain from 1 โค x โค 49 down to 1 โค x โค 16
WE 6
Solve an equation involving a composite
Given f(x) = x + 4 and g(x) = 2x โ 1, find the value of x for which (f โ g)(x) = 11.
Step 1: Find the expression for (f โ g)(x)(f โ g)(x) = f(2x โ 1) = (2x โ 1) + 4= 2x + 3Step 2: Set equal to 11 and solve2x + 3 = 112x = 8x = 4check: g(4) = 7, then f(7) = 11 โ
๐ก Top tips
Inside-out reading. The function closest to the x goes first. (f โ g)(x) means g first, then f.
For numerical questions, plug in numbers โ don’t expand the expression. Faster and fewer slip-ups.
For expression questions, substitute the whole inner function as a chunk wherever x appears in the outer function.
Order matters. Always check which composite the question wants โ (f โ g) and (g โ f) usually give very different answers.
ff(x) means f(f(x)), not [f(x)]2. Composition, not multiplication.
For domains, check both stages: input must work for the inner function, and that output must work for the outer function.
Check your answer numerically. Pick a value of x, compute through the composite both ways (by chain and by formula) โ they should match.
โ Common mistakes
Reversing the order of composition. (f โ g)(x) means apply g first, not f.
Treating ff(x) as [f(x)]2. They’re completely different.
Forgetting to expand brackets fully after substituting. (3x + 5)2 is not 9x2 + 25 โ there’s a cross-term.
Substituting only some occurrences of x. If f(x) = x2 + 4x, then f(u) = u2 + 4u โ every x gets replaced.
Using the wrong domain. The composite’s domain is restricted by both functions, not just the inner one.
Forgetting to check that g‘s outputs fit in f‘s domain. Even if x is fine for g, the result g(x) might not be allowed as an input to f.
Mixing up g(f(x)) with f(x) ยท g(x). Composition is not multiplication.
Composition becomes the foundation for the next big idea: inverse functions. An inverse fโ1 is the function that “undoes” f, so f(fโ1(x)) = x. That’s a composition equal to the identity โ and we’ll explore exactly when an inverse can exist in the next note.
Need help with Composite Functions?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.