Prove that, for each a ∈ R, either $a$ is a zero-divisor or a is a unit. I know similar question has been asked here before, but the answers were little bit stronger for me to digest :) So, I am asking the same question again.
Let $R$ be a finite commutative ring with unity. 
1.Prove that, for each $a ∈ R$, either $a$ is a zero-divisor or a is a unit.
I was studying a proof almost similar to this on the internet, and the middle proof is like this:
"Consider the set ${\{a^n| n ∈ N} = {a,a^2,a^3,...\}}$. Since $R$ is finite, we must have $a^i = a^j$ for some $i,j$ with $i > j$."
You can refer to this proof here:
My question is why we must assume $a^i = a^j$ when $i > j$? 
I would really appreciate some detail overview on this. Thanks. 
 A: The list $a, a^2, a^3, \ldots$ is an infinite list, but the elements in this list come from a finite set $R$.  That means there must be repeats in the list.  The indices $i$ and $j$ are just the locations where a repeat is found.
For example if we had $a, a^2 = b, a^3 = c, a^4 = d, a^5 = c, a^6 = d$, $\ldots$ then $a^5 = c = a^3$ is a repeat so I could choose $i = 5$ and $j = 3$ to get $a^i = a^j$.
In the proof you reference the assumption $a^i = a^j$ then lets them conclude $a^{i - j} = 1$ because they have already proven that you can cancel $a^j$ from both sides.
A: The answer is: by the pigeon hole principle.
In other words, the function: $f:\mathbb N\to R:n\mapsto a^n$ is not injective because, $\mathbb N$ is infinite and $R$ is finite.
Recall that if we assume that $f:\mathbb N\to R$ is injective, then will get $\mathrm{card}(\mathbb N)\leq\mathrm{card}(R)$. a contradiction.
Since $f$ is not injective, there exists $i,j\in\mathbb N$ such that $i\neq j$ and $f(i)= f(j)$, that's $a^i=a^j$.
Without lost of generality we can assume $i<j$.
A: Assume by contradiction that the elements don't repeat. Let $n$ be the number of elements in $R$. 
Then $R$ contains the $n+1$ distinct elements $a,a^2, a^3,.., a^n, a^{n+1}$, which means that $R$ contains at least $n+1$ elements. This contradicts the fact that $R$ contains exactly $n$ elements. CONTRADICTION.
We proved that the powers of $a$ repeat. This means that we can find two different powers $a^i, a^j$ which are equal. As $ i\neq j$ it means that either $i <j$ or $i>j$, and by symmetry we can assume the first  (if we are in the second case we just interchange i and j).
