Domain and range, composite functions, inverse functions and their graphs.
Functions are the language of A-Level maths. Every formula, every graph, every equation is a function. Composite functions let you chain operations together — and this is exactly the idea behind the chain rule in calculus. Inverse functions let you “undo” operations — essential for solving equations involving logarithms and trigonometry.
If you can master function notation now, everything that follows at A-Level becomes easier. If you skip this topic, everything becomes harder.
A function is a rule that takes an input and produces exactly one output. We write f(x) to mean “the function f applied to the input x”.
The domain is the set of all valid inputs. The range is the set of all possible outputs.
Some functions break for certain inputs. For example:
So the domain tells us: what inputs are allowed?
| Function | Domain | Range |
|---|---|---|
| f(x)=2x+1 | All real numbers | All real numbers |
| f(x)=x2 | All real numbers | f(x)≥0 |
| f(x)=x | x≥0 | f(x)≥0 |
| f(x)=x1 | x=0 | f(x)=0 |
| f(x)=ln(x) | x>0 | All real numbers |
Key idea: The domain is what you can put in. The range is what comes out. At A-Level, you will often be told the domain — read the question carefully.
Answer at least 3 of 4 correctly to complete this section.
A composite function is one function applied after another. If f and g are two functions, then:
fg(x)=f(g(x))
This means: apply g first, then apply f to the result.
Read fg as ”f of g of x” — right to left.
fg(x) and gf(x) are not the same in general. Let’s see why with a concrete example.
Let f(x)=2x+1 and g(x)=x2.
fg(x)=f(g(x))=f(x2)=2x2+1
gf(x)=g(f(x))=g(2x+1)=(2x+1)2
Try x=3: fg(3)=2(9)+1=19, but gf(3)=(7)2=49. Completely different.
Common mistake: Students think fg means “do f first, then g”. It’s the other way round. Think of it like this: in fg(x), the g is closest to the x, so g acts on x first.
Choose two functions and an input value. Watch how the order of composition changes the result.
fg(3)=19 but gf(3)=49 — order matters!
The domain of fg is the set of inputs x in the domain of g such that g(x) is in the domain of f. In practice:
You can compose a function with itself: ff(x)=f(f(x)). Sometimes written f2(x).
If f(x)=2x+1, then:
ff(x)=f(f(x))=f(2x+1)=2(2x+1)+1=4x+3
Given f(x)=3x−5 and g(x)=x+3, find fg(x) and gf(x).
fg(x)=f(g(x))=f(x+3)=3(x+3)−5=3x+9−5=3x+4
gf(x)=g(f(x))=g(3x−5)=(3x−5)+3=3x−2
Notice: fg(x)=gf(x).
Given f(x)=x2 and g(x)=2x+1, find fg(3).
Work from the inside out: g(3)=2(3)+1=7
Then: f(7)=72=49
So fg(3)=49.
Given f(x)=2x+1 and g(x)=x2, solve fg(x)=19.
First, find fg(x): fg(x)=f(x2)=2x2+1
Now solve: 2x2+1=19⟹2x2=18⟹x2=9⟹x=±3
Answer at least 3 of 4 correctly to complete this section.
The inverse function f−1 undoes what f does. If f takes a to b, then f−1 takes b back to a.
f(a)=b⟺f−1(b)=a
The defining property is:
ff−1(x)=f−1f(x)=x
Applying a function and then its inverse (in either order) gets you back to where you started.
f−1(x) is NOT f(x)1. The notation f−1 means the inverse function. The reciprocal of f(x) would be written [f(x)]−1 or f(x)1. These are completely different things.
For example, if f(x)=2x+1:
A function has an inverse if and only if it is one-to-one — each output comes from exactly one input.
f(x)=2x+1 is one-to-one: every output is produced by exactly one input. It has an inverse.
f(x)=x2 (for all real x) is not one-to-one: f(3)=9 and f(−3)=9. The same output comes from two different inputs. To get an inverse, we must restrict the domain — for example, to x≥0.
This is one of the most important facts about inverse functions:
Domain of f−1=Range of f Range of f−1=Domain of f
The inputs and outputs swap — just as the coordinates swap on the graph.
Find the inverse of f(x)=3x−7.
Write y=3x−7. Swap x and y:
x=3y−7
Rearrange for y:
3y=x+7⟹y=3x+7
So f−1(x)=3x+7.
Check: ff−1(x)=f(3x+7)=3⋅3x+7−7=x+7−7=x ✓
f(x)=x2+4 for x≥0. Find f−1(x) and state its domain.
Write y=x2+4. Swap x and y:
x=y2+4
Rearrange:
y2=x−4⟹y=x−4
We take the positive root because the original domain was x≥0, so the range of f−1 must be ≥0.
f−1(x)=x−4, with domain x≥4 (the range of f).
Show that f(x)=x−32x+1 and g(x)=x−23x+1 are inverses of each other.
Compute fg(x):
fg(x)=f(x−23x+1)=(x−23x+1)−32(x−23x+1)+1
Numerator: x−22(3x+1)+1=x−26x+2+x−2=x−27x
Denominator: x−23x+1−3=x−23x+1−3(x−2)=x−27
So fg(x)=x−27x÷x−27=77x=x ✓
Since fg(x)=x, the functions are inverses.
The graph of f−1 is a reflection of the graph of f in the line y=x.
Why? Because if (a,b) is on the graph of f (meaning f(a)=b), then (b,a) is on the graph of f−1 (meaning f−1(b)=a). Swapping coordinates is exactly what reflection in y=x does.
Drag the point on f(x) and watch how (a, b) becomes (b, a) on the inverse.
Point on f: (1.50, 4) → Point on f⁻¹: (4, 1.50) — the coordinates swap.
Answer at least 3 of 4 correctly to complete this section.
The function f is defined by f(x)=2x2−8x+11 for x≥2.
(a) Express f(x) in the form a(x−b)2+c. (b) Find the range of f. (c) Find f−1(x) and state its domain.
(a) Complete the square:
f(x)=2(x2−4x)+11=2[(x−2)2−4]+11=2(x−2)2−8+11=2(x−2)2+3
(b) Since x≥2, we have (x−2)2≥0, so f(x)≥3.
Range: f(x)≥3.
(c) Write y=2(x−2)2+3. Swap x and y:
x=2(y−2)2+3
2(y−2)2=x−3
(y−2)2=2x−3
y−2=2x−3
(Positive root because y≥2 from the original domain.)
f−1(x)=2+2x−3
Domain of f−1: x≥3 (the range of f).
f(x)=4x−3. Find f−1(x) and solve ff−1(2x)=x+7.
First, find the inverse. Write y=4x−3, swap: x=4y−3, rearrange: y=4x+3.
So f−1(x)=4x+3.
Now, ff−1(2x)=2x (since ff−1 always gives x back, and here the input is 2x).
So: 2x=x+7⟹x=7.
| Task | Method |
|---|---|
| Find fg(x) | Substitute g(x) into f: replace every x in f with g(x) |
| Find gf(x) | Substitute f(x) into g: replace every x in g with f(x) |
| Evaluate fg(a) | Find g(a) first, then apply f to the result |
| Find f−1(x) | Write y=f(x), swap x and y, rearrange for y |
| Domain of f−1 | Same as the range of f |
| Solve fg(x)=k | First find the expression for fg(x), then solve the equation |
| Show two functions are inverses | Show that fg(x)=gf(x)=x |
| Sketch f−1 | Reflect the graph of f in the line y=x |
Answer at least 3 of 4 correctly to complete this section.
Lock in what you've learned with exam-style questions and spaced repetition.