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.
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.
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.
Worked examples, formulae, definitions and the mistakes examiners flag — everything you need to push from a pass to an A*.
Take this whole topic with you
Download a branded revision sheet — worked examples, formulae, definitions and common mistakes for Composite and Inverse of Functions, ready to print or save as PDF.
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.
1Form a composite fg(x)
Extended• 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
Extended• 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
Extended• 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
Extended• 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
Core• 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)
Core• 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
Extended• 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
Extended• 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
Challenge• 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)
Challenge• 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.
Practice questions
Exam-style questions with step-by-step worked solutions. Try one before checking the method.
Past paper style quiz
Get a report showing which sub-topics you've nailed and which ones still need work.
4. Exam Quiz
Assess your understanding
Attempt a past paper style quiz for this sub-topic and get instant feedback to identify your strengths and weaknesses.
Instant AI marking SchemeExaminer's feedbackAI Detailed report
Video lesson
Short walkthrough of the concepts students most often get stuck on.
Composite and Inverse of Functions — frequently asked questions
The things students keep getting wrong in this sub-topic, answered.