A function is a machine with one output per input
Domain — The set of all values of x for which f(x) is defined. In practice you find it by asking what would break: a denominator becoming zero, or a square root of a negative number.
A function f from a set A to a set B assigns to every element of A exactly one element of B. Written f: A → B, with y = f(x), the input x is the independent variable and the output y the dependent one.
Three sets are involved and the exam distinguishes them. The domain is the set of allowed inputs. The codomain is the set the outputs are drawn from. The range is the set of outputs actually produced, and it can be smaller than the codomain.
| Function | What breaks | Domain |
|---|---|---|
| f(x) = 3x − 5 | nothing | all real x |
| f(x) = 1/(x − 4) | denominator zero at x = 4 | x ≠ 4 |
| f(x) = √(x − 2) | root of a negative below x = 2 | x ≥ 2 |
| f(x) = 1/√(x − 2) | both faults at once | x > 2 |
| f(x) = x² | nothing | all real x, but range y ≥ 0 |
The graph shapes worth knowing by sight
Recognising the family a function belongs to tells you the shape, the domain, the range and the asymptotes before you plot anything. It also catches a wrong table of values in seconds.
- Constant
f(x) = c— a horizontal line. Range is the single value c. - Linear
f(x) = mx + c— a straight line, domain and range both all of ℝ (unless m = 0). - Quadratic
f(x) = ax² + bx + c— a parabola. The range is bounded on one side by the vertex. - Cubic — two turning points at most, ends going opposite ways, range all of ℝ.
- Reciprocal
f(x) = k/x— two branches with both axes as asymptotes. - Exponential
f(x) = aˣ— through (0, 1), never negative, the x-axis an asymptote. - Modulus
f(x) = |x|— a V shape with a corner at the origin; range y ≥ 0.
Look at the reciprocal graph. Two separate branches, and the curve approaches both axes for ever without touching either — x = 0 is excluded from the domain and y = 0 is never in the range.
Types of function, and why bijections matter
The classification you met in Class 9 becomes useful here, because it decides whether a function can be undone.
A function is one-one (injective) if different inputs always give different outputs; onto (surjective) if every element of the codomain is used; and bijective if it is both. Only a bijection has an inverse, because undoing requires each output to identify its input uniquely.
For f(x) = 3x − 7, find f⁻¹(x) and verify that f(f⁻¹(x)) = x.
- Write
y = 3x − 7.Replacing f(x) by y makes the next step easier to see. - Make x the subject:
3x = y + 7, sox = (y + 7)/3.The inverse undoes each operation in reverse order: add 7, then divide by 3. - Swap the letters back:
f⁻¹(x) = (x + 7)/3.By convention the input of any function is called x. - Check:
f(f⁻¹(x)) = 3[(x + 7)/3] − 7 = (x + 7) − 7 = x✓A correct inverse always composes back to x. This check costs one line and catches sign errors.
f⁻¹(x) = (x + 7)/3
Why f(x) = x² has no inverse over all of ℝ
Both 3 and −3 map to 9, so f is not one-one, and asking "which input gave 9" has two answers. Restricting the domain to x ≥ 0 fixes it, and only then is f⁻¹(x) = √x a genuine function. Whenever a question asks you to state a restriction, this is what it is testing.
Composition of functions
The composite (fg)(x), also written f(g(x)), means: apply g first, then apply f to the result. The order in which they are written is the reverse of the order in which they act, which is the source of nearly every error here.
Composition is not commutative: fg and gf are usually different functions, and exam questions are built on exactly that.
If f(x) = x + 4 and g(x) = x², find fg(2) and gf(2).
fg(2) = f(g(2)). Firstg(2) = 4.The inner function acts first, however the composite is written.- Then
f(4) = 4 + 4 = 8. gf(2) = g(f(2)). Firstf(2) = 6, theng(6) = 36.The same two functions in the other order.- 8 ≠ 36, confirming that composition is not commutative.Stating this conclusion is often worth a mark in itself.
fg(2) = 8; gf(2) = 36
Before you leave this chapter
- Domain = allowed inputs. Find it by asking what breaks: a zero denominator or a negative under a square root.
- Range = the outputs actually produced, which may be smaller than the codomain.
- Recognise the seven standard shapes before plotting; the shape checks your table of values.
- Only a bijection has an inverse. Find it by making x the subject, then swapping the letters.
- In f(g(x)) the inner function acts first, and fg is generally not the same as gf.
Inverse functions, and when one exists
An inverse function undoes what the function did. If f takes 3 to 11, then f⁻¹ takes 11 back to 3, and the composition f⁻¹f(x) = x leaves every input exactly where it started.
Not every function has one. If two different inputs share an output, the reverse journey has no way of deciding which input to return to — the undoing is ambiguous. So an inverse exists only when the function is one-to-one, which is what the horizontal line test checks: no horizontal line may cross the graph more than once.
This is why f(x) = x² has no inverse over all real numbers — both 3 and −3 give 9 — but does have one if the domain is restricted to x ⩾ 0. Restricting the domain to force a function to be one-to-one is a standard exam instruction, not a technicality.
The function f is defined by f(x) = 2x − 5 for x ∈ ℝ. Find f⁻¹(x), and state its domain and range.
- Write y = 2x − 5.Naming the output is what makes the next step a matter of ordinary algebra.
- Rearrange for x: y + 5 = 2x, so x = (y + 5)/2.Making x the subject is literally the undoing — you are asking which input produced this output.
- Swap the letters: f⁻¹(x) = (x + 5)/2.The inverse is a function of its own input, so the variable is renamed to x by convention.
- Domain of f⁻¹ = range of f = ℝ. Range of f⁻¹ = domain of f = ℝ.Domain and range always swap, because the arrows have been reversed. This is worth a mark of its own and is regularly forgotten.
f⁻¹(x) = (x + 5)/2, with domain and range both ℝ
The graph of an inverse is a reflection
Reversing every input–output pair swaps the coordinates of every point: (a, b) becomes (b, a). Geometrically that is a reflection in the line y = x. So the graph of f⁻¹ can always be sketched by reflecting the graph of f in that line — and any point where the two graphs meet must lie on y = x, which is often the quickest route to a solution.
Transforming a graph
Four changes to a formula move or reshape its graph in predictable ways. The one that consistently causes trouble is that changes made inside the bracket behave in the opposite direction to expectation, because they act on the input before the function ever sees it.
To get f(x − 3) to produce the value that f gave at 0, you must feed in x = 3. The whole graph therefore arrives 3 units later — a shift to the right, from a minus sign.
| Change | Effect on the graph | Direction |
|---|---|---|
| f(x) + a | translation a units up | outside — as expected |
| f(x + a) | translation a units left | inside — reversed |
| a·f(x) | stretch, scale factor a, from the x-axis | outside — as expected |
| f(ax) | stretch, scale factor 1/a, from the y-axis | inside — reversed |
| −f(x) | reflection in the x-axis | outside |
| f(−x) | reflection in the y-axis | inside |
Order matters when transformations are combined
For something like y = 2f(x + 1) − 3, apply the inside change first (translate 1 left), then the outside ones in the order they act on the output (stretch by 2, then translate 3 down). Applying them in a different order generally lands the curve somewhere else, and questions are set specifically to catch that.