Composite Functions in IGCSE Maths: Step by Step Method

Composite functions combine two functions so the output of one becomes the input of the other, written f(g(x)). On this page you will learn how to calculate composite functions for IGCSE Maths: substitute one function into another, expand and simplify carefully with brackets, evaluate at a given value, and see why f(g(x)) and g(f(x)) almost always give different answers. The worked examples follow the exam layout, and the free auto-marked practice rooms below let you build speed across six rooms, from linear pairs to reciprocal and surd forms.

Prior Knowledge You should be comfortable with substituting values into expressions and expanding brackets before starting.

How Composite Functions Work

\(x\)
input
Machine g
\(g(x)\)
applies g to x
Machine f
\(f(g(x))\)
applies f to g(x)
\(f(g(x))\)
output

Read left to right: start with \(x\), feed it into machine \(g\) to get \(g(x)\), then feed that result into machine \(f\) to get the final output \(f(g(x))\).
Key rule: \(f(g(x))\) means do \(g\) first, then \(f\).

What Are Composite Functions?

A composite function is formed when you substitute one function into another. Writing \(f(g(x))\) means: evaluate \(g(x)\) first, then use that result as the input to \(f\). Think of two machines in a production line: the output of the first feeds directly into the second.

The order matters: \(f(g(x))\) and \(g(f(x))\) almost always give different answers. The notation can also be written as \((f \circ g)(x)\), read aloud as "f composed with g of x".

Step-by-Step Method

  1. Identify the order: \(f(g(x))\) means do \(g\) first, then \(f\).
  2. Substitute: replace every \(x\) in \(f(x)\) with the expression \(g(x)\).
  3. Expand and simplify: use brackets carefully, multiply out, collect like terms.
  4. Evaluate (if asked): substitute the given value of \(x\) into your simplified expression.

Core Ideas

Order changes everything
\(f(g(x))\) and \(g(f(x))\) are rarely equal, so always work in the correct direction.
Substitution is the skill
Replace every \(x\) in the outer function with the entire inner function, keeping brackets.
Brackets protect you
Always enclose the substituted expression; dropping brackets is the most common error.
Evaluate step-by-step
For \(f(g(3))\): find \(g(3)\) numerically first, then substitute that number into \(f\).

Worked Examples

💡 Example 1: Linear with Linear

Given: \(f(x)=3x\) and \(g(x)=x+5\).

Part A: Find \(f(g(x))\)

\[ \begin{aligned} f(g(x)) &= f(x+5) \\ &= 3(x+5) \\ &= 3x+15 \end{aligned} \]
What's happening?
  • Replace \(x\) in \(f(x)=3x\) with \((x+5)\).
  • Expand the bracket: \(3 \times (x+5)\).
  • Simplify to get the final expression.

Part B: Find \(g(f(x))\)

\[ \begin{aligned} g(f(x)) &= g(3x) \\ &= 3x+5 \end{aligned} \]
What's happening?
  • Now replace \(x\) in \(g(x)=x+5\) with \(3x\).
  • No bracket needed here, just add 5.
  • Note: \(3x+15 \neq 3x+5\), so order changes the answer.

💡 Example 2: Evaluate at a Value

Given: \(f(x)=3x-1\) and \(g(x)=x^2\). Find \(f(g(2))\).

\[ \begin{aligned} g(2) &= 2^2 \\ &= 4 \\[4pt] f(g(2)) &= f(4) \\ &= 3(4)-1 \\ &= 11 \end{aligned} \]
What's happening?
  • Always evaluate the inner function first.
  • \(g(2)=4\), so now find \(f(4)\).
  • Substitute 4 into \(3x-1\) to finish.

Tip: never skip the middle step; write out \(g(2)\) explicitly before substituting.

💡 Example 3: Linear with Quadratic

Given: \(f(x)=3x-2\) and \(g(x)=x^2+4\).

Part A: Find \(f(g(x))\)

\[ \begin{aligned} f(g(x)) &= f(x^2+4) \\ &= 3(x^2+4)-2 \\ &= 3x^2+10 \end{aligned} \]
What's happening?
  • Replace \(x\) in \(f(x)\) with \((x^2+4)\).
  • Multiply through by 3 before subtracting 2.
  • Collect terms to finish neatly.

Part B: Find \(g(f(x))\)

\[ \begin{aligned} g(f(x)) &= g(3x-2) \\ &= (3x-2)^2+4 \\ &= 9x^2-12x+8 \end{aligned} \]
What's happening?
  • Replace \(x\) in \(g(x)=x^2+4\) with \((3x-2)\).
  • Square the whole bracket carefully.
  • Add 4 at the end and simplify.

The order completely changes the algebra, so always write both parts separately.

💡 Example 4: Reciprocal Function

Given: \(f(x)=\dfrac{1}{x}\) and \(g(x)=2x+1\).

Part A: Find \(f(g(x))\)

\[ \begin{aligned} f(g(x)) &= f(2x+1) \\[4pt] &= \dfrac{1}{2x+1} \end{aligned} \]
What's happening?
  • Replace \(x\) in \(f(x)=\frac{1}{x}\) with \((2x+1)\).
  • The whole expression becomes the denominator.
  • Keep the denominator in brackets; it cannot be simplified further.

Part B: Evaluate \(f(g(2))\)

\[ \begin{aligned} g(2) &= 2(2)+1 \\ &= 5 \\[4pt] f(g(2)) &= \dfrac{1}{5} \\ &= 0.2 \end{aligned} \]
What's happening?
  • Evaluate \(g(2)\) first: \(2(2)+1=5\).
  • Then find \(f(5) = \frac{1}{5}\).
  • Express as a fraction or decimal as required.

🔑 Key Points

  • Order matters: \(f(g(x))\) almost always differs from \(g(f(x))\).
  • Notation: \(f(g(x))\) means substitute \(g(x)\) into \(f\), not the other way round.
  • Brackets: always wrap the substituted expression in brackets before expanding.
  • Evaluate carefully: for \(f(g(a))\), find \(g(a)\) first, then substitute into \(f\).
  • Domain: the output of \(g(x)\) must be a valid input for \(f(x)\).

⚠️ Common Pitfalls

  • Reading \(f(g(x))\) as "\(f\) then \(g\)": it's \(g\) first, then \(f\).
  • Dropping brackets when substituting, e.g. writing \(2x+3\) instead of \(2(x+3)\).
  • Forgetting to expand fully: always simplify as far as possible.
  • Confusing \(f(g(x))\) with \(f(x) \cdot g(x)\): composition is substitution, not multiplication.

Confident with composite functions? Next, practise inverse functions: finding \(f^{-1}(x)\), checking domains, and composing \(f(f^{-1}(x))\).

Next: Inverse Functions

Composite Functions Practice Tool

Build confidence with IGCSE composite functions. Each room focuses on a different skill. Questions are arranged in four tiers from left to right: Starter → Builder → Challenger → Master. Type powers with ^ (for example x^2) and roots as sqrt(...). Any correct equivalent form is accepted. Non-integer answers should be given to 2 d.p. where indicated.

Correct 0
Re-attempts 0
🔥 Streak 0
🏆 Best 0

Each room generates 16 graded questions (4 per column): Starter → Builder → Challenger → Master. Enter expressions like 5x+7. For decimals, round to 2 d.p.

Video Guide on how to calculate composite functions