Why do we need the co-domain if we have the range? I know what both mean. Isn't it just better to use the range instead of the co-domain when defining a function? This question brought up to me when thinking about the definition of the surjective function.
-
The codomain is needed to define a function, while the image (or range, if you prefer) is not. Also, note that in commutative algebra it is often useful to think of inclusions as injective maps (and vice-versa), which isn't possible using only surjective functions. – A.P. Jun 27 '15 at 12:05
2 Answers
Of course it's needed. The codomain is how we designate our "ending set." If we want to talk about a function from R to R that is not surjective, then defining R as the codomain is how we specify that we are talking about the function from R to R. If we abandoned the idea of a codomain, we would have no notion of non-surjective functions. I couldn't even talk about a mapping from A to B unless that map was surjective.

- 5,272
Lets say a function $\zeta :\Bbb{R} \to \Bbb{R}$ where $\zeta(x)=x^2+1$ .
Here the range of of this will be $[1,\infty)$ and the codomain is $\Bbb{R}$ . S range and codomain are not the same and hence this function is not a surjection. That is that the codomain equals the range. So we see that codomain is important when you want to think about special functions like surjections.
Also codomain helps us to know where the function is going to when the image is hard to determine.