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.
GCSEA-LevelHigh SchoolCurriculum 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).
- Replace x with 4: 3 × 4 + 2.
- = 12 + 2 = 14.
Answer: 14
Example 2: Composite
Question: f(x) = x² − 1 and g(x) = 2x + 3. Find fg(2).
- Work out g(2) = 2 × 2 + 3 = 7.
- Then f(7) = 7² − 1 = 48.
Answer: 48
Example 3: Inverse
Question: Find the inverse of f(x) = 3x + 2.
- Write y = 3x + 2.
- Swap x and y: x = 3y + 2.
- 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
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.
Related guides
Rearranging formulae: how to change the subject
Make any letter the subject of a formula using inverse operations, with worked examples including squares and square roots.
GCSEHigh SchoolQuadratic graphs: roots, turning points and symmetry
Sketch parabolas and find the roots, y-intercept, line of symmetry and turning point (vertex) of a quadratic, with step-by-step worked examples.
GCSEA-LevelHigh SchoolSolving linear equations step by step (with examples)
Learn the balance method for solving linear equations, including brackets and x on both sides, with worked examples for GCSE and Algebra 1.
KS3GCSEMiddle SchoolHigh SchoolSources and review
- DfE: GCSE mathematics subject content and assessment objectives
- Common Core State Standards: Mathematics (high school)
Reviewed by StudyMorrow editorial review on 5 Nov 2026.