Codomain
Encyclopedia : C : CO : COD : Codomain
In mathematics, the codomain of a function f : X → Y is the set Y.
The domain of f is the set X.
The range of f is the set f(X) defined as .
It follows from these definitions that the range of f is always a subset of the codomain of f.
Example
An illustration of the difference between the codomain and the range can be found by considering the matrix of a linear transformation. By convention, the domain of a linear transformation associated with a matrix is [\R^n] and the codomain is [\R^m], where the matrix is [m \times n] (has m rows and n columns). But the range (the set of numbers obtained when the matrix is right-multiplied by every column vector of length n) could be much smaller. For example, if the matrix contains only 0s, then no matter how large it is, the range is just the vector 0. But the length of the resulting vector is m. This is important, because it is enough to change just one number in the matrix to make its range non-zero.
Another example: let the function f be a function on the real numbers:
- [f\colon \mathbb\rightarrow\mathbb]
- [f\colon\,x\mapsto x^2.]
- [0\leq f(x)<\infty.]
- [g\colon\mathbb\rightarrow\mathbb^+_0]
- [g\colon\,x\mapsto x^2.]
To see why, suppose we define a second function,
[h\colon\,x\mapsto \sqrt x.]
We must define the domain to be [\mathbb^+_0]:
- [h\colon\mathbb^+_0\rightarrow\mathbb].
- [h \circ f],
- [h \circ g].
As it turns out, the first one doesn't. Suppose (as we must, unless we write down an explicit contradiction of this) we do not know what the range of f is; we only know that it can be [\mathbb]. But then we're in trouble, because the square root is not defined for negative numbers! Now we have a possible contradiction.
This is unclear, and in formal work should be avoided. Function composition therefore requires by definition that the codomain (not the range, which is a consequence of the function and so said to be indeterminate at the level of the composition) of the function on the right be the same as the domain of the function on the left.
The codomain can affect whether the function is a surjection; in our example, g is a surjection while f is not. The codomain does not affect whether the function is an injection.
See also
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
