# Range (mathematics)

In mathematics, the range of a function is the set of all "output" values produced by that function. Sometimes called the image, or more precisely, the image of the domain of the function.

## Formal definition

Given a function [itex]f\colon A\rightarrow B[itex], the range of [itex]f[itex] is defined to be the set

[itex] \{ x \in B : x = f(a) \mbox{ for some } a \in A \}.[itex]

The range should not be confused with the codomain B. The range is a subset of the codomain, but is not necessarily equal to the codomain, since there may be elements of the codomain which are not elements of the range. Another way to think about this is to consider the codomain to be the set of all possible output values, while the range is the set of all actual outputs. Beware that sometimes the codomain is incorrectly called the range because of a failure to distinguish between possible and actual values. Those functions whose range equals its codomain, are called onto or surjective.

## Examples

Let the function f be a function on the real numbers:

[itex]f\colon \mathbb{R}\rightarrow\mathbb{R}[itex]

defined by

[itex]f(x) = x^2[itex]

The codomain of f is R, but clearly f(x) never takes negative values, and thus the range is in fact the set R+—non-negative reals, i.e. the interval [0,∞):

[itex]0\leq f(x)<\infty.[itex]

Now let g be a function on the real numbers:

[itex]g\colon \mathbb{R}\rightarrow\mathbb{R}[itex]

defined by

[itex]g(x) = 2x[itex]

In this case the image of g equals R, it's codomain, since, for any real number y,

[itex] g(y/2) = y.[itex]

In other words, g is onto R.

• Art and Cultures
• Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
• Space and Astronomy