Composite Functions GCSE Maths: A Clear Guide
Composite functions GCSE maths explained with step-by-step examples, common mistakes and exam-style questions to build confident Higher-tier skills.

Composite functions can feel backwards. A question says fg(x)fg(x)fg(x), two rules sit beside it, and suddenly a topic that looked like substitution becomes a puzzle about which function goes first.
Imagine a GCSE student called Sam. Each time he sees fg(x)fg(x)fg(x), he starts with f(x)f(x)f(x) because the letter fff appears first. His algebra is careful, but his answer is wrong. The breakthrough comes when he stops reading the notation from left to right and starts looking at the function nearest to xxx.
That is the central idea behind composite functions GCSE maths questions: one function acts on the output of another. For fg(x)=f(g(x))fg(x)=f(g(x))fg(x)=f(g(x)), apply ggg first and then apply fff.
This guide explains that method through worked examples, common mistakes and exam-style practice. You can also use the matching Inverse and Composite Functions lesson for guided revision and video support.
Composite functions checklist
Before attempting a question, remember these four steps:
- Rewrite the composite function using brackets, such as fg(x)=f(g(x))fg(x)=f(g(x))fg(x)=f(g(x)).
- Start with the function closest to xxx.
- Substitute the whole first output into the second function.
- Simplify carefully, expanding brackets where necessary.
The order matters. In general,
f(g(x))≠g(f(x)).f(g(x)) \ne g(f(x)).f(g(x))=g(f(x)).Composite functions are normally assessed within GCSE algebra and are most often encountered in Higher-tier revision. They rely on secure substitution and simplification, so revisit the Substitution revision lesson if replacing variables with expressions still feels uncertain.
What is a composite function?
A function is a rule that turns an input into an output. For example,
f(x)=2x+3f(x)=2x+3f(x)=2x+3multiplies an input by 222 and then adds 333.
A composite function joins two rules. If
f(x)=2x+3andg(x)=x2,f(x)=2x+3 \quad \text{and} \quad g(x)=x^2,f(x)=2x+3andg(x)=x2,then f(g(x))f(g(x))f(g(x)) means:
- Apply ggg to the input.
- Use that output as the input of fff.
You can picture the process as a chain:
x⟶g(x)⟶f(g(x)).x \longrightarrow g(x) \longrightarrow f(g(x)).x⟶g(x)⟶f(g(x)).The right-hand function acts first because it is closest to the original input. This is what finally makes the notation click for Sam. He stops asking, “Which letter is written first?” and asks, “Which function is touching xxx?”
A student puts down an enormous backpack labelled overthinking before returning to revision
Composite functions worked examples
Finding fg(x)fg(x)fg(x)
Let
f(x)=2x+3andg(x)=x2.f(x)=2x+3 \quad \text{and} \quad g(x)=x^2.f(x)=2x+3andg(x)=x2.Find fg(x)fg(x)fg(x).
First, rewrite the notation:
fg(x)=f(g(x)).fg(x)=f(g(x)).fg(x)=f(g(x)).The inner function is ggg, so begin with:
g(x)=x2.g(x)=x^2.g(x)=x2.Now substitute the whole expression x2x^2x2 into fff. Since fff doubles its input and adds 333,
f(g(x))=2(x2)+3.f(g(x))=2(x^2)+3.f(g(x))=2(x2)+3.Therefore,
fg(x)=2x2+3.fg(x)=2x^2+3.fg(x)=2x2+3.Notice that we did not substitute g(x)g(x)g(x) for only one part of the rule. The complete output of ggg became the new input of fff.
Finding gf(x)gf(x)gf(x)
Use the same functions to find gf(x)gf(x)gf(x).
This time,
gf(x)=g(f(x)).gf(x)=g(f(x)).gf(x)=g(f(x)).Apply fff first:
f(x)=2x+3.f(x)=2x+3.f(x)=2x+3.The rule for ggg squares its input, so the entire expression 2x+32x+32x+3 must be squared:
g(f(x))=(2x+3)2.g(f(x))=(2x+3)^2.g(f(x))=(2x+3)2.Expand the brackets:
(2x+3)2=(2x+3)(2x+3),(2x+3)^2=(2x+3)(2x+3),(2x+3)2=(2x+3)(2x+3),so
gf(x)=4x2+12x+9.gf(x)=4x^2+12x+9.gf(x)=4x2+12x+9.This shows why order matters:
fg(x)=2x2+3,fg(x)=2x^2+3,fg(x)=2x2+3,but
gf(x)=4x2+12x+9.gf(x)=4x^2+12x+9.gf(x)=4x2+12x+9.The functions are the same, but the order produces different expressions.
Start with the Maths Genie composite functions lesson, then use the GCSE Maths Question Bank to practise the same method without having to assemble questions yourself.
Evaluating a composite function at a number
Let
h(x)=3x−1andk(x)=x+4.h(x)=3x-1 \quad \text{and} \quad k(x)=x+4.h(x)=3x−1andk(x)=x+4.Find hk(2)hk(2)hk(2).
Rewrite it as:
hk(2)=h(k(2)).hk(2)=h(k(2)).hk(2)=h(k(2)).Begin with the inner function:
k(2)=2+4=6.k(2)=2+4=6.k(2)=2+4=6.Now place that output into hhh:
h(6)=3(6)−1=17.h(6)=3(6)-1=17.h(6)=3(6)−1=17.Therefore,
hk(2)=17.hk(2)=17.hk(2)=17.Writing the two stages separately reduces the risk of mixing the rules together.
Solving an equation involving a composite function
Let
f(x)=3x+2andg(x)=x−5.f(x)=3x+2 \quad \text{and} \quad g(x)=x-5.f(x)=3x+2andg(x)=x−5.Given that fg(x)=14fg(x)=14fg(x)=14, find xxx.
First form the composite function:
fg(x)=f(g(x)).fg(x)=f(g(x)).fg(x)=f(g(x)).Substitute x−5x-5x−5 into fff:
f(g(x))=3(x−5)+2.f(g(x))=3(x-5)+2.f(g(x))=3(x−5)+2.Simplify:
fg(x)=3x−15+2=3x−13.fg(x)=3x-15+2=3x-13.fg(x)=3x−15+2=3x−13.Now use the information fg(x)=14fg(x)=14fg(x)=14:
3x−13=14.3x-13=14.3x−13=14.Add 131313 to both sides:
3x=27.3x=27.3x=27.Divide by 333:
x=9.x=9.x=9.A useful check is to substitute x=9x=9x=9 through the original functions. First, g(9)=4g(9)=4g(9)=4. Then f(4)=14f(4)=14f(4)=14, so the answer is correct.
Common mistakes with composite functions
Applying the functions in the wrong order
For fg(x)=f(g(x))fg(x)=f(g(x))fg(x)=f(g(x)), apply ggg first. The function closest to xxx starts the process.
Write the brackets before doing any algebra:
fg(x)=f(g(x)).fg(x)=f(g(x)).fg(x)=f(g(x)).That single line prevents many order errors.
Substituting only the xxx
Suppose g(x)=x2g(x)=x^2g(x)=x2 and f(x)=2x+3f(x)=2x+3f(x)=2x+3. When finding g(f(x))g(f(x))g(f(x)), the whole input of ggg is 2x+32x+32x+3. The correct substitution is
g(f(x))=(2x+3)2,g(f(x))=(2x+3)^2,g(f(x))=(2x+3)2,not
2x+32.2x+3^2.2x+32.Brackets protect the expression being substituted.
Squaring each term separately
A common error is to claim
(2x+3)2=4x2+9.(2x+3)^2=4x^2+9.(2x+3)2=4x2+9.The middle term has been lost. Expand the two brackets fully:
(2x+3)(2x+3)=4x2+12x+9.(2x+3)(2x+3)=4x^2+12x+9.(2x+3)(2x+3)=4x2+12x+9.Mixing function notation with multiplication
The expression fg(x)fg(x)fg(x) represents a composition in this context. It does not mean f×g×xf \times g \times xf×g×x. Read the definitions and notation given in the question carefully.
Skipping the intermediate line
Trying to perform substitution and simplification mentally saves very little time. Write the nested form first, substitute second and simplify last. Clear working can also make it easier to identify where an error occurred.
Composite functions questions for practice
Let
p(x)=4x−1andq(x)=x2+2.p(x)=4x-1 \quad \text{and} \quad q(x)=x^2+2.p(x)=4x−1andq(x)=x2+2.Try these without looking at the answers:
- Find pq(x)pq(x)pq(x).
- Find qp(x)qp(x)qp(x).
- Find pq(3)pq(3)pq(3).
For a second set, let
r(x)=2x+5ands(x)=3x.r(x)=2x+5 \quad \text{and} \quad s(x)=3x.r(x)=2x+5ands(x)=3x.- Find rs(x)rs(x)rs(x).
- Solve rs(x)=29rs(x)=29rs(x)=29.
Answers
For pq(x)=p(q(x))pq(x)=p(q(x))pq(x)=p(q(x)),
pq(x)=4(x2+2)−1=4x2+7.pq(x)=4(x^2+2)-1=4x^2+7.pq(x)=4(x2+2)−1=4x2+7.For qp(x)=q(p(x))qp(x)=q(p(x))qp(x)=q(p(x)),
qp(x)=(4x−1)2+2=16x2−8x+3.qp(x)=(4x-1)^2+2=16x^2-8x+3.qp(x)=(4x−1)2+2=16x2−8x+3.For pq(3)pq(3)pq(3),
q(3)=32+2=11q(3)=3^2+2=11q(3)=32+2=11and
p(11)=4(11)−1=43.p(11)=4(11)-1=43.p(11)=4(11)−1=43.Therefore,
pq(3)=43.pq(3)=43.pq(3)=43.For rs(x)=r(s(x))rs(x)=r(s(x))rs(x)=r(s(x)),
rs(x)=2(3x)+5=6x+5.rs(x)=2(3x)+5=6x+5.rs(x)=2(3x)+5=6x+5.Finally,
6x+5=29,6x+5=29,6x+5=29,so
6x=246x=246x=24and
x=4.x=4.x=4.Once the method is secure, move from isolated examples to the Inverse and Composite Functions exam booklets and timed questions in Question Rush. You can find wider topic support through the GCSE Maths revision hub.
A focused revision routine
Use your first attempt to diagnose the difficulty rather than simply count correct answers. If your substitution is right but the final expression is wrong, focus on expanding and simplifying. If the wrong function appears inside the brackets, revisit the notation. These are different problems, and separating them gives your next revision session a much clearer purpose.
Then compare your working with the solution line by line. Find the first place where the methods differ, not just the final answer. Write a short reminder beside that step in your own words. Close the solution and attempt the question again on a fresh page, so you are rebuilding the method rather than copying a sequence you can see.
Finish by returning to a similar question in a later revision session. Mix questions asking for expressions with questions asking for numerical outputs or solutions to equations. Before calculating, identify what the question actually wants. This keeps the focus on choosing and applying a method, rather than recognising the appearance of a familiar worked example.
Make the method stick
Sam did not improve by learning a longer rule. He improved by making one small habit automatic: rewrite fg(x)fg(x)fg(x) as f(g(x))f(g(x))f(g(x)), begin inside and keep substituted expressions in brackets. Knowing that process is the first step; following it consistently under exam pressure takes practice.
Build that consistency by completing the Maths Genie Lessons and Question Bank, checking each answer and repeating any question where the function order caught you out.



