Range

From Conservapedia
Jump to navigation Jump to search

In mathematics, the range (or image) of a function are the values it hits. It is not to be confused with the codomain of a function, which is a designated set to which all the values of the function belong.

A function is onto (or surjective) if every value in its codomain is hit by the function, or, equivalently, if its range is equal to its codomain. More formally, a function <math>f: A \to B</math> is onto if for every <math>y \in B</math> there exists <math>x \in A</math> such that <math>f(x) = y</math>.

Examples

Let <math>f: \mathbb{R} \to \mathbb{R}</math> be the function defined by the equation <math>f(x) = x^2</math>. By definition, the codomain of <math>f</math> is <math>\mathbb{R}</math>. However, the range of <math>f</math> consists of all nonnegative real numbers. Indeed, let <math>y</math> be a nonnegative real number. Then <math>f(\sqrt{y}) = y</math>, and so <math>y</math> is one of the values hit by <math>f</math>.

Let <math>g: \mathbb{R} \to \mathbb{R}</math> be the function defined by the equation <math>g(x) = x + 1</math>. Then, for every real number <math>y</math>, we can see that <math>g(y-1) = (y-1) + 1 = y</math>, so every real number is hit by <math>g</math>. This means that the codomain and range of <math>g</math> are equal, namely <math>\mathbb{R}</math>. Therefore, <math>g</math> is onto.

Non-mathematical uses