# Powers of Commuting Elements of Monoid Commute

## Theorem

Let $\struct {S, \circ}$ be a monoid whose identity element is $e$.

For $a \in S$, let $\circ^n a = a^n$ denote the $n$th power of $a$.

Let $a, b \in S$ such that $a$ commutes with $b$:

$a \circ b = b \circ a$

Then:

$\forall m, n \in \N: \paren {\circ^m a} \circ \paren {\circ^n b} = \paren {\circ^n b} \circ \paren {\circ^m a}$

That is:

$\forall m, n \in \N: a^m \circ b^n = b^n \circ a^m$

## Proof

Because $\struct {S, \circ}$ is a monoid, it is a fortiori also a semigroup.

$\forall m, n \in \N_{>0}: \paren {\circ^m a} \circ \paren {\circ^n b} = \paren {\circ^n b} \circ \paren {\circ^m a}$

That is:

$\forall m, n \in \N_{>0}: a^m \circ b^n = b^n \circ a^m$

It remains to be shown that the result holds for the cases where $m = 0$ and $n = 0$.

Let $n \in \N$:

 $\displaystyle a^m \circ b^0$ $=$ $\displaystyle a^m \circ e$ Definition of $b^0$ $\displaystyle$ $=$ $\displaystyle a^m$ Definition of Identity Element $\displaystyle$ $=$ $\displaystyle e \circ a^m$ Definition of Identity Element $\displaystyle$ $=$ $\displaystyle b^0 \circ a^m$ Definition of $b^0$

Similarly, let $m \in \N$:

 $\displaystyle a^0 \circ b^n$ $=$ $\displaystyle e \circ b^n$ Definition of $a^0$ $\displaystyle$ $=$ $\displaystyle b^n$ Definition of Identity Element $\displaystyle$ $=$ $\displaystyle b^n \circ e$ Definition of Identity Element $\displaystyle$ $=$ $\displaystyle b^n \circ a^0$ Definition of $a^0$

and:

 $\displaystyle a^0 \circ b^0$ $=$ $\displaystyle e \circ e$ Definition of $a^0$ and $b^0$ $\displaystyle$ $=$ $\displaystyle b^0 \circ a^0$ Definition of $a^0$ and $b^0$

Thus:

$a^m \circ b^n = b^n \circ a^m$

holds for $n = 0$ and $m = 0$.

Thus:

$\forall m, n \in \N: a^m \circ b^n = b^n \circ a^m$

$\blacksquare$