Codomain

From Wikipedia, the free encyclopedia

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 { f(x) : x ∈ X }.

It follows from these definitions that the range of f is always a subset of the codomain of f.

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 dimension 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{R}\rightarrow\mathbb{R}

defined by

f\colon\,x\mapsto x^2.

The codomain of f is R, but clearly f(x) never outputs negative values, and thus the range is in fact the set R0+β€”non-negative reals, i.e. the interval [0,∞):

0\leq f(x)<\infty.

One could have defined the function g thus:

g\colon\mathbb{R}\rightarrow\mathbb{R}^+_0
g\colon\,x\mapsto x^2.

While f and g have the same effect on a given number, they are not, in the modern view, the same function since they have different codomains.

To see why, suppose we define a second function,

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

We must define the domain to be \mathbb{R}^+_0:

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

Now let's define the compositions

h \circ f,
h \circ g.

Which of these compositions make sense?

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{R}. 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.

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.