Range of a Function

Functions & Advanced Algebra

The range of a function is the set of all possible output values produced by the function.

Visualization

Definition

The range is the set of all possible outputs a function can actually produce (as opposed to the domain, which is the inputs allowed): after substituting every value in the domain, the range is every output value that is actually achievable. Formally, the range (or image) of $f: A \to B$ is the set $f(A) = \{f(a) : a \in A\}$, a subset of the codomain $B$; a function is surjective (onto) if and only if its range equals its codomain.

Example

If $f(x) = x^2$, outputs are always $0$ or positive since squaring never produces a negative number, so the range is $[0, \infty)$. For $f(x) = 2x + 1$ on all real numbers, every real $y$ is achievable by solving $y = 2x + 1$ for $x$, so the range is all reals, while for $g(x) = x^2$ no negative $y$ is achievable. Finding the range analytically can require more than algebraic inversion: for $f(x) = (x^2 - 1)/(x^2 + 1)$, bounding analysis shows $-1 < f(x) < 1$ for all real $x$, so the range is $(-1, 1)$.

Key Insight

The range is sometimes called the image of the function, and distinguishing it from the codomain matters in determining whether a function is surjective. For measurable functions in real analysis, the range interacts with measure theory: preimages of measurable sets must be measurable for the function to be measurable.