Home

codomein

Codomein (codomain) is a term in mathematics describing the target set of a function. Given a function f from X to Y, denoted f: X -> Y, the codomein is the set Y that contains all potential outputs of f. The actual outputs realized by f on elements of X form its image (also called the range), which is a subset of the codomein. The distinction matters: a function can have a codomein larger than its image, in which case f is not surjective onto the codomein.

Examples help illustrate the concept. The function f: R -> R defined by f(x) = x^2 has codomein

Interpretation and use: The codomein is part of the data that defines a function and influences properties

R
but
image
[0,
∞).
It
is
not
surjective
onto
R;
if
instead
the
codomein
is
taken
to
be
[0,
∞),
then
f
is
surjective.
Another
example
is
a
function
f:
{1,2,3}
->
{a,b}
with
1
->
a,
2
->
a,
3
->
b;
the
codomein
is
{a,b}
and
the
image
is
{a,b},
so
f
is
surjective
onto
its
codomein.
such
as
surjectivity.
Changing
the
codomein
can
change
whether
a
function
is
surjective.
In
function
composition,
the
codomein
of
the
first
function
must
be
compatible
with
the
domain
of
the
next
function.
In
programming
languages,
the
concept
corresponds
to
the
return
type,
which
constrains
what
values
a
function
may
produce.