Composite Functions (AA SL)

A composite function feeds the output of one function straight into another. \((f\circ g)(x)\) means "do \(g\) first, then do \(f\) to whatever comes out" - get that order wrong and almost every mark on the question is lost. This page covers the notation, how to evaluate composites correctly, and the mistakes that trip students up most. It's part of the broader Composite & Inverse Functions topic.

24 questions on this sub-topic.

Practise composite functions → Try exam-style questions

Composite function notation

Covered under IB syllabus reference SL2.5. This is a definition rather than a formula-booklet entry, so it's worth being fluent with the notation itself.

Composite notation

\((f\circ g)(x) = f(g(x))\)

Not in the booklet - it's a definition. \(g\) acts on \(x\) first; its output then becomes the input to \(f\).

Work from the inside out

Evaluate (or substitute for) the innermost function first, then carry that result outward one layer at a time.

This applies just as well when three or more functions are chained together, e.g. \((f\circ g\circ h)(x)\).

Need the full syllabus wording, or the identity function's role here? See Composite & Inverse Functions.

Worked examples

1
Easy
No calc
[3 marks]

Let \(f(x)=2x+1\) and \(g(x)=x^2\).

Find \((f\circ g)(3)\).

Worked solution

\((f\circ g)(x)=f(g(x))\): the inner function \(g\) acts first. M1
Inner: \(g(3)=3^2=9.\) A1
So \((f\circ g)(3)=f(9)=2(9)+1=19.\) A1

M1 Correct order of composition A1 Inner function A1 \((f\circ g)(3)=19\)
2
Medium
No calc
[5 marks]

Let \(f(x) = x + 3\) and \(g(x) = x^2 - 1\).

(a) Find \((g\circ f)(x)\).
(b) Solve \((g\circ f)(x)=0\).

Worked solution

(a) Apply \(f\) first, then \(g\): \((g\circ f)(x)=(x+3)^2-1.\) M1
Simplify: \(=x^2+6x+8.\) A1

(b) \((x+3)^2-1=0\;\Rightarrow\;(x+3)^2=1\;\Rightarrow\;x+3=\pm1.\) M1
So \(x=-2\) A1 or \(x=-4.\) A1

M1 Substitute \(x+3\) into \(g\) A1 Simplify to \(x^2+6x+8\) M1 Isolate and take square root A1 \(x=-2\) A1 \(x=-4\)
3
Hard
No calc
[6 marks]

Let \(f(x)=ax+b\) and \(g(x)=x+4\). Given \((f\circ g)(x)=(g\circ f)(x)\) for all \(x\), find a relationship between \(a\) and \(b\).

Worked solution

\((f\circ g)(x)=a(x+4)+b\) M1 \(=ax+4a+b\) A1; \((g\circ f)(x)=(ax+b)+4=ax+b+4.\) A1
The \(ax\) terms already match, so equate the constants: \(4a+b\) M1 \(=b+4.\) R1
\(4a=4\Rightarrow a=1\) (any value of \(b\)). A1

M1 Method A1 Correct Value A1 Form both composites M1 Method (equate for all \(x\)) R1 “for all \(x\)” forces equal coefficients A1
4
Hard
No calc
[5 marks]

Given \(f(x)=x^{2}\) and \(g(x)=2x-1\), solve \((f\circ g)(x)=(g\circ f)(x)\).

Worked solution

\((f\circ g)(x)=(2x-1)^2\) M1 \(=4x^2-4x+1\) A1; \((g\circ f)(x)=2x^2-1.\) A1
\(4x^2-4x+1=2x^2-1\Rightarrow2x^2-4x+2=0\Rightarrow x^2-2x+1=0.\) M1
\((x-1)^2=0\Rightarrow x=1.\) A1

M1 Method A1 Correct Value A1 Form both composites M1 Set equal and simplify A1 Repeated root

Common mistakes

Ready to practise properly?

24 composite-function questions, marked instantly like the real exam.

Quick answers

What does f composed with g mean?

\((f\circ g)(x)\) means \(f(g(x))\) - substitute \(x\) into \(g\) first, then take that result and substitute it into \(f\). It is generally not the same as \((g\circ f)(x)\).

Does the order of composition matter?

Yes. \((f\circ g)(x)\) and \((g\circ f)(x)\) usually give different expressions, because the inner function is applied first and changes what gets fed into the outer function.

← Back to Analysis & Approaches SL topics