Mapping Functions
Not every rule that connects inputs to outputs deserves to be called a function. Before chaining functions together or running them backwards, it pays to be precise about what a function actually is — and exactly which inputs and outputs it's allowed to touch.
What is a mapping?
A mapping is any rule that connects each element of one set (the inputs) to one or more elements of another set (the outputs). A function is a special, more restrictive kind of mapping: one where every input is sent to exactly one output — never zero, never two or more. We write $f:x \mapsto x^2$ or $f(x)=x^2$ to mean "$f$ sends $x$ to $x^2$".
The set of permitted inputs is the domain; the set of outputs the mapping actually produces is the range (sometimes called the image). Both must always be stated, or inferable from context, for a function to be fully defined — the same algebraic rule can behave completely differently depending on what domain it's paired with.
Four types of mapping
Every mapping falls into exactly one of four categories, depending on how many outputs each input produces and how many inputs share each output:
One-one (injective): every input has its own distinct output — no two different inputs ever share an output. Example: $f(x)=2x+1$.
Many-one: every input has exactly one output, but different inputs are allowed to share an output. Example: $f(x)=x^2$, since $f(2)=f(-2)=4$.
One-many: a single input produces more than one output. Example: "$y$ such that $y^2=x$" sends $x=4$ to both $y=2$ and $y=-2$.
Many-many: some inputs produce multiple outputs, and some outputs come from multiple inputs at once.
Only one-one and many-one mappings qualify as functions, since both send every input to a single output. One-many and many-many mappings fail the basic requirement of a function and are excluded entirely.
On a graph, the vertical line test checks whether a mapping is a function at all: if any vertical line crosses the graph more than once, some input produces two different outputs, so it isn't a function. The horizontal line test then distinguishes one-one from many-one: if every horizontal line crosses the graph at most once, the function is one-one; if some horizontal line crosses it more than once, the function is many-one.
Whether a function is one-one turns out to be the deciding factor in whether it can be run backwards at all — a question taken up in full once composite functions have been covered.
Domain and range
Finding the domain of a function defined by an algebraic expression means asking: for which real values of $x$ does this expression actually produce a real number? Two restrictions come up constantly in A-level work:
Division by zero: if $f(x)$ contains a fraction $\frac{1}{g(x)}$, then $g(x)\neq0$ must be excluded from the domain.
Square roots: if $f(x)$ contains $\sqrt{g(x)}$, then $g(x)\ge0$ is required for a real output, so the domain is restricted accordingly.
Finding the range is a different exercise: it means tracking what values the output actually takes as $x$ varies across the whole domain — often done by completing the square (for a quadratic), considering the graph's turning points, or checking which values an expression can never reach (such as a horizontal asymptote for a reciprocal function).
Worked example 1
Every distinct source of restriction in an expression — every fraction, every square root — contributes its own condition. Missing one of them is the most common error when finding a domain.
Worked example 2
Worked example 3
Restricting a many-one function's domain until it becomes one-one — exactly as done here — is precisely the technique used later to make a function invertible.
Mixing up domain and range — writing a restriction on $x$ when the question asks for the set of possible $f(x)$ values, or vice versa. The domain lives on the input axis; the range lives on the output axis. It's also easy to find only one of two restrictions on a domain (e.g. checking a square root but forgetting a fraction in the same expression) — always scan the whole expression for every source of restriction.
Check yourself
$f(x) = \dfrac{3}{x+1} - 2$. State the domain of $f$, and find its range.
(Hint: for the range, ask whether the output can ever actually equal −2.)