Composite Functions fg(x), gf(x) and f²(x): Order Matters | Cambridge IGCSE Further Maths notes
Free preview: Composite Functions fg(x), gf(x) and f²(x): Order Matters
Two Machines in a Row
Cambridge Additional Maths
Put on socks, then shoes: fine. Put on shoes, then socks: a very different result. Doing two things in a row depends on the order. Functions are the same.
What a composite function is
- A composite function is two functions done one after the other: the output of the first becomes the input of the second.
- means : do g first, then f.
- means : do f first, then g.
- means : do f twice.
Why does g go first when f is written first? Think of brackets: in you work out the inside bracket before anything else.

What the picture shows
- The same two machines: f adds 3 and g squares.
- Top row, fg(2): g first gives , then f gives .
- Bottom row, gf(2): f first gives , then g gives .
- 7 is not 25. So in general fg is not the same as gf.
Recipe: a composite with a number
- Find the function next to the number. That one acts first.
- Work it out and write the answer down.
- Feed that answer into the next function.
- For three letters, like fgh(2), work from right to left: h, then g, then f.
👀 Watch me do it: find fg(3), gf(3) and where and ,
| What I write | Why I do it |
|---|---|
| , then . So . | g is next to the 3, so g acts first. |
| , then . So . | Now f acts first. |
| , then . So . | f twice. |
💡 In plain words
- fg: g first, then f. Read it from the right.
- Swapping the order usually changes the answer.
- is f done twice, not a square.
✏️ YOUR TURN 1
Try this first:
and . Find (a) fg(2) (b) gf(2) (c) (d) .
Answer:
- (a) , .
- (b) , .
- (c) , .
- (d) , .
✏️ YOUR TURN 2
Try this first:
, and . Find fgh(2) and hgf(2).
Answer:
- fgh(2): h first: , then , then .
- hgf(2): f first: , then , then .
Forming fg(x), gf(x) and f²(x) with Algebra
Now we feed in a whole expression instead of a number. The idea is the same: replace every x in the outer function by the inner function, in brackets.
Recipe: forming fg(x)
- Write the outer function (f, for fg) with an empty bracket wherever x was.
- Fill each bracket with the whole of g(x).
- Simplify: expand and collect like terms.
👀 Watch me do it: form fg(x), gf(x) and where and
| What I write | Why I do it |
|---|---|
| Outer is f: 3( ) − 1. Fill the bracket with g(x). | |
| Expand: . | |
| Outer is g: ( )² + 2. Fill with f(x). | |
| Expand: . | |
| Outer is f, filled with f(x). | |
| Check x = 1: and . ✓ | Always test one number. |
Notice and are different expressions. That is the algebra version of "order matters".
Unlock the full note: start 7 days free.
Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.
All notes in Inverse and Composite Functions
- Finding f⁻¹(x) and Reflecting a Graph in y = x
- Composite Functions fg(x), gf(x) and f²(x): Order Matters
What's inside for this topic
2 teacher notes, 34 practice questions, 30 flashcards, 2 quizzes.
Get the full notes, every practice question, flashcards, quizzes and mock papers.
Previous note: Finding f⁻¹(x) and Reflecting a Graph in y = x
All Cambridge IGCSE Further Maths topics · IGCSE Further Maths