TITLE: $gh = hg, \ \gcd(|g|, |h|) = 1\Rightarrow|gh| = |g||h|\ \ (|a|$ = order of element $a)$
QUESTION [9 upvotes]: Let $G$ be a group and $g,h \in G$. I need to prove that if $g$ and $h$ commute and their orders are coprime, then $|gh| = |g||h|$, that is, the order of their product is the multiple of their orders.
Since $gh = hg$, then $(gh)^{ lcm(|g|, |h|)} = e$, so, $|gh|$ divides $lcm(|g|, |h|)$. Since $\gcd(|g|, |h|) = 1$, then $lcm(|g|, |h|) = |g||h|$.
So, $|gh|$ divides $|g||h|$.

REPLY [4 votes]: $1 = (gh)^k\! = g^k h^k\Rightarrow\, g^k\! = h^{-k} =: \color{#c00}f\in \langle g\rangle\cap\langle h\rangle\Rightarrow\,  |f|\ {\Large\vert}\ \overbrace{|g|,|h|}^{\rm coprime}\,\Rightarrow |f|=1\Rightarrow \color{#c00}{f = 1}$
So $\,\ (gh)^k = 1\iff g^k =\color{#c00} 1 = h^k\!\iff |g|,|h|\mid k\iff\! |g|\,|h|\mid k,\,$ thus $\,|gh| = |g||h|$