# $f$ injective $\iff f$ surjective.

Let $A$ a finite ring and $f:A\to A$ an homomorphism. I'm trying to show that $$f \text{ injective}\iff f \text{ surjective.}$$

I proved that $f$ is injective iff $\ker f=\{0\}$. Indeed, suppose $f$ injective. Then $$x\in\ker f\implies f(x)=0=f(0)\implies x=0\implies \ker f\subset \{0\}$$ and thus $\ker f=\{0\}$. Now if $\ker f=\{0\}$, then $$f(x)=f(y)\implies f(x-y)=0\implies x-y\in\ker f\implies x=y,$$ and thus $f$ injective. Now i'm trying to prove that $$f\text{ surjective}\iff\ker f=\{0\},$$ but with no success. Thanks for help.

• For any finite set $A$, $f:A\to A$ is injective iff surjective. – Martín-Blas Pérez Pinilla Oct 15 '15 at 10:46
• I know, It's exactly what I want to prove ! But how ? – Rick Oct 15 '15 at 10:47
• By induction on the cardinality for instance. – drhab Oct 15 '15 at 10:49

If $f$ is injective, then $\lvert f(A)\rvert=\lvert A\rvert$, and as these are finite sets, $f(A)=A$, which means $f$ is surjective.
If $f$ is not injective, $\lvert f(A)\rvert<\lvert A\rvert$, hence $f(A)\varsubsetneq A$, which means $f$ is not surjective.
For the $\Rightarrow$ direction, use the fact that $f$ is injective to determine the cardinality of the image of $f$. This should give you insight into the $\Leftarrow$ direction as well.