Skip to content

Codomain

Definition

If the function is f ⁣:X→Y,f\colon X\to Y\text{,} the codomain of ff is the specified set YY in which every output must lie. The range is always a subset of the codomain, but the two sets need not be equal.


Interpretation

The codomain is the set that a function declares as the place where its outputs live. It is part of the specification f ⁣:X→Yf\colon X\to Y, together with the domain and the rule, and is usually chosen as a large, convenient set such as R\mathbb{R}.

A domain X with arrows from its three points into a larger codomain Y; the points hit form the range f(X), a smaller box inside Y, and some points of Y are not hit.

In the figure, the three points of XX are sent into YY, but only three points of YY are hit. They form the range f(X)f(X), the smaller box inside YY; the grey points belong to the codomain but are not values of ff.

The codomain is chosen, while the range follows from the rule and has to be worked out. A function is surjective exactly when its range is the whole codomain, so changing the codomain can change surjectivity without changing any value: x↦x2x\mapsto x^2 is not surjective as a map from R\mathbb{R} to R\mathbb{R}, since −1-1 is never reached, but it is surjective onto [0,∞)[0,\infty). This matters for a bijection, whose inverse must be defined on the whole codomain.

A common slip is to call the codomain the set of values of ff, which is the range. The sine function from R\mathbb{R} to R\mathbb{R} has codomain R\mathbb{R}, but its range is [−1,1][-1,1].


Key Results

  • The range of a function is always a subset of its codomain.
  • Changing the codomain can affect whether a function is surjective.

Examples

  • For f(x)=x2f(x)=x^2 defined as f ⁣:R→R,f\colon \mathbb{R}\to\mathbb{R}\text{,} the codomain is R.\mathbb{R}\text{.}
  • Strictly speaking, the same formula with codomain [0,+∞)[0,+\infty) defines a different function.

Prerequisites

Sources

Aliases: target set Symbols: infinity, real numbers

Last updated: 20 October 2026 03:02