Lesson overview
An extension algebra topic built from substitution and rearranging.
A function is a rule that changes an input into an output. GCSE questions may ask you to evaluate f(x), substitute an expression into a function, form a composite function such as fg(x), find an inverse function, or check that two functions undo each other.
What you will learn
Key facts before you start
Why this matters
Functions are a compact way to describe algebraic rules. They appear in graph work, transformations, iteration, real-life models and later A-level algebra.
The main exam habit is to slow down and read the notation. f(3), f(x + 1), fg(x), gf(x) and f−1(x) are all asking for different actions.
Prior knowledge
You should already be comfortable with:
Functions, composite functions and inverse functions infographic
Before viewing
Before viewing, trace one input through two function machines in order.

After viewing
After viewing, calculate a composite function value and explain which function was applied first.
Clear explanation
Function notation
If f(x) = 2x + 5, the letter f names the function and x is the input. To find f(4), replace x with 4.
Substituting an expression
Sometimes the input is not just a number. If the input is x + 3, put brackets around the whole input before simplifying.
Composite functions
A composite function means one function is put inside another. In GCSE notation, fg(x) usually means f(g(x)): do g first, then put that answer into f.
Inverse functions
An inverse function reverses the original rule. If f(x) = 3x − 2, start with y = 3x − 2, swap x and y, then rearrange to make y the subject.
If the question gives a restricted domain, keep it in mind. A rule such as f(x) = x² needs a restricted domain before it can have a single inverse, because both 3 and −3 square to 9.
Worked examples
Example 1: Evaluate a function
If f(x) = 4x − 7, find f(5).
f(5) = 4 × 5 − 7 f(5) = 13Reveal answer
Answer: 13.
Example 2: Find a missing input
If f(x) = 3x + 1 and f(x) = 22, find x.
3x + 1 = 22 3x = 21 x = 7Reveal answer
Answer: x = 7.
Example 3: Form a composite function
Let f(x) = x² and g(x) = x + 3. Find fg(x).
fg(x) = f(g(x)) fg(x) = f(x + 3) fg(x) = (x + 3)²Reveal answer
Answer: (x + 3)².
Example 4: Find an inverse
Find the inverse of f(x) = 5x + 4.
y = 5x + 4 x = 5y + 4 y = (x − 4) ÷ 5Reveal answer
Answer: f−1(x) = (x − 4) ÷ 5.
Example 5: Check the order of two composite functions
Let f(x) = 2x − 1 and g(x) = x². Compare fg(3) and gf(3).
fg(3) = f(g(3)) = f(9) = 17 gf(3) = g(f(3)) = g(5) = 25Reveal answer
Answer: fg(3) = 17 and gf(3) = 25, so the order matters.
Example 6: Compose an inverse after another function
Let f(x) = 4x + 1 and g(x) = x − 5. Find f−1g(x).
f−1(x) = (x − 1) ÷ 4 f−1g(x) = f−1(x − 5) f−1g(x) = ((x − 5) − 1) ÷ 4 = (x − 6) ÷ 4Reveal answer
Answer: f−1g(x) = x − 64.
Quick checks
Choose an answer, then check your thinking.
1. If f(x) = x + 8, what is f(6)?
2. In fg(x), which function is done first?
3. What should an inverse function do?
Practice questions
Question 1
A function machine triples the input and then subtracts 2, so f(x) = 3x − 2. Find f(8) and describe the two steps.
Reveal answer and marking guidance
Answer: f(8) = 22; triple 8 to get 24, then subtract 2.
Marking: Substitute 8 into the whole rule and show the order of operations: 3 × 8 − 2 = 24 − 2 = 22.
Question 2
If g(x) = x² + 1, find g(−4). Explain why brackets matter when squaring the negative input.
Reveal answer and marking guidance
Answer: g(−4) = 17.
Marking: Square the whole input with brackets: (−4)² + 1 = 16 + 1 = 17. Without brackets, the sign can be lost.
Question 3
If f(x) = 2x + 9 and the output is 31, find the input x.
Reveal answer and marking guidance
Answer: x = 11.
Marking: Set the rule equal to the output, then solve: 2x + 9 = 31, so 2x = 22 and x = 11.
Question 4
Let f(x) = x − 5 and g(x) = 4x. Find fg(x), and state which function is applied first.
Reveal answer and marking guidance
Answer: fg(x) = 4x − 5, with g applied first.
Marking: Write fg(x) as f(g(x)), do g first, then substitute the whole result into f: f(4x) = 4x − 5.
Question 5
Let f(x) = 2x + 3 and g(x) = x². Find gf(x).
Reveal answer and marking guidance
Answer: gf(x) = (2x + 3)².
Marking: Do f first because it is inside g(f(x)); keep brackets around the whole expression 2x + 3.
Question 6
Find the inverse of f(x) = 4x − 7.
Reveal answer and marking guidance
Answer: f−1(x) = (x + 7) ÷ 4.
Marking: Write y = 4x − 7, swap x and y, then rearrange: x = 4y − 7, so y = (x + 7) ÷ 4.
Question 7
Let f(x) = 3x − 2 and g(x) = x + 5. Find fg(x) and gf(x).
Reveal answer and marking guidance
Answer: fg(x) = 3x + 13 and gf(x) = 3x + 3.
Marking: For fg(x), do g first: f(x + 5) = 3(x + 5) − 2 = 3x + 13. For gf(x), do f first: g(3x − 2) = 3x − 2 + 5 = 3x + 3.
Question 8
Find the inverse of f(x) = x − 62.
Reveal answer and marking guidance
Answer: f−1(x) = 2x + 6.
Marking: Write y = (x − 6) ÷ 2, swap x and y, then solve x = (y − 6) ÷ 2 to get y = 2x + 6.
Question 9
Let f(x) = 5x + 1 and g(x) = x − 4. Find f−1g(13).
Reveal answer and marking guidance
Answer: f−1g(13) = 85 or 1.6.
Marking: First find g(13) = 9. The inverse of f is f−1(x) = (x − 1) ÷ 5, so f−1(9) = 8 ÷ 5.
Question 10
Let f(x) = 2x − 3 and g(x) = x² + 1. Find f−1g(4).
Reveal answer and marking guidance
Answer: f−1g(4) = 10.
Marking: Work from right to left: g(4) = 4² + 1 = 17. The inverse of f is f−1(x) = (x + 3) ÷ 2, so f−1(17) = 20 ÷ 2 = 10.
Answers and marking guidance
The exact practice answers are hidden under each question so you can try first. For function questions, marks usually come from substituting into the correct rule, using brackets around compound inputs, showing the order of composite functions, and rearranging cleanly when finding an inverse. If a question asks for fg(x) or gf(x), write the expanded meaning first so the examiner can follow the order you used.
Common mistakes
- Reading f(x) as f multiplied by x: f(x) names the output of the function for input x.
- Doing composite functions in the wrong order: fg(x) means f(g(x)), so g is done first; gf(x) usually gives a different expression.
- Dropping brackets: f(x + 2) means substitute the whole expression x + 2.
- Forgetting to swap x and y: inverse functions need the input and output swapped before rearranging.
- Assuming fg(x) equals gf(x): the order usually changes the result.
Extension challenge
Let f(x) = 3x − 1 and g(x) = x + 2. Find f−1(x), then find f−1g(x).
Reveal answer
Answer: f−1(x) = (x + 1) ÷ 3 and f−1g(x) = (x + 3) ÷ 3.
First reverse y = 3x − 1 to get x = 3y − 1, so y = (x + 1) ÷ 3. Then do g first: f−1(g(x)) = f−1(x + 2) = ((x + 2) + 1) ÷ 3.
Exam-board guidance
Function notation, composite functions and inverse functions are assessed across GCSE Maths boards, usually as more demanding algebra. The same careful substitution, bracket use, order checking, allowed-input awareness and rearranging habits help whichever board you sit.
AQA GCSE Maths
Focus on the shared method, notation and checking habit; wording and context can vary by route.
OCR GCSE Maths
Show clear method steps and use precise notation; question wording may vary by route.
Pearson Edexcel GCSE Maths
Keep working visible and check units or notation; contexts may vary by route.
Eduqas GCSE Maths
Use the same core skill in practical contexts, with clear reasoning and final checks.
WJEC Wales
Connect the method to the context and state what the result means.
CCEA GCSE Maths
Make each method step visible and keep notation, units and final checks clear.
Next lesson
Next, learn how to simplify, combine and solve with Algebraic Fractions.