Skip to content

The set of possible outputs of a function or relation — where the mapping lands.

The codomain of a function f:ABf : A \to B is the set B — the collection of possible outputs. Not every element of the codomain need actually appear as an output. Those that do form the image (or range) of f. A function is surjective when its image equals its entire codomain — every possible output is actually hit.

The codomain is part of the function’s specification, not a consequence of its rule. The function f(x)=x2f(x) = x^2 viewed as f:RRf : \mathbb{R} \to \mathbb{R} has codomain R\mathbb{R} and is not surjective (negative numbers are never outputs). The same rule viewed as g:R[0,)g : \mathbb{R} \to [0, \infty) has a smaller codomain and is surjective. These are different functions because they have different codomains, even though they assign the same output to every input.

The codomain of a binary relation RA×BR \subseteq A \times B is the set B — the set from which the second components of the ordered pairs are drawn.

In a category, the codomain of a morphism f:ABf : A \to B is the target object B. Composition requires the codomain of the first morphism to match the domain of the second: gfg \circ f is defined only when the codomain of ff equals the domain of gg. This matching condition is the basic constraint on which morphisms can be chained together.

Relations

Component of
Function, binary relation
Date created
Date modified
Defines
Codomain
Is a
Set
Paired with
Domain
Referenced by