Codomain

The target set into which a function maps.
Codomain

If f:XYf:X\to Y is a function, then the codomain of ff is the set YY.

The codomain is not determined solely by the rule xf(x)x\mapsto f(x); it is specified as part of the function’s type. Many notions (notably surjectivity) depend on the codomain, not just on the actual outputs attained.

Examples:

  • If f:RRf:\mathbb{R}\to\mathbb{R} is given by f(x)=x2f(x)=x^2, then the codomain is R\mathbb{R} even though f(x)0f(x)\ge 0 always.
  • If the same rule is viewed as f:R[0,)f:\mathbb{R}\to[0,\infty), then the codomain is [0,)[0,\infty).
  • The codomain of sin:RR\sin:\mathbb{R}\to\mathbb{R} is R\mathbb{R} (even though the range is contained in [1,1][-1,1]).