Codomain: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
mNo edit summary
 
(43 intermediate revisions by 27 users not shown)
Line 1: Line 1:
{{Short description|Target set of a mathematical function}}
[[File:Codomain2.SVG|right|thumb|250px|A function {{math|'''f'''}} from {{math|'''X'''}} to {{math|'''Y'''}}. The large blue oval is {{math|'''Y'''}} which is the codomain of {{math|'''f'''}}{{nbsp}}. The smaller (yellow) oval inside {{math|'''Y'''}} is the [[image (mathematics)|image]] of {{math|'''f'''}}{{nbsp}}.]]
[[File:Codomain2.SVG|right|thumb|250px|A function {{mvar|f}} from {{mvar|X}} to {{mvar|Y}}. The blue oval {{mvar|Y}} is the codomain of {{mvar|f}}. The yellow oval inside {{mvar|Y}} is the [[Image (mathematics)|image]] of {{mvar|f}}, and the red oval {{mvar|X}} is the [[Domain of a function|domain]] of {{mvar|f}}.]]


In mathematics, the '''codomain''' or '''target set''' of a [[Function (mathematics)|function]] is the [[Set (mathematics)|set]] {{mvar|Y}} into which all of the [[output (mathematics)|output]] of the function is constrained to fall. It is the set {{mvar|Y}} in the notation {{math|''f'': ''X'' → ''Y''}}. The codomain is sometimes referred to as the [[range (mathematics)|range]], but that term is ambiguous as it may also refer to the [[image (mathematics)|image]].
In [[mathematics]], a '''codomain''' or '''set of destination''' of a [[Function (mathematics)|function]] is a [[Set (mathematics)|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'': ''X'' → ''Y''}}. The term '''''[[Range of a function|range]]''''' is sometimes ambiguously used to refer to either the codomain or the [[Image (mathematics)|''image'']] of a function.


The codomain is part of a function {{mvar|f}} if it is defined as described in 1954 by [[Nicolas Bourbaki]],<ref>{{cite book |title=Elements de Mathematique,Theorie des Ensembles |author=N.Bourbaki |authorlink=Nicolas Bourbaki |publisher=Hermann & cie |page=76 |year=1954}}</ref> namely a triple {{math|(''X'', ''Y'', ''F'')}}, with {{mvar|F}} a functional subset<ref>A set of pairs is ''functional'' iff no two distinct pairs have the same first component [Bourbaki, ''op. cit.'', p. 76]</ref> of the [[Cartesian product]] {{math|''X'' × ''Y''}} and {{math|''X''}} is the set of first components of the pairs in {{mvar|F}} (the ''domain''). The set {{mvar|F}} is called the ''graph'' of the function. The set of all elements of the form {{math|''f''(''x'')}}, where {{mvar|x}} ranges over the elements of the [[domain of a function|domain]] {{mvar|X}}, is called the [[image (mathematics)|image]] of {{mvar|f}}. In general, the image of a function is a subset of its codomain. Thus, it may not coincide with its codomain. Namely, a function that is not [[Surjective function|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 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 a function|domain]]'' of {{mvar|f}}, {{mvar|Y}} its ''codomain'', and {{mvar|G}} its ''[[Graph of a function|graph]]''.<ref>{{Harvnb|Bourbaki|1970|p=76}}</ref> 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 (mathematics)|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 function|surjective]] has elements {{mvar|y}} in its codomain for which the equation {{math|1=''f''(''x'') = ''y''}} does not have a solution.


