With f(x) = x² and g(x) = x + 3, start at 2. One order gives 25 and the other gives 7. The two composites agree at exactly one value of x, which is why testing a single number proves nothing.
Two different functions, built from the same two pieces. They touch once and are otherwise nowhere near each other.
(f ∘ g)(x) = f(g(x))
and the bracket tells you the order: g acts first, because it is next to the x. Read it from the inside out, the way you would evaluate it.
With f(x) = x² and g(x) = x + 3, and x = 2:
As formulas, (f ∘ g)(x) = (x + 3)² and (g ∘ f)(x) = x² + 3. Expanding the first gives x² + 6x + 9, so the two differ by 6x + 6, which is zero only at x = −1. Both give 4 there, and everywhere else they disagree.
So checking one number is not a check. If you test x = −1 the two composites agree and you learn nothing. Test x = 1, or x = 0, where they are 9 and 3. Better still, write both formulas out and compare those, because a formula covers every x at once.
The function that does nothing is I(x) = x, and it is what an inverse is for:
(f ∘ f⁻¹)(x) = (f⁻¹ ∘ f)(x) = x
Note that this is the one composition where the order does not matter, and that is the definition of an inverse rather than a lucky feature of it.
Finding one is three steps. For h(x) = 2x + 3:
So h⁻¹(x) = (x − 3)/2. Check it: h(4) = 11, and h⁻¹(11) = 4. Always do that check; it costs one line and it catches every rearrangement slip.
An inverse is a reflection in the line y = x. That is the picture behind all the algebra: swapping x and y is exactly what reflecting in y = x does to a point, so (4, 11) on h becomes (11, 4) on h⁻¹. It is also the fastest check in an exam, because a graph and its inverse have to be mirror images across that line, and if they are not then the rearrangement went wrong.
Only a one-to-one function has an inverse. f(x) = x² sends both 3 and −3 to 9, so an inverse would have to send 9 to both, and a function cannot. That is why √9 is defined as 3 and not as ±3, and it is why x² only gets an inverse once you restrict it to x ≥ 0. The restriction is not a technicality; it is what makes the inverse exist.
Inverting a composite reverses the order. This one is worth knowing and is not in the Standard Level content list, so read it as background rather than as something to revise for.
(f ∘ g)⁻¹ = g⁻¹ ∘ f⁻¹, when f and g both have inverses
which is just undoing things in the opposite order to doing them. The condition matters, and our f(x) = x² does not meet it until the domain is restricted: on x ≥ 0 it does, and then (f ∘ g)(2) = 25 undoes as take the square root to get 5, then subtract 3 to get back to 2. Doing it the other way round, subtract 3 from 25 to get 22 and then take the root, gives 4.69, which is not where you started.
Define the two functions once and the machine will compose them in either order, which makes the difference between the two orders a two-line comparison rather than an argument.
When you may use it. Analysis Paper 1 is non-calculator, and this sub-topic is mostly Paper 1 work: composing and inverting are algebra. Paper 2 is where graphing the pair against y = x is worth the time.
The mark people lose. Composing in the order the letters are written rather than the order they act. (f ∘ g) means g first, because g is the one touching the x. The habit that fixes it: never write f ∘ g without immediately writing f(g(x)) underneath, with the brackets. Then the inside-out reading is on the page and cannot be misremembered under pressure.
Throughout: f(x) = x² and g(x) = x + 3.
1. Find (f ∘ g)(2).
2. Find (g ∘ f)(2).
3. For h(x) = 2x + 3, find h⁻¹(11).
4. At which value of x do the two composites agree?
5. Why does f(x) = x² have no inverse unless you restrict its domain?
1 markThe composite written as f(g(x)), with the order right.
1 markThe substitution or the simplified formula.
1 markFor an inverse, the rearrangement, and the domain restriction where one is needed.
On "find the inverse" questions the domain is often the third mark and the one left blank. If the function is x² or anything built from it, say which half you are keeping.
These pages are free and stay free, but they are general and your IA is not. Send me your research question, or whatever exists so far, and I will tell you in writing whether the topic has a ceiling on it, where the marks are going, and what to change first. That costs nothing and it comes back within 24 hours.
Written by a serving IB Diploma and Career-related Programme Coordinator and Head of Mathematics, who reads internal assessments across every subject group every year. If you then want the whole draft reviewed properly against all five criteria, that is the paid one, and it is refunded if it does not name at least three specific things to fix.
Already have a full draft? Have the whole thing reviewed against all five criteria, $99.