GCSE Maths · Algebra

Composite functions GCSE Questions and Worked Answers

A composite function applies one rule to the output of another. fg(x) means f(g(x)): work out g first, then use that result as the input to f. In general fg(x) and gf(x) are different.

Higher tier6 worked examples10 original questions
Free AI tutor · GCSE composite functions

Practise GCSE composite functions for free with an AI tutor

Ask Ari for an explanation or work through an original exam-style question together.

AriYour maths coach
Chat cost ≈ $0.000000

Hi, I’m Ari. We can start composite functions from the beginning, work through an example together, or practise a question. Tell me which step is confusing.

Enter to send · Shift + Enter for a new line · Use $...$ or $$...$$ for math

Ari is an AI tutor and can make mistakes. Use the worked answers below to check important results.

Start with the meaning

What you need to know about composite functions

Put 3 through a machine that squares numbers: it gives 9. Feed that 9 into a second machine that adds 2: it gives 11. Connecting two rules in this way makes a composite function. The output of the first machine becomes the input of the second.

See the idea first

Keep the intermediate value visible

Let g(x) mean the output of the first rule at input x. Then f(g(x)) means feed that entire output into f. The shorter notation fg(x) means the same thing. Read the route from the innermost brackets outwards: x → g → f. It does not mean multiply the two outputs.

f(x) = 2x + 1; g(x) = x². fg means g first, then f.
Startg: squaref: double and add 1fg output
242 × 4 + 19
392 × 9 + 119
-242 × 4 + 19
From problem to method

Typical problems you need to be able to solve

These are the main kinds of question in this topic. Each card first states the problem, then explains how to solve it.

Calculate a composite value

What the problem asks: f(x) = x + 4 and g(x) = 3x. Find fg(2).

How to solve it: First g(2) = 6. Then f(6) = 10. Keeping the intermediate 6 makes the order visible.

Find the combined rule

What the problem asks: For f(x) = x + 4 and g(x) = 3x, find gf(x).

How to solve it: Apply f first, giving x + 4. Replace the input of g with the whole bracket: g(x + 4) = 3(x + 4) = 3x + 12.

Find an original input

What the problem asks: With those same rules, solve fg(x) = 19.

How to solve it: The combined rule is 3x + 4. Solve 3x + 4 = 19 to get x = 5, then check the journey 5 → 15 → 19.

A reliable routine

Follow a composite function

Use this when one function is applied to another function's output. Substitution works because the outside rule accepts the complete result of the inside rule as one input.

  1. Rewrite fg(x) as f(g(x)) if the order is unclear.
  2. Evaluate the inside rule, or write its expression.
  3. Substitute the whole result into every input position of the outside rule, using brackets.
  4. Simplify, or solve the resulting equation; check any excluded inputs.

Check: A different order usually gives a different answer. Repeated f means applying f twice, not squaring f(x).

Fully worked

Composite functions GCSE worked examples

Each solution explains the clue, why the method fits and how to check the result.

Example 1

Numeric composition

Higher only2 marks
Question

f(x) = 2x + 3 and g(x) = x − 4. Find fg(9).

g(9)=94=5g(9)=9-4=5 f(5)=2(5)+3=13f(5)=2(5)+3=13

Hence fg(9) = 13.

Example 2

Reverse the order

Higher only2 marks
Question

f(x) = 2x + 3 and g(x) = x − 4. Find gf(9).

f(9)=2(9)+3=21f(9)=2(9)+3=21 g(21)=214=17g(21)=21-4=17

Thus gf(9) = 17, different from fg(9).

Example 3

An algebraic result

Higher only3 marks
Question

f(x) = 3x − 1 and g(x) = x². Find fg(x) and gf(x).

For fg, square first:

f(g(x))=3(x2)1=3x21f(g(x))=3(x^2)-1=3x^2-1

For gf, square the whole output of f:

g(f(x))=(3x1)2g(f(x))=(3x-1)^2 =9x26x+1=9x^2-6x+1
Example 4

A composite equation

Higher only3 marks
Question

f(x) = 4x + 1 and g(x) = x − 2. Solve fg(x) = 21.

4(x2)+1=214(x-2)+1=21 4x7=214x-7=21 4x=284x=28 x=7x=7

Check: g(7) = 5 and f(5) = 21.

Example 5

Apply the same rule twice

Higher only3 marks
Question

f(x) = 2x − 5. Find ff(x).

f(f(x))=2(2x5)5f(f(x))=2(2x-5)-5 =4x105=4x-10-5 =4x15=4x-15

