Misplaced Pages

Codomain

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
(Redirected from Target set) Target set of a mathematical function
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. 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. 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.

Examples

For a function

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

defined by

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

the codomain of f is R {\displaystyle \textstyle \mathbb {R} } , but f does not map to any negative number. Thus the image of f is the set R 0 + {\displaystyle \textstyle \mathbb {R} _{0}^{+}} ; i.e., the interval [0, ∞).

An alternative function g is defined thus:

g : R R 0 + {\displaystyle g\colon \mathbb {R} \rightarrow \mathbb {R} _{0}^{+}}
g : x x 2 . {\displaystyle g\colon \,x\mapsto x^{2}.}

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:

h : x x . {\displaystyle h\colon \,x\mapsto {\sqrt {x}}.}

The domain of h cannot be R {\displaystyle \textstyle \mathbb {R} } but can be defined to be R 0 + {\displaystyle \textstyle \mathbb {R} _{0}^{+}} :

h : R 0 + R . {\displaystyle h\colon \mathbb {R} _{0}^{+}\rightarrow \mathbb {R} .}

The compositions are denoted

h f , {\displaystyle h\circ f,}
h g . {\displaystyle h\circ g.}

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 R {\displaystyle \textstyle \mathbb {R} } . 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 R 2 {\displaystyle \textstyle \mathbb {R} ^{2}} to itself, which can be represented by the 2×2 matrices with real coefficients. Each matrix represents a map with the domain R 2 {\displaystyle \textstyle \mathbb {R} ^{2}} and codomain R 2 {\displaystyle \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 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

T = ( 1 0 1 0 ) {\displaystyle T={\begin{pmatrix}1&0\\1&0\end{pmatrix}}}

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 R 2 {\displaystyle \textstyle \mathbb {R} ^{2}} to R 2 {\displaystyle \textstyle \mathbb {R} ^{2}} 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

Notes

  1. Bourbaki 1970, p. 76
  2. Bourbaki 1970, p. 77
  3. Forster 2003, pp. 10–11
  4. Eccles 1997, p. 91 (quote 1, quote 2); Mac Lane 1998, p. 8; Mac Lane, in Scott & Jech 1967, p. 232; Sharma 2004, p. 91; Stewart & Tall 1977, p. 89

References

Mathematical logic
General
Theorems (list)
 and paradoxes
Logics
Traditional
Propositional
Predicate
Set theory
Types of sets
Maps and cardinality
Set theories
Formal systems (list),
language and syntax
Example axiomatic
systems
 (list)
Proof theory
Model theory
Computability theory
Related
icon Mathematics portal
Categories: