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.
The maths words this lesson uses, in plain English. Open this before you start if English is not your first language.
Four quick ones from earlier work. Try each on paper before you open the answer; a slip here shows you what to watch for later in the lesson.
3(−2) − 4 = −6 − 4 = −10. Put the bracket round the negative number so the sign travels with it.
(−3)² = 9 because the bracket squares the sign as well. −3² = −9 because only the 3 is squared. Which one you meant matters as soon as a function is applied to a negative input.
Add 7 first: y + 7 = 4x. Then divide: x = (y + 7)/4. Undo the operations in the reverse of the order they were done.
(6, 1). A reflection in y = x swaps the coordinates, which is exactly what swapping x and y does when you find an inverse.
Predict first. Before you use the slider: for very large positive x, which curve do you expect to be higher, add-then-square or square-then-add? And for very large negative x? Decide both, and say why.
Now sweep x from the far left to the far right and watch the two readouts and the gap. Does the order that wins on the right also win on the left? If a prediction was wrong, find the point where the two curves swap places.
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
Here the order does not matter, and for an inverse that is the definition rather than a lucky feature. Most pairs of functions do not behave like this, as the figure shows.
Finding one is three steps. For h(x) = 2x + 3:
So h⁻¹(x) = (x − 3)/2. Check it: h(1) = 5, and h⁻¹(5) = 1. Always do that check; it costs one line and it catches almost 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 (1, 5) on h becomes (5, 1) 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.
The same idea with a different pair of functions. The first three steps are written out with the reason for each; the last is yours. Say each reason out loud before you read it.
Let f(x) = 2x + 1 and g(x) = x². There are two values of x for which (f ∘ g)(x) = (g ∘ f)(x). Find them.
Your answer. Type the value of x that is not zero.
One question on the main idea. Each wrong option is a different common slip, so the reply tells you which one you made.
p(x) = 3x and q(x) = x + 2. Which of these is (p ∘ q)(x)?
A fridge sensor does not send the temperature itself. It sends a signal s that depends on the temperature T in °C, by the rule s = 2.5T + 10. To recover T from a signal you need the inverse of that rule. The alarm sounds if T is above 8 °C. The sensor sends the signal 42.
Find the temperature T in °C that gave the signal 42, to 1 decimal place. Then decide whether the alarm sounds.
Throughout: f(x) = x² and g(x) = x + 3.
1. Find (f ∘ g)(−6).
2. Find (g ∘ f)(−6).
3. For h(x) = 2x + 3, find h⁻¹(11).
4. Keep f(x) = x² but change g to g(x) = x − 2. At which value of x do f(g(x)) and g(f(x)) agree now?
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.
Let f(x) = mx + c and g(x) = x + d. When is (f ∘ g)(x) equal to (g ∘ f)(x) for every x? Write both composites out first.
Each composite is a line with gradient m, so only the constant terms can differ. Write the difference between the two constants as one expression and factorise it. When is a product zero? Then say what each possibility means in words: what kind of f, or what kind of g?
Four steps, each one a little harder than the last. Every step is a piece of the exam question at the end, so by the top you have already done each part once.
Step 1 of 4: a composite at one number. k(x) = 3x − 2 and n(x) = x² + 4. Find (n ∘ k)(2).
Step 2 of 4: the composite as a formula. Expand (n ∘ k)(x) = (3x − 2)² + 4 as ax² + bx + c. Type b, the coefficient of x.
Step 3 of 4: an inverse function. k(x) = 3x − 2. Find k⁻¹(x), then type k⁻¹(10).
Step 4 of 4: set up an equation to solve. (n ∘ k)(x) = 13, where k(x) = 3x − 2 and n(x) = x² + 4. Which is this equation written as a quadratic equal to zero?
Written for this site in the style of the real papers. Do it on paper first, as you would in the exam, and show your working: most of the marks are for method. There is no calculator on this paper, so give exact answers (fractions, surds, multiples of π) unless the question says otherwise. Then check each part below.
Paper 1 style · no calculator · 7 marks · about 8 minutes
The functions f and g are defined by f(x) = 2x − 5 and g(x) = x² + 1, for x ∈ ℝ.
(a) Find (g ∘ f)(x), giving your answer in the form ax² + bx + c. [2]
(b) Find f⁻¹(x). [2]
(c) Hence, or otherwise, solve the equation (g ∘ f)(x) = 10. [3]
Check (a). Type b, the coefficient of x in your answer.
Write y = 2x − 5, swap the letters, and make the new y the subject. Your answer is a function of x, written with the inverse notation.
Check (c). The equation has two solutions. Type the larger one.
This is a free sample lesson. The IB Diploma plan opens every other Diploma lesson, AA and AI, SL and HL, and every lesson from Year 7 for the refreshers. It covers every child in the family and includes all seven revision packs.
$99 for 12 months, or $149 for 2 years
That is $8.25 a month for the whole family.
Student without a card? Send this to a parent in one tap.
One payment. Nothing renews. Full refund within 30 days. Prices are in US$; Gumroad shows your local currency at checkout. Already paid? Type the email you paid with in the sign-in box, then click the link we send. See every price, including $19 revision packs.
Every lesson here has a teacher page beside it: worked answers, what each common wrong answer tells you about a student's thinking, and questions at three levels for the board. Every unit has a free sample lesson for students, and a plan opens every other lesson.