This is not (2x − 5)²: the rule is repeated, not its output multiplied by itself.

Example 6

An excluded input

Higher only3 marks
Question

f(x) = 1/x and g(x) = x + 3. Find fg(x) and state the excluded input.

f(g(x))=1x+3f(g(x))=\frac{1}{x+3}

The denominator cannot be zero.

x+30x+3\ne0 x3x\ne-3

At x = −3, g would send zero into a rule that divides by its input.

10 original questions · total 28 marks

Composite functions GCSE exam-style questions

Try each question before opening its fully worked answer. The difficulty rises through the set.

Before you startAllow about 33 minutes · Show your working. Give exact answers unless a question asks you to round, and include units where needed. · answers start collapsed
1

Two linear machines

Higher only2 marks

f(x) = x + 6, g(x) = 2x. Find fg(4).

Show worked answer
g(4)=8g(4)=8 f(8)=14f(8)=14

Therefore fg(4) = 14.

2

The other order

Higher only2 marks

f(x) = x + 6, g(x) = 2x. Find gf(4).

Show worked answer
f(4)=10f(4)=10 g(10)=20g(10)=20

Therefore gf(4) = 20.

3

Negative input

Higher only2 marks

f(x) = x², g(x) = x − 1. Find fg(−2).

Show worked answer
g(2)=3g(-2)=-3 f(3)=(3)2=9f(-3)=(-3)^2=9
4

Expand the result

Higher only3 marks

f(x) = 5x, g(x) = x + 2. Find fg(x).

Show worked answer
fg(x)=5(x+2)fg(x)=5(x+2) =5x+10=5x+10
5

Square a bracket

Higher only3 marks

f(x) = x² + 1, g(x) = x − 3. Find fg(x), expanded.

Show worked answer
fg(x)=(x3)2+1fg(x)=(x-3)^2+1 =x26x+9+1=x^2-6x+9+1 =x26x+10=x^2-6x+10
6

A repeated rule

Higher only3 marks

f(x) = 3x + 2. Find ff(x).

Show worked answer
ff(x)=3(3x+2)+2ff(x)=3(3x+2)+2 =9x+6+2=9x+6+2 =9x+8=9x+8
7

Solve

Higher only3 marks

f(x) = 2x + 1, g(x) = x + 4. Solve fg(x) = 19.

Show worked answer
2(x+4)+1=192(x+4)+1=19 2x+9=192x+9=19 x=5x=5

Check 5 → 9 → 19.

8

Two solutions

Higher only4 marks

f(x) = x², g(x) = x − 2. Solve fg(x) = 9.

Show worked answer
(x2)2=9 (x-2)^2=9 x2=3 or x2=3x-2=3\text{ or }x-2=-3 x=5 or x=1x=5\text{ or }x=-1

Both intermediate values, 3 and −3, square to 9.

9

Domain restriction

Higher only3 marks

f(x) = 1/(x − 1), g(x) = 2x. Find fg(x) and its excluded input.

Show worked answer
fg(x)=12x1fg(x)=\frac1{2x-1} 2x10    x122x-1\ne0\implies x\ne\frac12
10

An inverse pair

Higher only3 marks

f(x) = 4x − 7 and g(x) = (x + 7)/4. Show that fg(x) = x.

Show worked answer
fg(x)=4(x+74)7fg(x)=4\left(\frac{x+7}{4}\right)-7 =x+77=x+7-7 =x=x

The rules undo one another.

Examiner-style feedback

Common composite functions mistakes

Reading left to right

In fg(x), g acts first. Rewrite it as f(g(x)).

Missing brackets

Substituting x − 3 into x² gives (x − 3)², not x² − 3.

Assuming order does not matter

Test a number in each route; they usually produce different results.

30-second recap

Choose, carry out, check

Translate the wording before you reach for a rule.

  1. Inner rule first.
  2. Show the intermediate output.
  3. Substitute whole expressions in brackets.
  4. Check the full journey and allowed inputs.
Quick answers

Composite functions FAQ

Does fg mean f times g?

Not in this function notation. It means f composed with g: f(g(x)).

Can the orders ever agree?

Yes, for some pairs of rules, such as adding two fixed numbers. Do not assume they agree without checking.

Build connected skills

What to revise next

Content standards

Curriculum and rights review

A7 Higher-tier content. All definitions and worked tasks are introduced from simple inputs. Questions, suggested marks, solutions and diagrams are original practice material, not official past-paper questions.

Official specification references