Codomain Explained

In mathematics, a codomain or set of destination of a function is a set into which all of the output of the function is constrained to fall. It is the set in the notation . The term range is sometimes ambiguously used to refer to either the codomain or the image of a function.

A codomain is part of a function if is defined as a triple where is called the domain of, its codomain, and its graph. The set of all elements of the form, where ranges over the elements of the domain, is called the image of . The image of a function is a subset of its codomain so it might not coincide with it. Namely, a function that is not surjective has elements in its codomain for which the equation does not have a solution.

A codomain is not part of a function if is defined as just a graph.[1] For example in set theory it is desirable to permit the domain of a function to be a proper class, in which case there is formally no such thing as a triple . With such a definition functions do not have a codomain, although some authors still use it informally after introducing a function in the form .[2]

Examples

For a function

f\colonRR

defined by

f\colonx\mapstox2,

or equivalently

f(x) = x2,

the codomain of is

styleR

, but does not map to any negative number. Thus the image of is the set
+
styleR
0
; i.e., the interval .

An alternative function is defined thus:

+
g\colonRR
0

g\colonx\mapstox2.

While and map a given to the same number, they are not, in this view, the same function because they have different codomains. A third function can be defined to demonstrate why:

h\colonx\mapsto\sqrtx.

The domain of cannot be

styleR

but can be defined to be
+
styleR
0
:
+
h\colonR
0 → R.

The compositions are denoted

h\circf,

h\circg.

On inspection, is not useful. It is true, unless defined otherwise, that the image of is not known; it is only known that it is a subset of

styleR

. For this reason, it is possible that, when composed with, might receive an argument for which no output is defined – negative numbers are not elements of the domain of, which is the square root function.

Function composition therefore is a useful notion 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 a subset of 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, is a surjection while 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

styleR2

to itself, which can be represented by the matrices with real coefficients. Each matrix represents a map with the domain

styleR2

and codomain

styleR2

. However, the image is uncertain. Some transformations may have image equal to the whole codomain (in this case the matrices with rank) but many do not, instead mapping into some smaller subspace (the matrices with rank or). Take for example the matrix given by

T=\begin{pmatrix} 1&0\\ 1&0\end{pmatrix}

which represents a linear transformation that maps the point to . The point is not in the image of, but is still in the codomain since linear transformations from

styleR2

to

styleR2

are of explicit relevance. Just like all matrices, 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 does not have full rank since its image is smaller than the whole codomain.

See also

References

Notes and References

  1. , [{{Google books|plainurl=y|id=mVeTuaRwWssC|page=10|text=Some mathematical cultures make this explicit, saying that a function}} pp. 10–11]
  2. , p. 91 ([{{Google books|plainurl=y|id=ImCSX_gm40oC|page=91|text=The reader may wonder at this variety of ways of thinking about a function}} quote 1], [{{Google books|plainurl=y|id=ImCSX_gm40oC|page=91|text=When defining a function using a formula it is important to be clear about which sets are the domain and the codomain of the function}} quote 2]);, [{{Google books|plainurl=y|id=MXboNPdTv7QC|page=8|text=Here "function" means a function with specified domain and specified codomain}} p. 8]; Mac Lane, in, [{{Google books|plainurl=y|id=5mf4Vckj0gEC|page=232|text=Note explicitly that the notion of function is not that customary in axiomatic set theory}} p. 232];, [{{Google books|plainurl=y|id=IGvDpe6hYiQC|page=91|text=Functions as sets of ordered pairs}} p. 91];, [{{Google books|plainurl=y|id=TLelvnIU2sEC|page=89|text=Strictly speaking we cannot talk of 'the' codomain of a function}} p. 89]