Range of a function

From HandWiki
Revision as of 19:33, 6 February 2024 by CodeMe (talk | contribs) (linkage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Subset of a function's codomain
[math]\displaystyle{ f }[/math] is a function from domain X to codomain Y. The yellow oval inside Y is the image of [math]\displaystyle{ f }[/math]. Sometimes "range" refers to the image and sometimes to the codomain.

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

In some cases the codomain and the image of a function are the same set; such a function is called surjective or onto. For any non-surjective function [math]\displaystyle{ f: X \to Y, }[/math] the codomain [math]\displaystyle{ Y }[/math] and the image [math]\displaystyle{ \tilde Y }[/math] are different; however, a new function can be defined with the original function's image as its codomain, [math]\displaystyle{ \tilde{f}: X \to \tilde{Y} }[/math] where [math]\displaystyle{ \tilde{f}(x) = f(x). }[/math] This new function is surjective.

Definitions

Given two sets X and Y, a binary relation f between X and Y is a function (from X to Y) if for every element x in X there is exactly one y in Y such that f relates x to y. The sets X and Y are called the domain and codomain of f, respectively. The image of the function f is 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.

Usage

As the term "range" can have different meanings, it is considered a good practice to define it the first time it is used in a textbook or article. Older books, when they use the word "range", tend to use it to mean what is now called the codomain.({{{1}}}, {{{2}}}) More modern books, if they use the word "range" at all, generally use it to mean what is now called the image.[1] To avoid any confusion, a number of modern books don't use the word "range" at all.[2]

Elaboration and example

Given a function

[math]\displaystyle{ f \colon X \to Y }[/math]

with domain [math]\displaystyle{ X }[/math], the range of [math]\displaystyle{ f }[/math], sometimes denoted [math]\displaystyle{ \operatorname{ran}(f) }[/math] or [math]\displaystyle{ \operatorname{Range}(f) }[/math],[3] may refer to the codomain or target set [math]\displaystyle{ Y }[/math] (i.e., the set into which all of the output of [math]\displaystyle{ f }[/math] is constrained to fall), or to [math]\displaystyle{ f(X) }[/math], the image of the domain of [math]\displaystyle{ f }[/math] under [math]\displaystyle{ f }[/math] (i.e., the subset of [math]\displaystyle{ Y }[/math] consisting of all actual outputs of [math]\displaystyle{ f }[/math]). The image of a function is always a subset of the codomain of the function.[4]

As an example of the two different usages, consider the function [math]\displaystyle{ f(x) = x^2 }[/math] as it is used in real analysis (that is, as a function that inputs a real number and outputs its square). In this case, its codomain is the set of real numbers [math]\displaystyle{ \mathbb{R} }[/math], but its image is the set of non-negative real numbers [math]\displaystyle{ \mathbb{R}^+ }[/math], since [math]\displaystyle{ x^2 }[/math] is never negative if [math]\displaystyle{ x }[/math] is real. For this function, if we use "range" to mean codomain, it refers to [math]\displaystyle{ \mathbb{{\displaystyle \mathbb {R} ^{}}} }[/math]; if we use "range" to mean image, it refers to [math]\displaystyle{ \mathbb{R}^+ }[/math].

For some functions, the image and the codomain coincide; these functions are called surjective or onto. For example, consider the function [math]\displaystyle{ f(x) = 2x, }[/math] which inputs a real number and outputs its double. For this function, both the codomain and the image are the set of all real numbers, so the word range is unambiguous.

Even in cases where the image and codomain of a function are different, a new function can be uniquely defined with its codomain as the image of the original function. For example, as a function from the integers to the integers, the doubling function [math]\displaystyle{ f(n) = 2n }[/math] is not surjective because only the even integers are part of the image. However, a new function [math]\displaystyle{ \tilde{f}(n) = 2n }[/math] whose domain is the integers and whose codomain is the even integers is surjective. For [math]\displaystyle{ \tilde{f}, }[/math] the word range is unambiguous.

See also

Notes and references

Bibliography