$R$ finite commutative ring with identity. Prove that $a \in R$ is either a zero divisor or a unit. If $R$ is a finite commutative ring with identity and $a \in R$, prove that $a$ is either a zero divisor or a unit.
If $a$ is a zero divisor we are done. If $a$ is not a zero divisor and $a \neq 0_{R}$, then $ab = 0_{R}$ implies that $b = 0_{R}$ otherwise $a = 0_{R}$. Hence, $R$ is an integral domain and since every finite integral domain is a field (Theorem $3.9$ in my book), $R$ is a field and so $a$ is a unit.
Now I don't know what is wrong with it but it has to be since there is a hard question a little later that one needs to show a nonzero finite commutative ring with no zero divisors is a field and this seems to follow easily from that.
 A: Let $a \in R$. We must prove that $a$ is a zero divisor or a unit. If $a$ is $0$ or a zero divisor then we are done. So assume that $a$ is not a zero divisor. 
Now consider the set $\{a,a^2,a^3, \ldots\}$. By closure under ring operations this must be a subset of $R$ and hence finite so this means $a^k=a^j$ for some $k< j$. Consequently 
$$a^{k}(1-a^{j-k})=0.$$
Since $a$ is not  a zero divisor so $a^k \neq 0$ and is also not a zero divisor, this means 
$$a^{j-k}=1.$$
Thus $a$ is invertible. 
A: Let $a \in R$. We must prove that $a$ is a zero divisor or a unit.
Consider the map $\varphi_a(r)=ar$ from $R$ to $R$.
One Proof
If $a$ is a unit, then $\varphi_a$ is a bijection. Assume that $a$ is not a unit, $\varphi_a$ cannot be a bijection, otherwise $a\varphi_a^{-1}(1)=1$ and thus $a$ is a unit. So $\varphi_a$ cannot be a injection. There exist two different elements $b,c\in R$ such that $$\varphi_a(b)=ab=ac=\varphi_a(c).$$
Hence
$$a(b-c)=0.$$
So $a$ is a zero divisor since $b-c\ne 0$.
Another Proof
If $0\ne a$ is not a zero divisor, then $\varphi_a$ must be a injection, otherwise there exist two difference elements $b,c\in R$ such that $$\varphi_a(b)=ab=ac=\varphi_a(c).$$
Hence $$a(b-c)=0.$$ So it is a contradiction and $\varphi_a$ is a injection. Furthermore, $\varphi_a$ is also a surjection. Therefore $a\varphi_a^{-1}(1)=1$. Thus $a$ is a unit.
=================================================
Remark:Please recall the fact that, if $A$ is a finite set and $\varphi$ is a map from $A$ to $A$, then $$\varphi \text{ is a bijection.} \Leftrightarrow \varphi \text{ is a injection.}\Leftrightarrow \varphi \text{ is a surjection.}$$
