Topic 2.5 · AA Standard Level

Square it then add, or add then square it

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.

x = 2.0
25.00f(g(x)), add then square
7.00g(f(x)), square then add
18.00 apartwhat the order costs

Two different functions, built from the same two pieces. They touch once and are otherwise nowhere near each other.

What a composite is

(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:

  1. (f ∘ g)(2): add 3 to get 5, then square to get 25.
  2. (g ∘ f)(2): square to get 4, then add 3 to get 7.

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 identity function

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:

  1. Write y = 2x + 3.
  2. Swap the letters: x = 2y + 3.
  3. Rearrange for y: y = (x − 3)/2.

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.

On the GDC: composing and inverting

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.

TI-Nspire CX II

  1. On a Calculator page: Define f(x)=x^2 and Define g(x)=x+3
  2. f(g(2)) gives 25 and g(f(2)) gives 7. Put both on one screen
  3. f(g(x)) on its own returns the composite as a formula in x. Do not expect it multiplied out: the permitted Nspire is non-CAS, it has no algebra commands at all, and what comes back may still read as (x+3)²
  4. To see an inverse, graph f1(x)=2x+3, f2(x)=(x-3)/2 and f3(x)=x with a square window: menu → Window / Zoom → Zoom Square

Casio fx-CG50

  1. MENU → Graph, with Y1=X^2 and Y2=X+3
  2. Then Y3=Y1(Y2(X)), selecting Y1 and Y2 from VARS → F4 GRAPH. Y4 as Y2(Y1(X)) gives the other order. Give the inner function its argument; Y1(Y2) on its own is not reliably read as a composition
  3. Deselect Y1 and Y2 with F1 so only the two composites draw
  4. SHIFT F3 V-Window and F3 STD, then SHIFT F5 G-SOLVE → ISCT finds the single crossing at x = -1

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.

Your turn

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?

Question 5. Why does f of x equals x squared have no inverse unless you restrict its domain?
Where the marks go

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.

Want a verdict on your own draft?

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.

Send me your question, free

Already have a full draft? Have the whole thing reviewed against all five criteria, $99.