Free GCSE Maths lesson: Algebra

Free LessonsGCSE / Key Stage 4Maths → Functions and Composite/Inverse Functions

Lesson 38 · GCSE / Key Stage 4 · Maths · Algebra

Functions and Composite/Inverse Functions

Learn how function notation works, why order matters in composite functions, and how inverse functions undo a rule.

Qualification: GCSE Key Stage 4 Subject: Maths Strand: Algebra

GCSE specification fit

A higher-tier 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.

QualificationGCSE Mathematics
Key stageKey Stage 4
StrandAlgebra
Tier guidanceMostly Higher

What you will learn

  • What f(x) means in a GCSE question.
  • How to substitute numbers and expressions into a function.
  • How to solve for a missing input.
  • How to form composite functions in the correct order.
  • How to find simple inverse functions by swapping x and y.
  • How to check an inverse by composing the functions and watching for allowed inputs.

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:

  • substituting values into expressions,
  • expanding and simplifying brackets,
  • solving linear equations,
  • changing the subject of a formula,
  • following a function machine forwards and backwards.

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.

f(x) = 2x + 5 f(4) = 2 × 4 + 5 f(4) = 13

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.

f(x) = 2x + 5 f(x + 3) = 2(x + 3) + 5 f(x + 3) = 2x + 11

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.

f(x) = 2x + 5 and g(x) = x − 4 fg(x) = f(g(x)) fg(x) = f(x − 4) = 2(x − 4) + 5 fg(x) = 2x − 3

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.

y = 3x − 2 x = 3y − 2 x + 2 = 3y y = (x + 2) ÷ 3 f−1(x) = (x + 2) ÷ 3

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) = 13
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 = 7
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)²
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) ÷ 5
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) = 25
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) ÷ 4
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 higher-demand algebra. The same careful substitution, bracket use, order checking, allowed-input awareness and rearranging habits help whichever board you sit.

AQA GCSE Maths

Read fg(x) as f(g(x)), do g first, and show the line where the whole inner expression is substituted in brackets before simplifying.

OCR GCSE Maths

Keep brackets around the whole inner function and check whether the question wants fg(x), gf(x), f−1(x), f−1(4) or a numerical output.

Pearson Edexcel GCSE Maths

Check the order of letters carefully, because fg(x) and gf(x) usually give different answers; write f(g(x)) or g(f(x)) first, then substitute.

Eduqas GCSE Maths

Write out the input, rule and output so the examiner can see the function order you used, especially when the input is an expression.

WJEC Wales

Expect function questions to test clear algebraic process as much as the final answer; label the function order before simplifying or interpreting.

CCEA GCSE Maths

Note whether your unit is calculator or non-calculator, but always show the substitution, rearranging and inverse-check steps.

Next lesson

Next, learn how to simplify, combine and solve with Algebraic Fractions.