Composite Functions
This free Higher GCSE Maths worksheet on composite functions helps you revise evaluating composite functions. Questions build from straightforward to exam standard, with full worked answers in the mark scheme — ideal for revision or homework. Suitable for AQA, Edexcel and OCR. fg(x) means do g first, then apply f to the result.
Free downloads
These worksheets and mark schemes are original, written for Virtus Academy and checked against the current AQA, Edexcel and OCR specifications. Every worksheet comes with a full mark scheme.
This is a Higher tier only topic, so there's no Foundation paper — only the Higher worksheet and mark scheme below.
Topic overview
A composite function applies one function and then feeds the result into another. The notation \(fg(x)\) means do \(g\) first, then \(f\).
The order catches people out because it reads left to right but operates right to left. Think of \(g(x)\) sitting inside the brackets of \(f\): you must evaluate the inside before the outside, exactly as with any bracket.
The two orders usually give different answers. For \(f(x) = x + 3\) and \(g(x) = 2x\), \(fg(x) = 2x + 3\) while \(gf(x) = 2x + 6\). Checking which order the question asks for is the first thing to do.
Revision notes
The order of operations
In \(fg(x)\), apply \(g\) first and substitute the result into \(f\).
For \(f(x) = x^2\) and \(g(x) = x + 1\): \(fg(x) = f(x+1) = (x+1)^2\). The inner function is worked out first, just like a bracket.
Substituting a number
Evaluate the inner function at the number, then put that value into the outer function.
For \(fg(3)\) with the same functions: \(g(3) = 4\), then \(f(4) = 16\). Working stepwise is safer than forming the general expression first.
Order matters
\(fg(x)\) and \(gf(x)\) are generally different functions.
With \(f(x) = x^2\) and \(g(x) = x + 1\): \(fg(x) = (x+1)^2\) but \(gf(x) = x^2 + 1\). Always read which comes first.
Key points
- \(fg(x)\) means apply \(g\) first, then \(f\).
- Work from the inside outwards.
- \(fg(x)\) and \(gf(x)\) are usually different.
- Substitute the inner result into the outer function.
- For a number, evaluate stepwise.
- Expand any brackets fully at the end.
Worked examples
Example 1
Given \(f(x) = x + 4\) and \(g(x) = 3x\), find \(fg(x)\).
Working
Example 2
Given \(f(x) = 2x\) and \(g(x) = x - 5\), find \(gf(4)\).
Working
Example 3
Given \(f(x) = x^2\) and \(g(x) = x + 2\), find \(fg(x)\).
Working
Common mistakes
Applying the functions in the wrong order.
fg(x) means g first. The right-hand function acts first.
Forgetting to expand the bracket.
(x + 2)² should be expanded to x² + 4x + 4 unless the question says otherwise.
Assuming fg(x) = gf(x).
They are usually different, so check which the question asks for.
Squaring incorrectly.
(x + 2)² is not x² + 4. The middle term is essential.
Exam tips
- Write down which function acts first before starting.
- Work stepwise when substituting a number.
- Expand brackets fully in the final expression.
- Check by evaluating both orders at a simple value such as x = 1.
Key terms
- Composite function
- A function formed by applying one function then another.
- Inner function
- The function applied first.
- Notation
- The way functions are written, such as \(fg(x)\).
- Substitute
- To replace the variable with an expression or value.
Related topics
Written and reviewed against the current AQA, Edexcel and OCR specifications. Spotted an error? Let us know.