fg(x) means "do g first, then f". f−1(x) undoes f. Two function operations Cambridge tests every Paper 4. Master the input-substitute-evaluate routine and the rearrange-for-inverse routine, and the marks come easily.
At a glance
fg(x)=f(g(x)) — apply g first, then f.
gf(x)=g(f(x)) — apply f first, then g. ORDER MATTERS.
f(a) means substitute a for the variable in f.
f−1 undoes f: f(f−1(x))=x.
To find f−1: write y=f(x), swap x and y, solve for y.
Inverse exists only when f is one-to-one (each output from a unique input).
Graph of f−1 is the reflection of the graph of f in y=x.
What you’ll learn
Mapped to the Cambridge IGCSE 0580 syllabus (2025-2027).
E2.15 — Use function notation including f(x), fg(x), and f−1(x); find inverse functions.
Function notation refresher
f(x) is the rule. f(3) is the rule applied to the input 3.
Function notation: f(x)= some expression in x. Wherever you see x, substitute the input.
Worked.f(x)=2x+5.
f(3)=2(3)+5=11.
f(−1)=2(−1)+5=3.
f(a+1)=2(a+1)+5=2a+7 — substitute the WHOLE expression a+1 for x.
Numerical inputs are easy. Algebraic inputs are where Cambridge starts catching students out — always wrap the substituted expression in BRACKETS.
f(x): the rule.
f(input): substitute that input for x.
Wrap algebraic substitutions in brackets.
Composite functions
fg(x)=f(g(x)). Apply the inner function first, then the outer.
Definition.fg(x) means "apply g to x, then apply f to the result". Equivalently f(g(x)).
Worked.f(x)=2x+5 and g(x)=x2. Find fg(3).
g(3)=9.
f(g(3))=f(9)=2(9)+5=23.
Algebraically. Find fg(x) as an expression.
g(x)=x2.
fg(x)=f(g(x))=f(x2)=2(x2)+5=2x2+5.
Order matters.gf(x)=g(f(x))=g(2x+5)=(2x+5)2=4x2+20x+25. Different from fg(x).
Graphical view. The graph of f−1 is the reflection of f in the line y=x. Domain and range swap.
Reflecting f in the line y = x produces its inverse — x and y coordinates swap.
Inverse undoes the function.
Method: write y=f(x), swap x↔y, solve for y.
f(f−1(x))=x — use to verify.
Domain of f−1 = range of f, and vice versa.
Self-inverse functions
Some functions are their own inverse: f(f(x))=x.
Some special functions satisfy f−1(x)=f(x). These are called self-inverse.
Examples.
f(x)=x (identity).
f(x)=−x.
f(x)=x1.
f(x)=1a−x for any constant a (e.g. f(x)=5−x).
Test. Compute f(f(x)). If you get back x, the function is self-inverse.
Worked. Is f(x)=x1 self-inverse?
f(f(x))=f(x1)=1/x1=x ✓.
Yes — self-inverse.
Self-inverse: f(f(x))=x.
Test by composing f with itself.
Common: 1/x, −x, a−x.
Quick recap
f(input): substitute the input for x in the rule.
fg(x)=f(g(x)): inner first.
Order matters: fg=gf.
Inverse: write y=f(x), swap, solve for y.
f(f−1(x))=x — useful for verifying.
Graph of f−1 is reflection of f in y=x.
Memorise this
Verbatim phrases and definitions Cambridge mark schemes credit.
Function notation f(x) — assigns one output to each input.
Composite function fg(x)=f(g(x)) — apply g first, then f.
Inverse function f−1(x) — the function that reverses f, satisfying f(f−1(x))=x.
One-to-one function — each output from a unique input. Required for an inverse to exist.
How it’s examined
Composite and inverse functions appear on every Paper 4 — typically 5-7 marks total. Common ask: "find fg(x)", then "find f−1(x)", then "solve fg(x)= value". Examiner reports flag misordered composition (gf vs fg) and arithmetic slips during the swap-and-solve step for inverses.
Step-by-step worked examples — Composite and Inverse of Functions
Step-by-step solutions to past-paper-style questions on composite and inverse of functions, written exactly the way a tutor would explain them at the board.
Question type:
Question patterns to master — Composite and Inverse of Functions
Almost every composite and inverse of functions exam question is one of these shapes. Learn to spot each one and you will always know how to start.
Direct calculation▼
Recognise it by
A single instruction — find fg(x), find f−1(x), find gf(8) — on one or two given functions, with one method.
How to approach it
For a composite, substitute the inner function into the outer. For an inverse, write y=f(x), swap x↔y, then rearrange for y. Show each rearrangement line.
Common trap
Treating f−1(x) as the reciprocal f(x)1, or rearranging for x without swapping first. Examiner reports flag both as recurring errors.
Multi-step problem▼
Recognise it by
Two stages chained — form a composite then solve an equation, or use the y=x property then solve — rather than a single direct instruction.
How to approach it
Build the composite or set up the linking equation first, then solve it as a standard equation. For f(x)=f−1(x), use the shortcut f(x)=x since any intersection lies on y=x.
Common trap
Solving f(x)=f−1(x) the long way by finding f−1 explicitly, or dropping the ± when square-rooting a composite equation.
Show that / prove▼
Recognise it by
The words show that, comment or explain — typically asking you to demonstrate that composition is not commutative.
How to approach it
Compute both fg(x) and gf(x) in full, then finish with an explicit sentence comparing them — e.g. "fg(x)=gf(x), so composition is not commutative".
Common trap
Stopping after computing the two composites without writing the concluding comparison. The conclusion line is a marked point.
Graph or diagram▼
Recognise it by
The question quotes coordinates of points on a graph, or asks for the geometric relationship between y=f(x) and y=f−1(x).
How to approach it
Use the reflection in y=x: each point (a,b) on f becomes (b,a) on f−1. Points on y=x itself are fixed and act as a check.
Common trap
Forgetting to swap the coordinates when reading points off the inverse graph — examiner reports flag candidates copying (a,b) unchanged.
1Form a composite fg(x)
ExtendedDirect calculation• composite
▼
Question
Given f(x)=2x+1 and g(x)=x2, find fg(x).
Step-by-step solution
Step 1
Apply g first, then f to the result.
fg(x)=f(g(x))=f(x2)
Step 2
Substitute x2 into f.
=2(x2)+1=2x2+1
Answer
fg(x)=2x2+1
Examiner tip
fg(x) means apply g FIRST, then f. Reading right-to-left from the inner variable. gf(x) would give a different answer ((2x+1)2).
2Evaluate a composite at a value
ExtendedDirect calculation• composite, evaluation
▼
Question
With f(x)=3x−2 and g(x)=x+1, find gf(8).
Step-by-step solution
Step 1
Compute f(8).
f(8)=3(8)−2=22
Step 2
Apply g to that.
g(22)=22+1=23
Answer
23≈4.80
3Find the inverse of a linear function
ExtendedDirect calculation• Adapted from 0580/42 May/Jun 2024 Q8• inverse
▼
Question
Find f−1(x) when f(x)=32x−5.
Step-by-step solution
Step 1
Write y=f(x).
y=32x−5
Step 2
Swap x and y.
x=32y−5
Step 3
Solve for y.
3x=2y−5⟹y=23x+5
Answer
f−1(x)=23x+5
4Inverse of a quadratic with restricted domain
ExtendedDirect calculation• inverse, quadratic
▼
Question
f(x)=x2−4 for x≥0. Find f−1(x).
Step-by-step solution
Step 1
y=x2−4.
Step 2
Swap and solve.
x=y2−4⟹y2=x+4
Step 3
Take positive root because the domain x≥0 restricts y≥0.
y=x+4
Answer
f−1(x)=x+4
Examiner tip
When inverting a quadratic, restrict to the half that matches the original domain — otherwise the inverse isn't a function.
5Inverse of a simple linear function
CoreDirect calculation• inverse, linear
▼
Question
Find f−1(x) when f(x)=4x−7.
Step-by-step solution
Step 1
Write y=f(x) and swap x and y.
x=4y−7
Step 2
Solve for y.
x+7=4y⟹y=4x+7
Answer
f−1(x)=4x+7
6Show that fg(x)=gf(x)
CoreShow that / prove• composite, non-commutative
▼
Question
Given f(x)=x+3 and g(x)=2x, find fg(x) and gf(x) and comment.
Step-by-step solution
Step 1
fg(x)=f(g(x))=f(2x).
fg(x)=2x+3
Step 2
gf(x)=g(f(x))=g(x+3).
gf(x)=2(x+3)=2x+6
Step 3
fg(x)=gf(x) — composition is not commutative in general.
Answer
fg(x)=2x+3,gf(x)=2x+6 — different.
Examiner tip
The examiner report flags candidates often assume order doesn't matter. Always apply the inner function first.
7Inverse of a rational function
ExtendedDirect calculation• Adapted from 0580/42 Feb/Mar 2024 Q9• inverse, rational
▼
Question
Find f−1(x) when f(x)=x+23, x=−2.
Step-by-step solution
Step 1
Write y=x+23 and swap.
x=y+23
Step 2
Multiply both sides by y+2.
x(y+2)=3
Step 3
Isolate y.
y+2=x3⟹y=x3−2
Answer
f−1(x)=x3−2, x=0
Examiner tip
The mark scheme awards a method mark for cross-multiplying before isolating y. Skipping that step often leads to algebra errors.
8Solve fg(x)=k
ExtendedMulti-step problem• composite, equation
▼
Question
f(x)=2x+1 and g(x)=x2−3. Solve fg(x)=9.
Step-by-step solution
Step 1
Form fg(x).
fg(x)=2(x2−3)+1=2x2−5
Step 2
Set equal to 9.
2x2−5=9⟹2x2=14⟹x2=7
Step 3
Take square roots.
x=±7
Answer
x=±7
9Recognise inverse as reflection in y=x
ChallengeGraph or diagram• inverse, reflection, graph
▼
Question
f(x)=3x−2 passes through (0,−2), (1,1) and (2,4). Find f−1(x) and state three points on its graph. What is the geometric relationship between the two graphs?
Step-by-step solution
Step 1
Find f−1 by swapping and solving.
x=3y−2⟹y=3x+2
Step 2
Each point (a,b) on y=f(x) corresponds to (b,a) on y=f−1(x).
(−2,0),(1,1),(4,2)
Step 3
The graph of y=f−1(x) is the reflection of y=f(x) in the line y=x. Note (1,1) lies on y=x and is fixed.
Answer
f−1(x)=3x+2; points (−2,0),(1,1),(4,2); graphs reflect in y=x.
Examiner tip
The examiner report flags candidates often forget to swap coordinates when reading off points. The fixed point (1,1) on y=x is a useful check.
10Find x with f(x)=f−1(x)
ChallengeMulti-step problem• Adapted from 0580/42 May/Jun 2023 Q14• inverse, fixed point
▼
Question
f(x)=2x−3. Find the value of x where f(x)=f−1(x).
Step-by-step solution
Step 1
Since the graphs of f and f−1 reflect in y=x, any intersection lies on y=x. So f(x)=x.
Step 2
Solve.
2x−3=x⟹x=3
Step 3
Check: f(3)=3, and f−1(3)=(3+3)/2=3. Confirmed.
Answer
x=3
Examiner tip
The mark scheme awards a method mark for using f(x)=x as the shortcut rather than solving f(x)=f−1(x) directly. The examiner report flags this as a common time-saver candidates miss.
Key Formulae — Composite and Inverse of Functions
The formulae you need to memorise for composite and inverse of functions on the Cambridge IGCSE 0580 paper, with every variable defined in plain English and a note on when to use it.
Composite function definition
fg(x)=f(g(x))
When to use
Always read the inner function first. fg(x) → apply g then f.
Inverse-finding method
y=f(x)→swap x↔y→solve for y→f−1(x)=y
When to use
Standard technique for any one-to-one function.
Inverse-composition property
f(f−1(x))=x=f−1(f(x))
When to use
Use to verify that an inverse you've found is correct.
Key Definitions and Keywords — Composite and Inverse of Functions
Definitions to memorise and the exact keywords mark schemes credit for composite and inverse of functions answers — sharpened from recent examiner reports for the 2026 0580 sitting.
Composite function
Examiner keyword
A function formed by applying one function then another. fg(x) means apply g first, then f.
Inverse function (f−1)
Examiner keyword
The function that undoes f. If f(a)=b, then f−1(b)=a.
One-to-one function
A function where each output corresponds to exactly one input. Only one-to-one functions have inverses.
Self-inverse
A function such that f(f(x))=x — its inverse is itself, e.g. f(x)=x1.
Common Mistakes and Misconceptions — Composite and Inverse of Functions
The traps other students keep falling into on composite and inverse of functions questions — taken from recent Cambridge IGCSE 0580 examiner reports and mark schemes — and how to avoid them.
✕Computing fg(x) as gf(x)
0580/42 — recurring
▼
Why it happens
Students apply the leftmost function first.
How to avoid it
fg(x)=f(g(x)) — innermost gets applied FIRST. Mnemonic: "the function closest to x goes first".
✕Treating f−1(x) as f(x)1
▼
Why it happens
The −1 exponent looks like a reciprocal.
How to avoid it
f−1 is the inverse function, NOT the reciprocal. Find it by swapping and solving.
✕Choosing the wrong root when inverting a quadratic
▼
Why it happens
Both + and − are mathematically valid; only one matches the original domain.
How to avoid it
Check which root makes the domain consistent. Original x≥0 → take positive root.
✕Solving for x without swapping first
▼
Why it happens
Students rearrange y=f(x) for x and call THAT the inverse.
How to avoid it
Swap x↔y FIRST, then solve.
Composite and Inverse of Functions — frequently asked questions
The things students keep getting wrong in this sub-topic, answered.