# Range

## Definition

In mathematics, the range of a function may refer to either of two closely related concepts:

• The codomain of the function
• The image of the function

Given two sets X and Y, a binary relation f between X and Y is a (total) function (from X to Y) if for every x in X there is exactly one y in Y such that f relates x to y. The sets X and Y are called domain and codomain of f, respectively. The image of f is then the subset of Y consisting of only those elements y of Y such that there is at least one x in X with f(x) = y.

In algebra, the range (or codomain) of a function is all of the possible outputs of the function. That is, if x is any element of the domain of some function f, then f(x) is in the range of the function f.

Examples:

• Let $S$ be a set of ordered pairs such that $S=\{(1,2),(2,3),(4,7),(13,9),(-20,0)\}$ . The range is the set of all y values of $S$ , so the range is $\{0,2,3,7,9\}$ .
• The range of $g(x)=1/x$ is all real numbers EXCEPT for 0. We know this because for all nonzero real numbers M, 1/M is a nonzero number and is in the domain of $g(x)$ (since the domain of this function is all nonzero numbers). So, we know that $1/(1/M)=M$ is in the range, where M is all nonzero numbers. There is no real number M such that $1/M=0$ though, which is why 0 is not in the range of $g(x)$ .
• The range of $h(x)=x^{2}+2$ is $[2,\inf )$ . We can see this on the graph of $h(x)$ easily: the lowest point, or vertex, of the parabola is at (0, 2), so 2 is in the range. The parabola extends up to infinity on either side of the vertex, so we know that the range must be all numbers from 2 to infinity.