An alternative definition of ''function'' by Bourbaki [Bourbaki, ''op. cit.'', p.&nbsp;77], namely as just a functional graph, does not include a codomain and is also widely used.<ref>{{Harvnb|Forster|2003}}, [{{Google books|plainurl=y|id=mVeTuaRwWssC|page=10|text=Some mathematical cultures make this explicit, saying that a function}} pp. 10&ndash;11]</ref> For example in [[set theory]] it is desirable to permit the domain of a function to be a [[Class (set theory)|proper class]] {{mvar|X}}, in which case there is formally no such thing as a triple {{math|(''X'', ''Y'', ''F'')}}. 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'': ''X'' → ''Y''}}.<ref>{{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]</ref>
A codomain is not part of a function {{mvar|f}} if {{mvar|f}} is defined as just a graph.<ref>{{Harvnb|Bourbaki|1970|p=77}}</ref><ref>{{Harvnb|Forster|2003}}, [{{Google books|plainurl=y|id=mVeTuaRwWssC|page=10|text=Some mathematical cultures make this explicit, saying that a function}} pp. 10&ndash;11]</ref> For example in [[set theory]] it is desirable to permit the domain of a function to be a [[Class (set theory)|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'': ''X'' → ''Y''}}.<ref>{{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]</ref>


==Examples==
== Examples ==
For a function
For a function

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

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

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

the codomain of {{mvar|f}} is <math>\textstyle \mathbb R</math>, but {{mvar|f}} does not map to any negative number.
the codomain of {{mvar|f}} is <math>\textstyle \mathbb R</math>, but {{mvar|f}} does not map to any negative number.
Thus the image of {{mvar|f}} is the set <math>\textstyle \mathbb{R}^+_0</math>; i.e., the [[interval (mathematics)|interval]] {{closed-open|0, ∞}}.
Thus the image of {{mvar|f}} is the set <math>\textstyle \mathbb{R}^+_0</math>; i.e., the [[interval (mathematics)|interval]] {{closed-open|0, ∞}}.


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

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


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:
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:

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


The domain of {{mvar|h}} must be defined to be <math>\textstyle \mathbb{R}^+_0</math>:
The domain of {{mvar|h}} 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>
: <math>h\colon\mathbb{R}^+_0\rightarrow\mathbb{R}.</math>


The [[function composition|compositions]] are denoted
The [[function composition|compositions]] are denoted
: <math>h \circ f,</math>

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


On inspection, {{math|''h'' ∘ ''f''}} 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 <math>\textstyle \mathbb R</math>. 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]].
On inspection, {{math|''h'' ∘ ''f''}} 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 <math>\textstyle \mathbb R</math>. 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 the same as the domain of the function on the left side.
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 [[injective function|injection]].
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 [[injective function|injection]].
Line 49: Line 42:
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 <math>\textstyle \mathbb{R}^2</math> to <math>\textstyle \mathbb{R}^2</math> 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.
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 <math>\textstyle \mathbb{R}^2</math> to <math>\textstyle \mathbb{R}^2</math> 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==
== See also ==
* {{annotated link|Bijection}}
* [[Range (mathematics)]]
* [[Domain of a function]]
* [[Morphism#Codomain]]
* [[Surjective function]]
* [[Injective function]]
* [[Bijection]]


==Notes==
== Notes ==
{{reflist}}
{{reflist}}


==References==
== 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 |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
*{{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)}}
|title=Logic, Induction and Sets
* {{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}}
|author=Forster, Thomas
* {{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}}
|publisher=Cambridge University Press
|year=2003
|isbn=978-0-521-53361-4}}
* {{citation|title=Categories for the working mathematician|first=Saunders|last=Mac Lane|edition=2nd|publisher= Springer|year= 1998|isbn=978-0-387-98403-2}}
* {{citation|title=Axiomatic set theory|series=Symposium in Pure Mathematics|first1= Dana S.|last1=Scott|first2= Thomas J.|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=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|last2= Tall|publisher=Oxford University Press|year= 1977|isbn=978-0-19-853165-4}}
* {{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:Functions and mappings]]

Latest revision as of 10:24, 27 December 2023

A function f from X to Y. The blue oval Y is the codomain of f. The yellow oval inside Y is the image of f, and the red oval X is the domain of f.

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

A codomain is not part of a function f if f is defined as just a graph.[2][3] For example in set theory it is desirable to permit the domain of a function to be a proper class X, in which case there is formally no such thing as a triple (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 f: XY.[4]

Examples[edit]

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 cannot be but can be defined to be :

The compositions are denoted

On inspection, hf 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 with 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 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, 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.

See also[edit]

Notes[edit]

References[edit]

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