Prove that a and b commute if and only if they are powers of the same word
If $ab=ba$ then the word $w = ab$ satisfies $R^{|a|}(w) = w$, where $R$ is the right-rotation operator, and $R^{|a|}$ just applies this operator $a$ times. Since $R^{|w|}(w) = w$, Bezout's identity implies that $R^{(|a|,|w|)}(w) = w$, where $g = (|a|,|w|)$ is the greatest common divisor of $|a|$ and $|w|$. Since $g \mid |w|$, we see that $w = z^{|w|/g}$ for some word $z$ of length $g$. Since $g \mid |a|$, we see that $a = z^{|a|/g}$ and $b = z^{|b|/g}$.