Learn Index · Functions and Relations Grade 11–12

Composite functions

Applying one function after another: (f ∘ g)(x) = f(g(x)).

Read

A function of a function

A composite function feeds the output of one function into another:

(f ∘ g)(x) = f(g(x))

Read "f of g of x". The inner function g is applied first; the outer function f is applied to the result.

An everyday example

A store gives 20% off, then charges 13% tax.

  • Discount: d(x) = 0.8x
  • Tax: t(x) = 1.13x
  • Final price: t(d(x)) = 1.13(0.8x) = 0.904x

A $50 item: t(d(50)) = 0.904 × 50 = $45.20.

Evaluating at a number

f(x) = x² + 1, g(x) = 3x − 2

f(g(2)): first g(2) = 4, then f(4) = 17.

g(f(2)): first f(2) = 5, then g(5) = 13.

Order matters: f(g(x)) is usually different from g(f(x)).

Finding the formula

f(g(x)): replace x in f with g(x).

  • f(g(x)) = (3x − 2)² + 1 = 9x² − 12x + 5

g(f(x)): replace x in g with f(x).

  • g(f(x)) = 3(x² + 1) − 2 = 3x² + 1

Using tables or graphs

x 0 1 2 3
f(x) 2 3 0 1
g(x) 1 3 2 0

f(g(1)) = f(3) = 1; g(f(0)) = g(2) = 2.

Domain of a composite

The domain of f(g(x)) includes only x-values that:

  1. are in the domain of g, and
  2. give g(x) in the domain of f.

Example: f(x) = √x, g(x) = x − 4

  • f(g(x)) = √(x − 4) → domain x ≥ 4

Decomposing

To decompose, spot the inner and outer parts.

h(x) Inner g(x) Outer f(x)
(2x + 1)⁵ 2x + 1 x⁵
√(x² + 9) x² + 9 √x
1/(x − 3) x − 3 1/x
sin(4x) 4x sin x

This skill matters in calculus (the chain rule).

Worked examples

Example 1: f(x) = 2x, g(x) = x + 5. f(g(3))? g(3) = 8 → f(8) = 16.

Example 2: Same functions: g(f(x))? 2x + 5.

Example 3: f(x) = 1/x, g(x) = x² − 1. Domain of f(g(x))? x² − 1 ≠ 0 → x ≠ ±1.

Common mistakes

  • Multiplying f(x) × g(x) instead of composing.
  • Applying the functions in the wrong order.
  • Ignoring domain restrictions from the inner function.

Try it yourself

f(x) = x − 4, g(x) = x²

  1. f(g(3))
  2. g(f(3))
  3. f(g(x))
  4. g(f(x))
  5. Decompose h(x) = (x − 4)².

Answers: 1) 5 2) 1 3) x² − 4 4) (x − 4)² = x² − 8x + 16 5) h = g(f(x)), inner f(x) = x − 4, outer g(x) = x²

Quick recap

  • A composite function f(g(x)) applies g first, then f.
  • Composition order matters.
  • Check the domain and practise how to decompose functions.