Show that a semigroup $S$ is a rectangular band if and only if $ab=ba \Rightarrow a=b$. (For all $a,b\in S$)
I have the definition of a rectangular band as $aba=a$.
When I try to prove this I keep getting stuck. This is my best effort.
$aba=a$
$ab=ba \Rightarrow aba=baa \\ \Rightarrow a=baa \\ \Rightarrow ab=baab=b \\ \Rightarrow ab=b $
But I can't get from here to the final result. Any hellp is much appreciated
The opposite direction can be proved as follows. Since $a$ and $a^2$ commute, $a = a^2$. Now, since $(aba)a = aba^2 = aba = a^2ba = a(aba)$, $a$ and $aba$ commute and thus $aba = a$.