Examples
For a function
defined by
- , or equivalently ,
the codomain of f is, but f does not map to any negative number. Thus the image of f is the set ; i.e., the interval [0, ∞).
An alternative function g is defined thus:
While f and g map a given x to the same number, they are not, in this view, the same function because they have different codomains. A third function h can be defined to demonstrate why:
The domain of h must be defined to be :
- .
The compositions are defined
- ,
- .
On inspection, h ∘ f is not useful. It is true, unless defined otherwise, that the image of f is not known; it is only known that it is a subset of . For this reason, it is possible that h, when composed on f, might receive an argument for which no output is defined – negative numbers are not elements of the domain of h, which is the square root function.
Function composition therefore is a useful notation only when the codomain of the function on the right side of a composition (not its image, which is a consequence of the function and could be unknown at the level of the composition) is the same as the domain of the function on the left side.
The codomain affects whether a function is a surjection, in that the function is surjective if and only if its codomain equals its image. In the example, g is a surjection while f is not. The codomain does not affect whether a function is an injection.
A second example of the difference between codomain and image is demonstrated by the linear transformations between two vector spaces – in particular, all the linear transformations from to itself, which can be represented by the 2×2 matrices with real coefficients. Each matrix represents a map with the domain and codomain . However, the image is uncertain. Some transformations may have image equal to the whole codomain (in this case the matrices with rank 2) but many do not, instead mapping into some smaller subspace (the matrices with rank 1 or 0). Take for example the matrix T given by
which represents a linear transformation that maps the point (x, y) to (x, x). The point (2, 3) is not in the image of T, but is still in the codomain since linear transformations from to are of explicit relevance. Just like all 2×2 matrices, T represents a member of that set. Examining the differences between the image and codomain can often be useful for discovering properties of the function in question. For example, it can be concluded that T does not have full rank since its image is smaller than the whole codomain.
Read more about this topic: Codomain
Famous quotes containing the word examples:
“There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.”
—Bernard Mandeville (16701733)
“No rules exist, and examples are simply life-savers answering the appeals of rules making vain attempts to exist.”
—André Breton (18961966)
“It is hardly to be believed how spiritual reflections when mixed with a little physics can hold peoples attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.”
—G.C. (Georg Christoph)