I am a little confused by the definitions of these different types of functions:
I think the definition of a surjection is pretty clear in that each element of x is mapped to some value of y.
But I'm a little confused about the difference between an injection and a bijection. An injection maps an element of x to at most one y and a bijection maps an element of x to exactly one y. Does this mean that an injection can have an element of x that does not map to any element of y whereas a bijection always has exactly one mapping?
And then, does this mean that all bijections are injections and all injections and bijections are surjections? Or can a function only be one of the three?
Any help?
Best Answer
All bijections are both injections and surjections.
Injections are not necessarily surjections. Bijections are always surjections.
Let $\mathbb{N}_{0} = \mathbb{N} \cup \{0\}\,$, and take for example the absolute value function $f(x)=|x|\,$:
if defined as $f : \mathbb{N}_0 \to \mathbb{N}_0\,$ it is a bijection (and therefore both an injection and a surjection), since it it is indeed the identity function on $\mathbb{N}_0$
if defined as $f : \mathbb{N}_0 \to \mathbb{Z}\,$ it is an injection, but not a surjection since for example there is no $x \in \mathbb{N}_0$ such that $f(x)=-1 \in \mathbb{Z}$
if defined as $f : \mathbb{Z} \to \mathbb{N}_0\,$ it is a surjection, but not an injection since for example $-1 \ne 1$ but $f(-1)=f(1)=1$