Evaluate composite functions such as fg(x), find inverse functions f−1(x), and solve equations that use them. It is Higher only, aimed at grade 7. Free questions with answers are on this page. Worked examples show each line before you try the questions.
If f(x)=2x+1 and g(x)=x3, the composite fg(x) means g first, then f: fg(x)=2x3+1. gf(x)=(2x+1)3. Order matters. The inverse f−1 undoes f: swap x and y in y=2x+1 and solve for y, so f−1(x)=2x−1. Check f(f−1(x))=x.
Domain hints: you cannot invert f(x)=x2 over all reals without restricting to x≥0. At GCSE the functions are usually linear, a simple square, a reciprocal or a cube. Write fg(x) with a bracket if it helps: f(g(x)).
f−1 undoes f: swap x and y then rearrange. gf means f first, then g. fg(x)=f(g(x)), so substitute the inner expression into the outer.
Objectives
Find the inverse of a linear function.
Write f(g(x)).
Work out f(g(a number)).
Key points
Use function notation: f(x)=3x−1 means 'take x, multiply by 3, subtract 1'.
Evaluate fg(x) by applying g first, then f.
Write fg(x) or gf(x) as a single expression.
Find an inverse by writing y=f(x), swapping to make x the subject, then swapping letters.
Worked examples
Example 1
Find the inverse of f(x)=2x+3.
2 marks
Set y = 2x + 3 and undo addition: y - 3 = 2x.
Divide by 2: x = (y - 3)/2.
State inverse function: (x-3)/2.
Answer: (x-3)/2
Common slips
Slip: Add 3: y + 3 = 2x. Inverse operations undo original steps.
Slip: Multiply by 2. Inverse of multiplying by 2 is dividing by 2.
Slip: Write (x+3)/2. The inverse is (x-3)/2.
Example 2
f(x)=x+1 and g(x)=3x. Write f(g(x)).
2 marks
Apply inner function g(x) first: g(x) = 3x.
Substitute 3x into f: f(3x) = 3x + 1.
State composite expression: 3x+1.
Answer: 3x+1
Common slips
Slip: Apply f first. In composite f(g(x)), evaluate g before f.
Slip: Multiply after adding: 3(x + 1). f adds 1 to its input.
Slip: Write 3x+3. f(g(x)) = 3x+1.
Example 3
f(x)=x² and g(x)=x+2. Work out f(g(4)).
3 marks
Evaluate the inner function g at 4: g(4) = 4 + 2 = 6.
Substitute 6 into outer function f: f(6) = 6².
Calculate 6² = 36.
Answer: 36
Common slips
Slip: Evaluate f(4) first: 4² = 16. The inner function g must be calculated first.
Slip: Add 2 to 16: 16 + 2 = 18. Feed the output of g into f.
Slip: Leave as 18. f(g(4)) = 36.
Questions and answers
GCSE Maths inverse & composite functions questions and answers. Try each one, then open the answer. Easy questions come first.
Question 1 Easy2 marks
Find the inverse of f(x)=3x+6.
Show answer
Answer: (x-6)/3
Subtract 6: y - 6 = 3x.
Divide by 3: (x-6)/3.
M1 — Subtract 6: y - 6 = 3x.
A1 — Divide by 3: (x-6)/3.
Question 2 Easy2 marks
Find the inverse of f(x)=x+5.
Show answer
Answer: x-5
Subtract 5 to undo addition.
Inverse is x-5.
M1 — Subtract 5 to undo addition.
A1 — Inverse is x-5.
Question 3 Medium2 marks
f(x)=x+4 and g(x)=2x. Write f(g(x)).
Show answer
Answer: 2x+4
g(x) = 2x.
f(2x) = 2x + 4.
M1 — g(x) = 2x.
A1 — f(2x) = 2x + 4.
Question 4 Medium2 marks
f(x)=2x+1 and g(x)=x+3. Write f(g(x)).
Show answer
Answer: 2x+7
g(x) = x+3.
2(x+3)+1 = 2x+7.
M1 — g(x) = x+3.
A1 — 2(x+3)+1 = 2x+7.
Question 5 Hard2 marks
f(x)=x² and g(x)=x+1. Work out f(g(3)).
Show answer
Answer: 16
g(3) = 3 + 1 = 4.
f(4) = 4² = 16.
M1 — g(3) = 3 + 1 = 4.
A1 — f(4) = 4² = 16.
Question 6 Hard2 marks
f(x)=x² and g(x)=2x. Work out f(g(3)).
Show answer
Answer: 36
g(3) = 2 × 3 = 6.
f(6) = 6² = 36.
M1 — g(3) = 2 × 3 = 6.
A1 — f(6) = 6² = 36.
Question 7 Exam-style4 marks
f(x)=x² and g(x)=2x+1. (a) Work out the value of f(g(3)). (b) Write g(f(x)) in terms of x.
Show answer
Answer: 49 and 2x²+1
g(3) = 2(3) + 1 = 7.
f(g(3)) = f(7) = 7² = 49.
g(f(x)) = g(x²), so replace x in 2x + 1 with x².
g(f(x)) = 2x² + 1.
M1 — g(3) = 7
A1 — f(g(3)) = 49
M1 — 2(x²) + 1 seen
A1 — 2x²+1
Common mistakes
Most lost marks on this topic are one slip.
Doing f before g in f(g(x))
The function inside the brackets goes first
Changing the sign the wrong way in an inverse
Undo addition with subtraction
Squaring before adding in f(g(n)) when f is the square
Add inside g first
Spot the slip
The inverse of f(x)=2x+3 is not (x+3)/2. What is it?
(x-3)/2
(x+3)/2
2x-3
Show the slip
(x-3)/2 Undo +3 first, then undo ×2.
Exam tips
Be ready to do this without a calculator. Paper 1 is the non-calculator paper.
If the question says “show that”, the result is given. The marks are for the steps that reach it.
The method is the same on AQA-style and Edexcel-style papers.
For an expression like fg(x), write f(bracket) with the whole of g(x) inside a bracket before expanding.
Show the rearranging lines for an inverse — the marks are in the rearranging, not the final swap.
Printable worksheet
The same questions are in a PDF you can print. Answers start on a later page.