All notesMathTalk
CAMBRIDGE O LEVEL · 2025–2027

Functions.

Follow a mapping from input to output, undo it with an inverse, and compose the steps.

Syllabus 2.12Visual notesWorked examples
BY THE END

Use function notation, domains and ranges · find inverses · form composites in the correct order

01

A function maps each input to one output

Think of a function as a rule-controlled machine: you choose an input, the rule processes it, and one output comes out. The notation f(x) names that output; it does not mean f multiplied by x.

The domain describes which inputs are allowed. The range describes which outputs actually occur from those inputs. Restrictions can come from the problem’s context or from the calculation itself, such as division by zero or a square root outside the real-number domain.

The domain is the allowed set of inputs. The range is the set of outputs actually produced. f(x) means the output of f at input x; it does not mean f multiplied by x.

WORKED EXAMPLE

Let f(x) = 3x − 5 with domain {1, 2, 3}.

The range is {−2, 1, 4}. In particular f(2) = 1.

WORKED EXAMPLE

Find the range of h(x) = 2x² + 3 for real x.

Since x² ≥ 0, h(x) ≥ 3. Every value from 3 upwards occurs, so the range is h(x) ≥ 3. For domain −1 ≤ x ≤ 2 instead, the range is 3 ≤ h(x) ≤ 11.

Pause and explainIf f(x) = 2x + 1, what does f(3) ask you to do?

Use 3 as the input: calculate 2 × 3 + 1 = 7.

02

An inverse reverses the mapping

An inverse function reverses a function’s input–output relationship. If a rule adds 5 and then doubles, its inverse must first halve and then subtract 5, reversing both the operations and their order.

Use y for the original output, rearrange to recover x, then exchange the input and output labels for the inverse rule. A function needs to be one-to-one on the chosen domain to have a single-valued inverse: different permitted inputs must not lead to the same output.

WORKED EXAMPLE

Find the inverse of f(x) = 3x − 5.

  1. Write y = 3x − 5.
  2. Rearrange to make x the subject: x = (y + 5)3.
  3. Swap the variable names: f−1(x) = x + 53.

Check: f−1(f(x)) = x. The inverse undoes “×3 then −5” with “+5 then ÷3”.

Pause and explainWhy is “subtract 5, then halve” not the inverse of “add 5, then double”?

The most recent operation must be undone first. You need to halve before subtracting 5.

03

Composite functions: work inside out

Sometimes the output of one function becomes the input of another. This is composition: a chain of two rules rather than multiplying their outputs.

Read the inner function first. In f(g(x)), calculate g(x), then put that entire expression into f. Use brackets during substitution so the outer rule acts on the whole inner result. Changing the order generally changes the answer.

gf(x) means g(f(x)): apply f first, then g. The rightmost function acts first.

WORKED EXAMPLE

Let f(x) = 3x − 5 and g(x) = x². Find gf(x) and fg(x).

gf(x) = (3x − 5)²
fg(x) = 3x² − 5

They are generally different. At x = 2, gf(2) = 1 but fg(2) = 7.

WORKED EXAMPLE

Let f(x) = 3x + 2 and g(x) = (3x + 5)². Find fg(x).

fg(x) = 3(3x + 5)² + 2 = 13x² + 10x + 9

Substitute the entire g(x) into the input position of f. Expand the denominator and divide its coefficients and the numerator by 3.

Pause and explainIf g(x) = x + 2 and f(x) = 3x, what is f(g(x))?

First add 2, then multiply the whole result by 3, giving 3(x + 2).

04

Your turn. Track the input.

Identify whether you are evaluating one input, reversing a rule, or chaining two rules. Draw a small input–output arrow diagram if the notation feels compressed.

For an inverse, check that composing it with the original returns the input on the stated domain. For a composite function, test a simple numerical input to verify that you used the intended order.

1

f(x) = 4x + 7. Find f(−2) and f⁻¹(x).

Reveal worked answer
f(−2) = −1. Solving y = 4x + 7 gives f−1(x) = x − 74.
2

f(x) = x + 3 and g(x) = 2x. Find gf(x) and fg(x).

Reveal worked answer
gf(x) = 2(x + 3) = 2x + 6. fg(x) = 2x + 3.
3

For f(x) = x² with domain {−2, −1, 0, 1, 2}, state its range.

Reveal worked answer
Range = {0, 1, 4}. Repeated outputs are listed only once.