4

$X \xrightarrow{\quad f \quad } Y $

Given some function like the one above, why must the function have as the object on the left the domain which it must cover but have as the right hand object the codomain which $f$ need not be onto?

I have looked online and don't understand why we don't restrict $Y$ to be the image of which $f$ is onto.

I would assume that much like the distinction between partial functions and relations and functions, there is some edifice of theorems and axioms that may fall apart if we don't allow $Y$ to be an overset of the image of $f$.

However, I would like some concrete motivating examples of why we have chosen this as our criteria and or notation.

Thank you in advance for your help, I really appreciate this!

2 Answers2

4

Here is an easy example.

If $A$ is a set, then $\mathcal P(A)$ is the power set of $A$, i.e. $\{B\mid B\subseteq A\}$. In many contexts, we want to identify $\mathcal P(A)$ with $2^A$, that is the set of all functions $A\to 2$ by identifying $B$ with $$1_B(a)=\begin{cases}1 & a\in B\\0 & a\notin B.\end{cases}$$

If we followed your suggestion that a function is always surjective, then $A$ and $\varnothing$ cannot be written as functions $A\to 2$, since $\varnothing$ is $A\to\{0\}$ and $A$ is $A\to\{1\}$. (This is, of course, under the assumption that $A$ has at least two elements, but most sets do anyway.)

So in that case, $\mathcal P(A)$ would be $2^A\cup\{\{0\}^A,\{1\}^A\}$, which is fairly horrendous if we're being honest. And this can be much more annoying when you're studying $L^p$ spaces and other function spaces. So, instead, we just have a codomain and we separate it from the image/range of the function.

Asaf Karagila
  • 393,674
2

I am not 100% sure if I am going to provide the example you wanted, but let me try.

A couple of days ago, I was reminded of Cantor's diagonal argument. It's a well-known proof of the fact that there is no bijection between $ \mathbb{N} $ and $ \mathbb{R} $. In order to even state an idea of the proof, we need to assume that there is a bijection $ f $ between $ \mathbb{N} $ and $ \mathbb{R} $. At the end, we will show that $ f $ can't be a surjection. And surjection is explicitly defined in terms of image being equal to codomain.

I am quite sure that there should be a workaround (it may or may not involve some categorical magic), but I think this example shows why it's quite natural to talk about codomains.