# 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.

• Had a perfectly good answer and then I realized I'd missed the word "finite". – Malice Vidrine Nov 15 '13 at 12:12
• @MaliceVidrine, I wonder if the following holds: let $M$ denote an arbitrary (i.e. not-necessarily finite) commutative monoid. Then $M$ is cancellative iff the only idempotent is $e$. – goblin Dec 23 '14 at 3:26

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.
$a^m=a^n$ with $n>m$ implies $a^n = a^{m+(n-m)}= a^{n+(n-m)}$, so we can increase the $n$ while keeping $m$ constant. Hence we can assume that $n-2m\ge 0$. Now multiply both sides of $a^m=a^n$ by $a^{n-2m}$ to get $a^{n-m}=a^{2(n-m)}$, so $a^{n-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.
• I don't see how I can find a power of $a$ that is idempotent :/ Would you please go ahead with your argument? – user66733 Nov 15 '13 at 13:02
• Thanks. I don't understand why "we can increase the $n$ while keeping $m$ constant" is implied by $a^{n}=a^{m+(n-m)}=a^{n+(n-m)}$, can't we always do that in general? and I don't see how that justifies our assumption that $n-2m \geq 0$. I see why we need $n-2m$ to be non-negative though (because $a$ is assumed to be non-invertible). I'd appreciate it if you try to explain those two statements. – user66733 Nov 15 '13 at 14:09
• The equation I wrote shows that you can always increase $n$ by $n-m$ so you can keep doing that and thereby increase it as much as you like. You need $n-2m \ge 0$ to justify multiplying by $a^{n-2m}$, because $a$ has no inverse. – Derek Holt Nov 15 '13 at 14:54
• Thanks. Yes, I see why we need $n-2m \geq 0$ as I said, but I don't see why "we can increase the $n$ while keeping $m$ constant" implies $n-2m \geq 0$. – user66733 Nov 15 '13 at 15:05
• Sorry, I cannot see what it is that you don't understand. I did give an example. Let me give another one. Suppose initially that $m=23$, $n=27$. I can increase $n$ by $27-23=4$, so I can keep doing this and replace $n$ by 31, 35, 39, 43, 47. Now $n-2m=47-46=1 \ge 0$. – Derek Holt Nov 16 '13 at 9:27