A function $f$ from $A$ to $B$, written $f : A \to B$, is a special relation in which every element of $A$ is paired with exactly one element of $B$. Two conditions are packed into "exactly one":
- Existence: no input is left out — every $a \in A$ has an image.
- Uniqueness: no input has two outputs — you can never have both $(a, b)$ and $(a, c)$ with $b \ne c$.
We write $b = f(a)$ for the unique image of $a$. The set $A$ is the domain, $B$ the codomain, and the set of actual images $\{f(a) : a \in A\}$ is the range (a subset of $B$). The quick visual test: in an arrow diagram, every dot of $A$ must have exactly one arrow leaving it.
Real functions and natural domain. A real function has domain and codomain that are subsets of $\mathbb{R}$. When a function is given only by a formula, its natural domain is the largest set of real inputs for which the formula gives a real number. Two rules cover almost every case: a denominator may not be zero, and the expression under an even root must not be negative.
Standard real functions and their graphs. These recur throughout the syllabus and are worth memorising:
| Function | Rule | Domain | Range |
|---|---|---|---|
| Identity | $f(x) = x$ | $\mathbb{R}$ | $\mathbb{R}$ |
| Constant | $f(x) = c$ | $\mathbb{R}$ | $\{c\}$ |
| Polynomial | $f(x) = a_n x^n + \dots + a_0$ | $\mathbb{R}$ | depends on degree |
| Rational | $f(x) = \dfrac{p(x)}{q(x)}$ | $\{x : q(x) \ne 0\}$ | depends |
| Modulus | $f(x) = |x|$ | $\mathbb{R}$ | $[0, \infty)$ |
| Signum | $f(x) = \dfrac{|x|}{x},\ x \ne 0$ | $\mathbb{R}$ | $\{-1, 0, 1\}$ |
| Greatest integer | $f(x) = [x]$ | $\mathbb{R}$ | $\mathbb{Z}$ |
The modulus function $|x|$ equals $x$ for $x \ge 0$ and $-x$ for $x < 0$ — a V-shaped graph with its vertex at the origin. The signum function returns the sign of $x$ ($1$ if positive, $-1$ if negative, $0$ at zero). The greatest-integer (floor) function $[x]$ gives the greatest integer not exceeding $x$, so $[2.7] = 2$ but $[-2.7] = -3$ (it rounds down, towards $-\infty$); its graph is a staircase of horizontal steps.
Algebra of real functions. If $f$ and $g$ are real functions with domains $D_f$ and $D_g$, new functions are built pointwise on the common domain $D_f \cap D_g$:
The sum, difference and product are defined on $D_f \cap D_g$; the quotient $f/g$ additionally excludes the points where $g(x) = 0$, and $cf$ is the scalar multiple by a real constant $c$.
Finding domain and range of an expression. For the domain, list every constraint (no zero denominators, no negative even-roots) and intersect them. For the range, reason about the output: a square root is $\ge 0$; a modulus is $\ge 0$; a square is $\ge 0$; then track how these shift and scale. For example $|x - 2| + 1 \ge 1$, so its range is $[1, \infty)$.
Deeper Insight — "exactly one output" is the whole idea, and everything downstream depends on it: A function is not just any rule connecting inputs to outputs; it is the disciplined kind where each input commits to a single answer. That one restriction is what makes $f(a)$ a well-defined thing you can compute, graph, differentiate and integrate later — if an input could have two outputs, "the value of $f$ at $a$" would be meaningless. The vertical-line test for graphs is exactly this rule drawn out: any vertical line meets the graph at most once. Everything you will study in Limits, Continuity, Differentiation and Integration is the study of functions, so the habit to build now is automatic: before trusting any formula, ask "what inputs are legal?" (the domain) and "does each give one output?" (the function condition). Get those two reflexes right and the rest of calculus has a solid floor to stand on.