➗ Mathematics

Function notation: f(x), composite and inverse functions

Understand f(x) notation, work out composite functions such as fg(x) and find inverse functions, with worked examples for GCSE Higher and Algebra 2.

IntermediateUpdated 5 Nov 2026
GCSEA-LevelHigh School

Curriculum fit: GCSE Maths Algebra (Higher tier). US: Algebra I and II function notation (Interpreting Functions, Building Functions).

On this page

What is it?

A function takes an input, applies a rule and gives exactly one output. We write f(x) = 3x + 2 to mean 'the function f takes x and gives 3x + 2'. The notation f(4) means 'substitute x = 4'.

Functions can be combined (a composite function) or reversed (an inverse function).

Key formulas and ideas

  • f(a) means replace x with a.
  • Composite function: fg(x) = f(g(x)). Do g first, then f.
  • Inverse function f⁻¹(x): swap x and y, then rearrange for y.

Worked examples

Example 1: Substitute

Question: If f(x) = 3x + 2, find f(4).

  1. Replace x with 4: 3 × 4 + 2.
  2. = 12 + 2 = 14.

Answer: 14

Example 2: Composite

Question: f(x) = x² − 1 and g(x) = 2x + 3. Find fg(2).

  1. Work out g(2) = 2 × 2 + 3 = 7.
  2. Then f(7) = 7² − 1 = 48.

Answer: 48

Example 3: Inverse

Question: Find the inverse of f(x) = 3x + 2.

  1. Write y = 3x + 2.
  2. Swap x and y: x = 3y + 2.
  3. Rearrange: y = (x − 2) ÷ 3.

Answer: f⁻¹(x) = (x − 2)/3

Common mistakes

  • Reading f(x) as f multiplied by x.
  • Doing the functions in the wrong order in fg(x): g acts first.
  • Forgetting to swap x and y when finding an inverse.
  • Assuming fg(x) and gf(x) are always equal.

Practice questions

1. If f(x) = 2x + 5, find f(3).
2. If g(x) = x², find g(−4).
3. With f(x) = 2x + 5 and g(x) = x², find f(g(2)).
4. Find the inverse of f(x) = x + 7.
5. If f(x) = 3x, what is f⁻¹(12)?

Frequently asked questions

Do all functions have an inverse?

Only if each output comes from exactly one input. For example f(x) = x² on all real numbers does not have an inverse.

What does domain mean?

The set of all allowed inputs to the function. The range is the set of possible outputs.

Take this guide with you

Get a free printable PDF with the worked examples and quiz answers. Enter your email and the download starts straight away.

Sources and review

Reviewed by StudyMorrow editorial review on 5 Nov 2026.