Show that $x^{mn}=x^{m}$ Let $(M,.)$ be an associative operation such that there are two natural numbers $m,n\in\mathbb{N}$, different from zero, such that $m$ is bigger or equal to $n$ and $x^{m}y^{n}=yx$, for any $x,y\in\mathbb{M}$. Show that $x^{mn}=x^{m}$ for any $x,y\in M$ and an invertible element from the set commutes with every element from the set. I observed that $x^{m+n}=x^{2}$, but I think I should show that $M$ is finite to accomplish the task.
 A: For $n=1$ it's obvious.
But for $n>1$ we have the following reasoning for all $y\in\mathbb M$.
Let $x=y^{n-1}$.
Thus, $$y^{mn-m}y^{n}=y^n$$ or
$$y^{mn-m+n}=y^n.$$
Now, if $m=n$, we are done, but for $m>n$ we obtain: 
$$y^{mn-m+n}y^{m-n}=y^ny^{m-n}$$ or
$$y^{mn}=y^m.$$
Now, let $a$ be invertible.
Thus, $$a^mx^n=xa$$ gives 
$$(xa)^mx^n=x^{m+1}a$$ and since $$(xa)^mx^n=xxa=x^2a,$$ we obtain
$$x^{m+1}a=x^2a$$ or $$x^{m+1}=x^2$$ for any $x\in\mathbb M,$ which gives $$a^{m+1}=a^2$$ or
$$a^{m-1}=e$$ and since $$a^mx^n=xa,$$ we obtain
$$ax^n=xa$$ and we can assume that $n>1$, otherwise our statement is proven.
Thus, $$a^{n+1}=a^2,$$ which gives $$a^{n-1}=e$$ and from here $$a^{\gcd(m-1,n-1)}=e.$$
Now, $$x^{m}a^n=ax$$ gives $$x^ma=ax$$ or
$$x^m=axa^{-1},$$ which gives
$$x^{mn}=ax^na^{-1}$$ or $$x^m=ax^na^{-1}$$ or
$$x^{m}a=ax^n.$$
Id est, $$ax^n=ax,$$ which gives $x^n=x$ for any $x\in\mathbb M$ and since
$$a^mx^n=xa,$$ we obtain
$$ax=xa$$ and we are done!
A: Taking $y = x^{m-1}$ in $x^my^n = yx$ gives $x^m(x^{m-1})^n = x^{m-1}x$, whence $x^{mn} = x^m$.
If $n \geqslant 2$, you could use the answer to this question to show that your semigroup is commutative. However, it is not necessarily a monoid, and in this case, there are no invertible element. Take for instance $S = \{a, 0\}$ with $aa = 0$ and $a0 = 0 = 0a$.
For $n = 1$, a semigroup satisfying the identity $x^my = yx$ is not necessarily commutative as shown in this answer: the quaternion group $Q_8$
satisfies the identity $x^3y = yx$ but is not commutative.
