Functions – Domain, Co-Domain & Range of a Function

functionsterminology

I'm a little confused between the difference between the range & co-domain of a function. Are they not the same thing (i.e. all possible outputs of the function)?

Best Answer

I think your confusion may stem from differing uses of terminology.

For a function $f: X \rightarrow Y$, the codomain is just the set $Y$. For instance, if $f: \mathbb{R} \rightarrow \mathbb{R}$ is $x \mapsto x^2$, then the codomain is $\mathbb{R}$. This terminology is agreed upon by all who use it: i.e., I have never seen anyone use the term "codomain" to mean anything else.

Unfortunately the term range is ambiguous. It is sometimes used exactly as codomain is used above, so some say that $\mathbb{R}$ is the range of the squaring function defined above. However, those who use the term codomain at all usually reserve the term "range" for the subset $\{y \in Y \ | \exists x \in X \text{ such that } f(x) = y\}$, i.e., the subset of values which are actually mapped to by some element in the domain. (Some others use the term image for this instead.) So in the above example the image of the function is $[0,\infty)$. Whether the range is $\mathbb{R}$ (i.e., the codomain) or $[0,\infty)$ (i.e., the image) depends upon your convention, and both are rather prevalent.

In practice, this means that it would be safest never to use the term range, instead using codomain and image. (But most people don't do that either...)

Related Question