What's the need for a codomaine in the definition of a function?

84 Views Asked by At

I was reading a Mathematics books and it gave the axiomatic definition of a function as being a mapping from a set called "The domaine of the function" to another set called "The codomaine of the function", and at first I thought the codomaine is the image of the domaine by the function (i.e. the set that contains and only contains the images of every element of the domaine). Turns out that's the range or image of the domaine which is only a subset of the codomaine and is equal to the codomaine only if the function is surjective.

My question is : Why not define a function as a mapping from a domaine (the set A) to the set B (defined as the set containing and only containing the image of every element of the domaine)? Why the need for the Codomaine set with extra elements? Isn't the complement of the range in the Codomaine irrelevant to the function? In other words, aren't all functions surjective in the end?

Sometimes they say that the codomaine is the set of possible outcomes of a function, but I don't understand what they mean by "possible" in this context.

2

There are 2 best solutions below

3
On BEST ANSWER

Usually in math, we deal with general aspects. For example, in one variable calculus, we deal with functions $f : \mathbb{R} \rightarrow \mathbb{R}$. We want to look at all possible functions whose values are always in $\mathbb{R}$. While computing the derivative of such a function, we do not need its image (that does not mean the image isn't important!). So having the aspect of a codomain helps us to define the notion of a derivative, for instance, for a general class of objects.

To convince yourself of the importance of the concept of codomain, take the example of the multivariable world. Consider $f : \mathbb{R}^2 \rightarrow \mathbb{R}^3$, $f(x,y) = ((2+\cos x)\cos y,(2+\cos x)\sin y,\sin x)$. We know for sure that it takes values in $\mathbb{R}^3$. You can check that it isn't straightforward to calculate the image at all. But it's so easy to compute derivatives. So the codomain saves us from the trouble of calculating the image each time, especially when it is not at all needed.

2
On

One example is that say I have a function $f:\mathbb{R} \rightarrow \mathbb{R}$ such that $f(x) = f(x + 2\pi)$ so all I know is that the function is real valued and $2\pi$-periodic.

One example could be $f(x) = 1$ for all $x \in \mathbb{R}$, so the image is just $\{ 1 \}$, however, $f$ could also be $f(x) = \sin(x)$ which has image $[-1, 1]$.

Further, $f$ could be $f(x) = \tan(x)$ which would have image the whole of $\mathbb{R}$.

So for my general $f$, the possible range is $\mathbb{R}$, but it could be that it only hits some subset of that.