A finite Monoid $M$ is a group if and only if it has only one idempotent element Suppose that $(M,*)$ is a finite Monoid.
Prove that $M$ is a group if and only if there is only a single idempotent element in $M$, namely $e$.
One direction is obvious, because if $M$ is a group then $x^2=x$ implies $x=e$, but the other direction has been challenging me for over an hour, so I decided to ask it here.
 A: If $M$ is not a group, then there is an element $a \in M$ with no inverse.
Since $M$ is finite, there exists $n>m>0$ with $a^n=a^m$. You can now find a
power of $a$ that is idempotent, and it cannot be the identity, because $a$
has no inverse.
Suppose that $a^m=a^n$ with $n>m$, and hence $a^m = a^{m+(n-m)}$.
We claim that $a^m=a^{m + k(n-m)}$ for all $k \ge 0$, and we prove this by induction on $k$. We have seen that it is true for $k=0,1$. Then, for $k>1$, we have, using the inductive hypothesis for $k-1$,  $$a^{m + k(n-m)} = a^{m + (k-1)(n-m) + (n-m)} = a^{m+(k-1)(n-m)}a^{n-m} = a^ma^{n-m} = a^n = a^m$$
as claimed.
Now choose $k$ sufficiently large that $t := m + k(n-m) \ge 2m$. Then, multiplying both sides of $a^m=a^t$ by $a^{t-2m}$, we get $a^{t-m}=a^{2(t-m)}$, so $a^{t-m}$ is idempotent.
For example, if $a^7=a^9$, then $a^7=a^{15}$ and multiplying by $a$ gives $a^8=a^{16}$, so $a^8$ is idempotent.
A: Perhaps a little clearer way to put it. Assume $x^a = x^{a+b}$ with $b >0$.
Then for any integers $u$, $k$, we have $x^{a+u} = x^{a+u + kb}$
So we need to find $u$ and $k$ such that $bk = a+u$. That's easy. Take $b$ such that $bk \geq a$ and let $u = bk-a$. Then $x^{a+u}$ is idempotent.
