I've just started learning ring theory, and the book I'm using uses "Every nonzero element in a finite ring is either a unit or a zero divisor" implicitly without explanation. So I came across this proof here on this site:
In a finite commutative ring with unity, every element is either a unit or a zero-divisor. Indeed, let $a\in R$ and consider the map on $R$ given by $x \mapsto ax$. If this map is injective then it has to be surjective, because $R$ is finite. Hence, $1=ax$ for some $x\in R$ and $a$ is a unit. If the map is not injective then there are $u,v\in R$, with $u\ne v$, such that $au=av$. But then $a(u-v)=0$ and $u-v\ne0$ and so $a$ is a zero divisor.
I understand all of the proof, except the part: Hence, $1=ax$ for some $x\in R$ and $a$ is a unit. How is this conclusion reached? Thanks for your time!