Jump to content

Codomain: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Examples: wording
Ryan Reich (talk | contribs)
m →‎Examples: Fix line break
Line 18: Line 18:


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


Suppose we define an alternative function ''<math>g</math>'' thus:
Suppose we define an alternative function ''<math>g</math>'' thus:

Revision as of 11:58, 10 June 2009

Image of a function(f) from X(left) to Y(right). The smaller oval inside Y is the image of f. Y is the Codomain of f.

In mathematics, the codomain, or target set, of a function is the set Y into which all of the output of the function is constrained to fall. It is the set Y in the notation fX → Y.

The codomain (or target) is part of the modern definition of a function f as a triple (XYF), with F a subset of the Cartesian product X × Y. 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. In general, the image of a function is a subset of its codomain but not necessarily the same set; a function that is not surjective has elements y in its codomain for which the equation f(x) = y does not have a solution.

An older definition of functions which does not include a codomain is also widely used.[1] 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 (XYF). With such a definition functions do not have a codomain, although some authors still use it informally after introducing a function in the form fX → Y.[2][3][4][5][6]

Examples

As an example, let the function be a function on the real numbers:

defined by

, or equivalently .

The codomain of is , but f does not map to any negative number. Thus the image of f is the set ,i.e., the interval [0,∞).

Suppose we define an alternative function thus:

While and map a given x to the same number, they are not, in the modern view, the same function because they have different codomains. To see why, suppose we define a third function h:

We must define the domain of h to be :

.

Now let's define the compositions

,
.

On inspection, isn't useful. Suppose (as we must, unless we explicitly state otherwise) that we do not know what the image of is; we only know that it is a subset of . For this reason, it's possible that h, when composed on f, might receive an argument for which no output is defined – negative numbers aren't elements of the domain of h, which is the square root function.

Function composition therefore is a useful notation 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.

The codomain affects whether a function is a surjection. In our example, is a surjection while is not. The codomain does not affect whether a function is an injection.

A second example of the difference between codomain and image can be seen by considering the matrix of a linear transformation. By convention, the domain of a linear transformation associated with a matrix is Rn and its codomain is Rm, where the matrix is (has rows and columns) and the image is usually called the range. But the range (the set of numbers obtained when the matrix is right-multiplied by every column vector of length ) could be much smaller. For example, if the matrix contains only s, then no matter how large it is, the range is just the vector 0. But the dimension of the resulting vector is . This is important, because it is enough to change just one number in the matrix to make its range non-zero.

Notes

References

  • Eccles, Peter J. (1997), An Introduction to Mathematical Reasoning: Numbers, Sets, and Functions, Cambridge University Press, ISBN 978-0521597180
  • Forster, Thomas (2003), Logic, Induction and Sets, Cambridge University Press, ISBN 9780521533614
  • Mac Lane, Saunders (1998), Categories for the working mathematician (2nd ed.), Springer, ISBN 978-0387984032
  • Scott, Dana S.; Jech, Thomas J. (1967), Axiomatic set theory, Symposium in Pure Mathematics, American Mathematical Society, ISBN 978-0821802458
  • Sharma, A.K. (2004), Introduction To Set Theory, Discovery Publishing House, ISBN 978-8171418770
  • Stewart, Ian; Tall, David Orme (1977), The foundations of mathematics, Oxford University Press, ISBN 978-0198531654