Consider the injection $f:{{0,1,2}} \to {0,1,2,3}:x\to x $
Now consider the left inverse of this function. How exactly is this a surjection if not all the elements in the codomain are mapped back?
Consider the injection $f:{{0,1,2}} \to {0,1,2,3}:x\to x $
Now consider the left inverse of this function. How exactly is this a surjection if not all the elements in the codomain are mapped back?
The given function $f$ has exactly 3 left inverses.
Note that a left inverse $g$ of $f$ must be a function $\{0,1,2,3\}\to\{0,1,2\}$ so that $g(f(x))=x$ for all $x\in\{0,1,2\}$.
So, we must have $g(0)=0,\ g(1)=1,\ g(2)=2$, and also $g(3)\in\{0,1,2\}$, which actually can be arbitrary.
Because of the equation $g(f(x))=x$ we see that indeed any such $g$ must be surjective, since for arbitrary $x$ in the codomain of $g$ (=domain of $f$) we have an element, specifically e.g. $f(x)$ which $g$ carries into $x$.