Composite Functions (AA HL)

The composite function (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)) applies gg first and then ff to the result. To find it, replace every xx in ff with the whole expression for g(x)g(x) and simplify. The order matters, and the domain of a composite is limited both by the inner function and by what ff can accept. It's part of the broader Composite & Inverse Functions topic.

19 questions on this sub-topic.

Syllabus

CodeSyllabus content
SL2.5Composite functions (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)). The identity function. Finding the inverse function f−1(x)f^{-1}(x), including the existence of an inverse for one-to-one functions. Link to the inverse function as a reflection in the line y=xy=x.

Official IB source: Mathematics: analysis and approaches subject brief (PDF, ibo.org).

Skills practised on this page:

Notation and a special case

Composite function notation

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

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

Self-inverse functions

(f∘f)(x)=x(f\circ f)(x)=x

A special case of composition: if composing ff with itself gives back xx, then ff is its own inverse and its graph is symmetric about y=xy=x.

Not in the formula booklet - prior knowledge

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

Key terms

What is the inner function?

In f(g(x))f(g(x)), the inner function is gg, which is applied first. Swapping the order usually gives a different function.

e.g. For f(x)=x+1f(x)=x+1 and g(x)=3xg(x)=3x: (f∘g)(x)=3x+1(f\circ g)(x)=3x+1, but (g∘f)(x)=3(x+1)=3x+3(g\circ f)(x)=3(x+1)=3x+3.

How do you evaluate a composite function at a number?

Work from the inside out: find the value of the inner function, then use it as the input of the outer function.

e.g. For f(x)=x2f(x)=x^2 and g(x)=x−1g(x)=x-1, (f∘g)(4)=f(3)=9(f\circ g)(4)=f(3)=9.

What is the domain of a composite function?

It contains the values of xx that are allowed in gg and whose outputs from gg are allowed in ff.

e.g. For f(x)=1xf(x)=\dfrac{1}{x} and g(x)=x−2g(x)=x-2, (f∘g)(x)=1x−2(f\circ g)(x)=\dfrac{1}{x-2} has domain x≠2x\ne2.

How do you find the range of a composite function?

Find the range of the inner function, then find the outputs of the outer function for those values only.

e.g. For g(x)=x2g(x)=x^2 and f(x)=x−3f(x)=x-3, (f∘g)(x)=x2−3(f\circ g)(x)=x^2-3 has range y≥−3y\ge-3.

Worked examples

1
Medium
No calc
[3 marks]

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

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

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

Worked solution

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

(b) (g∘f)(x)=g(2x−3)=(2x−3)2.(g\circ f)(x)=g(2x-3)=(2x-3)^2. M1 (2x−3)2=4x2−12x+9.(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)=x, g(x)=x−5.f(x)=\sqrt{x},\ g(x)=x-5.


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

(a)(ii) State its domain.

Worked solution

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

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

M1 Compose A1 Expression M1 Non-negativity condition A1 Correct inequality x≥5x\ge5 A1 Domain is governed by gg feeding a valid input into ff
3
Hard
No calc
[5 marks]

Given f(x)=x2+1f(x)=x^2+1 (x∈Rx\in\mathbb R) and g(x)=2xg(x)=2x.

Find the range of (f∘g)(x).(f\circ g)(x).

Worked solution

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

M1 Compose A1 Simplifying to 4x2+14x^2+1 R1 Minimum reasoning A1 Correct Value A1 Range
4
Easy
No calc
[4 marks]

For f(x)=x−3f(x)=x-3 and g(x)=2xg(x)=2x(a)(i) Find f(g(x))f(g(x)).

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

Worked solution

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

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

M1 Set up f(g)f(g) A1 Correct answer of 2x−32x-3 M1 Set up g(f)g(f) A1 Result; composition is not commutative

Common mistakes

  • Applying the functions in the wrong order. (f∘g)(x)(f\circ g)(x) means "do gg first, then ff" - reading it left to right and evaluating ff first gives the wrong answer.
  • Assuming (f∘g)(x)=(g∘f)(x)(f\circ g)(x)=(g\circ f)(x). Composition is not commutative in general; always recompute from scratch rather than reusing the other order's working.
  • Ignoring how the inner function restricts the domain. The domain of (f∘g)(x)(f\circ g)(x) depends on which outputs of gg are valid inputs for ff (e.g. a square root needs a non-negative argument) - not just on the domain of gg alone.

Quick questions

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

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

Does the order of composition matter?

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

How do you find f(f(x))f(f(x))?

Substitute the whole expression for f(x)f(x) into ff. For f(x)=2x+3f(x)=2x+3, f(f(x))=2(2x+3)+3=4x+9f(f(x))=2(2x+3)+3=4x+9.

Is f(g(x))f(g(x)) the same as multiplying f(x)f(x) and g(x)g(x)?

No. Composition puts one function inside another, while a product multiplies two outputs. For f(x)=x+1f(x)=x+1 and g(x)=2xg(x)=2x, f(g(x))=2x+1f(g(x))=2x+1 but f(x)g(x)=2x2+2xf(x)g(x)=2x^2+2x.

How do you solve an equation such as (f∘g)(x)=11(f\circ g)(x)=11?

First write the composite as a single function of xx, then solve the equation. For f(x)=x+2f(x)=x+2 and g(x)=x2g(x)=x^2, x2+2=11x^2+2=11 gives x=±3x=\pm3.

Ready to practise properly?

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