Template:Short description

File:Codomain2.SVG
A function Template:Mvar from Template:Mvar to Template:Mvar. The blue oval Template:Mvar is the codomain of Template:Mvar. The yellow oval inside Template:Mvar is the image of Template:Mvar, and the red oval Template:Mvar is the domain of Template:Mvar.

In mathematics, a codomain, counter-domain, 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 Template:Mvar in the notation Template:Math. 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 Template:Mvar if Template:Mvar is defined as a triple Template:Math where Template:Mvar is called the domain of Template:Mvar, Template:Mvar its codomain, and Template:Mvar its graph.<ref>Template:Harvnb</ref> The set of all elements of the form Template:Math, where Template:Mvar ranges over the elements of the domain Template:Mvar, is called the image of Template:Mvar. 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 Template:Mvar in its codomain for which the equation Template:Math does not have a solution.

A codomain is not part of a function Template:Mvar if Template:Mvar is defined as just a graph.<ref>Template:Harvnb</ref><ref>Template:Harvnb, [[[:Template:Google books]] pp. 10–11]</ref> For example in set theory it is desirable to permit the domain of a function to be a proper class Template:Mvar, in which case there is formally no such thing as a triple Template:Math. With such a definition functions do not have a codomain, although some authors still use it informally after introducing a function in the form Template:Math.<ref>Template:Harvnb, p. 91 ([[[:Template:Google books]] quote 1], [[[:Template:Google books]] quote 2]); Template:Harvnb, [[[:Template:Google books]] p. 8]; Mac Lane, in Template:Harvnb, [[[:Template:Google books]] p. 232]; Template:Harvnb, [[[:Template:Google books]] p. 91]; Template:Harvnb, [[[:Template:Google books]] p. 89]</ref>

ExamplesEdit

For a function

<math>f\colon \mathbb{R}\rightarrow\mathbb{R}</math>

defined by

<math>f\colon\,x\mapsto x^2,</math> or equivalently <math>f(x)\ =\ x^2,</math>

the codomain of Template:Mvar is <math>\textstyle \mathbb R</math>, but Template:Mvar does not map to any negative number. Thus the image of Template:Mvar is the set <math>\textstyle \mathbb{R}^+_0</math>; i.e., the interval Template:Closed-open.

An alternative function Template:Mvar is defined thus:

<math>g\colon\mathbb{R}\rightarrow\mathbb{R}^+_0</math>
<math>g\colon\,x\mapsto x^2.</math>

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

<math>h\colon\,x\mapsto \sqrt x.</math>

The domain of Template:Mvar cannot be <math>\textstyle \mathbb{R}</math> but can be defined to be <math>\textstyle \mathbb{R}^+_0</math>:

<math>h\colon\mathbb{R}^+_0\rightarrow\mathbb{R}.</math>

The compositions are denoted

<math>h \circ f,</math>
<math>h \circ g.</math>

On inspection, Template:Math is not useful. It is true, unless defined otherwise, that the image of Template:Mvar is not known; it is only known that it is a subset of <math>\textstyle \mathbb R</math>. For this reason, it is possible that Template:Mvar, when composed with Template:Mvar, might receive an argument for which no output is defined – negative numbers are not elements of the domain of Template:Mvar, 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, Template:Mvar is a surjection while Template:Mvar 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 <math>\textstyle \mathbb{R}^2</math> to itself, which can be represented by the Template:Math matrices with real coefficients. Each matrix represents a map with the domain <math>\textstyle \mathbb{R}^2</math> and codomain <math>\textstyle \mathbb{R}^2</math>. However, the image is uncertain. Some transformations may have image equal to the whole codomain (in this case the matrices with rank Template:Math) but many do not, instead mapping into some smaller subspace (the matrices with rank Template:Math or Template:Math). Take for example the matrix Template:Mvar given by

<math>T = \begin{pmatrix}

1 & 0 \\ 1 & 0 \end{pmatrix}</math> which represents a linear transformation that maps the point Template:Math to Template:Math. The point Template:Math is not in the image of Template:Mvar, but is still in the codomain since linear transformations from <math>\textstyle \mathbb{R}^2</math> to <math>\textstyle \mathbb{R}^2</math> are of explicit relevance. Just like all Template:Math matrices, Template:Mvar 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 Template:Mvar does not have full rank since its image is smaller than the whole codomain.

See alsoEdit

NotesEdit

Template:Reflist

ReferencesEdit

Template:Mathematical logic