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.
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
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
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
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
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
Common mistakes
- Evaluating a composite function in the wrong order. \((f\circ g)(x)\neq(g\circ f)(x)\) in general - work out the inner function first, and check carefully which letter is written first.
- Reading \((f\circ g)(x)\) as \(f(x)g(x)\). The small circle is composition, not multiplication - there's no product of \(f\) and \(g\) happening here at all.
- Skipping a layer in a triple composite. With something like \((f\circ g\circ h)(x)\), substituting two functions in at once instead of working strictly inside-out is a common source of algebra slips.
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.