codomain

{{Short description|Target set of a mathematical function}}

File:Codomain2.SVG of {{mvar|f}}, and the red oval {{mvar|X}} is the domain of {{mvar|f}}.]]

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 {{mvar|Y}} in the notation {{math|f: XY}}. 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 {{mvar|f}} if {{mvar|f}} is defined as a triple {{math|(X, Y, G)}} where {{mvar|X}} is called the domain of {{mvar|f}}, {{mvar|Y}} its codomain, and {{mvar|G}} its graph.{{Harvnb|Bourbaki|1970|p=76}} The set of all elements of the form {{math|f(x)}}, where {{mvar|x}} ranges over the elements of the domain {{mvar|X}}, is called the image of {{mvar|f}}. 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 {{mvar|y}} in its codomain for which the equation {{math|1=f(x) = y}} does not have a solution.

A codomain is not part of a function {{mvar|f}} if {{mvar|f}} is defined as just a graph.{{Harvnb|Bourbaki|1970|p=77}}{{Harvnb|Forster|2003}}, [{{Google books|plainurl=y|id=mVeTuaRwWssC|page=10|text=Some mathematical cultures make this explicit, saying that a function}} pp. 10–11] For example in set theory it is desirable to permit the domain of a function to be a proper class {{mvar|X}}, in which case there is formally no such thing as a triple {{math|(X, Y, G)}}. With such a definition functions do not have a codomain, although some authors still use it informally after introducing a function in the form {{math|f: XY}}.{{Harvnb|Eccles|1997}}, 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]); {{Harvnb|Mac Lane|1998}}, [{{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 {{Harvnb|Scott|Jech|1967}}, [{{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]; {{Harvnb|Sharma|2004}}, [{{Google books|plainurl=y|id=IGvDpe6hYiQC|page=91|text=Functions as sets of ordered pairs}} p. 91]; {{Harvnb|Stewart|Tall|1977}}, [{{Google books|plainurl=y|id=TLelvnIU2sEC|page=89|text=Strictly speaking we cannot talk of 'the' codomain of a function}} p. 89]

Examples

For a function

:f\colon \mathbb{R}\rightarrow\mathbb{R}

defined by

: f\colon\,x\mapsto x^2, or equivalently f(x)\ =\ x^2,

the codomain of {{mvar|f}} is \textstyle \mathbb R, but {{mvar|f}} does not map to any negative number.

Thus the image of {{mvar|f}} is the set \textstyle \mathbb{R}^+_0; i.e., the interval {{closed-open|0, ∞}}.

An alternative function {{mvar|g}} is defined thus:

: g\colon\mathbb{R}\rightarrow\mathbb{R}^+_0

: g\colon\,x\mapsto x^2.

While {{mvar|f}} and {{mvar|g}} map a given {{mvar|x}} to the same number, they are not, in this view, the same function because they have different codomains. A third function {{mvar|h}} can be defined to demonstrate why:

: h\colon\,x\mapsto \sqrt x.

The domain of {{mvar|h}} cannot be \textstyle \mathbb{R} but can be defined to be \textstyle \mathbb{R}^+_0:

: h\colon\mathbb{R}^+_0\rightarrow\mathbb{R}.

The compositions are denoted

: h \circ f,

: h \circ g.

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

:T = \begin{pmatrix}

1 & 0 \\

1 & 0 \end{pmatrix}

which represents a linear transformation that maps the point {{math|(x, y)}} to {{math|(x, x)}}. The point {{math|(2, 3)}} is not in the image of {{mvar|T}}, but is still in the codomain since linear transformations from \textstyle \mathbb{R}^2 to \textstyle \mathbb{R}^2 are of explicit relevance. Just like all {{math|2×2}} matrices, {{mvar|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 {{mvar|T}} does not have full rank since its image is smaller than the whole codomain.

See also

  • {{annotated link|Bijection}}
  • {{slink|Morphism|Codomain}}
  • {{Annotated link|Endofunction#Endofunctions|Endofunction}}

Notes

{{reflist}}

References

  • {{cite book |last=Bourbaki |first=Nicolas |title=Théorie des ensembles |year=1970 |publisher=Springer |series=Éléments de mathématique |author-link=Nicolas Bourbaki |isbn=9783540340348}}
  • {{citation |authorlink1=Peter Eccles (mathematician) |title=An Introduction to Mathematical Reasoning: Numbers, Sets, and Functions |first=Peter J. |last=Eccles |publisher=Cambridge University Press |year=1997 |isbn=978-0-521-59718-0}}
  • {{citation |title=Logic, Induction and Sets |last=Forster |first=Thomas |publisher=Cambridge University Press |year=2003 |isbn=978-0-521-53361-4 |author-link=Thomas Forster (mathematician)}}
  • {{citation |title=Categories for the working mathematician |first=Saunders |last=Mac Lane |edition=2nd |publisher=Springer |year=1998 |isbn=978-0-387-98403-2 |author-link=Saunders Mac Lane}}
  • {{citation |title=Axiomatic set theory |series=Symposium in Pure Mathematics |first1=Dana S. |last1=Scott |first2=Thomas J. |author-link=Dana Scott |last2=Jech |publisher=American Mathematical Society |year=1967 |isbn=978-0-8218-0245-8}}
  • {{citation|title=Introduction To Set Theory|first=A.K.|last= Sharma|publisher=Discovery Publishing House|year= 2004|isbn=978-81-7141-877-0}}
  • {{citation |title=The foundations of mathematics |first1=Ian |last1=Stewart |first2=David Orme |author-link=Ian Stewart (mathematician) |author-link2=David Tall |last2=Tall |publisher=Oxford University Press |year=1977 |isbn=978-0-19-853165-4}}

{{Mathematical logic}}

Category:Functions and mappings

Category:Basic concepts in set theory