Composite Functions (AA HL)

A composite function chains two functions together: \((f\circ g)(x)=f(g(x))\) means "do \(g\) first, then feed the result into \(f\)". This page covers how to build and evaluate composites, work out the domain of a composite, and the order-of-operations mistakes that trip students up under exam pressure. It's part of the broader Composite & Inverse Functions topic.

20 questions on this sub-topic.

Practise composite functions → Try exam-style questions

Notation and a special case

Covered under IB syllabus reference SL2.5: composite functions \((f\circ g)(x)=f(g(x))\), the identity function, and the link between composition and inverse functions.

Composite function notation

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

Apply the inner function \(g\) first, then feed the result into the outer function \(f\). \((f\circ g)(x)\) and \((g\circ f)(x)\) are generally different functions.

Self-inverse functions

\[(f\circ f)(x)=x\]

A special case of composition: if composing \(f\) with itself gives back \(x\), then \(f\) is its own inverse and its graph is symmetric about \(y=x\).

Not in the formula booklet - prior knowledge

Need the full syllabus wording and formula-booklet reference table? See Composite & Inverse Functions.

Worked examples

1
Medium
No calc
[3 marks]

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

(a) Find \((f\circ g)(x)\).

(b) Find \((g\circ f)(x)\).

Worked solution

(a) \(f(x^2)=2x^2-3.\) A1

(b) \((g\circ f)(x)=g(2x-3)=(2x-3)^2.\) M1 \((2x-3)^2=4x^2-12x+9.\) A1

A1 Part (a) M1 Substitute f(x) into g A1 Substitution, then correct expansion
2
Hard
No calc
[5 marks]

\(f(x)=\sqrt{x},\ g(x)=x-5.\)

(a)(i) Find \((f\circ g)(x)\).

(a)(ii) State its domain.

Worked solution

(a)(i) \((f\circ g)(x)=f(g(x))=f(x-5)\) M1
\(=\sqrt{x-5}.\) A1

(a)(ii) The square root requires a non-negative argument: \(x-5\ge0\) M1
\(\Rightarrow x\ge5.\) A1
So the domain is \([5,\infty).\) A1

M1 Compose A1 Expression M1 Non-negativity condition A1 Solve A1 Domain is governed by \(g\) feeding a valid input into \(f\)
3
Hard
No calc
[5 marks]

Given \(f(x)=x^2+1\) (\(x\in\mathbb R\)) and \(g(x)=2x\), find the range of \((f\circ g)(x).\)

Worked solution

\((f\circ g)(x)=(2x)^2+1\) M1 \(=4x^2+1.\) A1
\(4x^2\ge0\) with equality at \(x\) R1 \(=0\), so the least value is \(1.\) A1 Range: \(y\ge1.\) A1

M1 Compose A1 Simplify R1 Minimum reasoning A1 Correct Value A1 Range
4
Easy
No calc
[4 marks]

For \(f(x)=x-3\) and \(g(x)=2x\), find \(f(g(x))\) and \(g(f(x)).\)

(a)(i) Find \(f(g(x))\).

(a)(ii) Find \(g(f(x))\).

Worked solution

(a)(i) Replace the input of \(f\) by \(g(x)=2x\): \(f(2x)\) M1
\(=2x-3.\) A1

(a)(ii) Replace the input of \(g\) by \(f(x)=x-3\): \(g(x-3)=2(x-3)\) M1
\(=2x-6.\) A1

M1 Set up \(f(g)\) A1 Result M1 Set up \(g(f)\) A1 Result; composition is not commutative

Common mistakes

Ready to practise properly?

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

Quick answers

What does \((f\circ g)(x)\) mean?

\((f\circ g)(x)\) means \(f(g(x))\): first substitute \(x\) into \(g\), then substitute that result into \(f\).

Does the order of composition matter?

Yes. \((f\circ g)(x)\) and \((g\circ f)(x)\) are generally different functions, so always apply the inner function first.

← Back to Analysis & Approaches HL topics