If $a$ and $b$ commute and $\text{gcd}\left(\text{ord}(a),\text{ord}(b)\right)=1$, then $\text{ord}(ab)=\text{ord}(a)\text{ord}(b)$. 
Prove if $\operatorname{ord}(a)=m$, $\operatorname{ord}(b)=n$, and $\operatorname{gcd}(m,n)=1$, then $\operatorname{ord}(ab)=mn$.

I was reading this and was thinking how this proof would look like. I tried to do it and am not sure if this is correct. Here is what I did:
If $a$ and $b$ commute then $(ab)^{mn} = a^{mn} * b^{mn} = (a^m)^n * (b^n)^m = 1 * 1 = 1.$ So $ord(ab) | mn$.
Now, take $k = \operatorname{ord}(ab) = m^\prime * n^\prime$ where m' is relatively prime with $n$ and $n'$ is relatively prime with $m$. By the result above $m' | m$ and $n' | n$. Now we have $((ab)^k)^{m/m'} = 1$ since $(ab)^k=1$. But on the other hand, by the commutativity:
$$((ab)^k)^(m/m') =$$
$$((ab)^(m' * n'))^(m/m') =$$
$$ a^{n'm} * b^{n'm} = $$
$$(a^m)^{n'} * b^{n'm'}=$$
$$b^{n'm'} = 1$$
This implies that $n' * m'$ is divisible by $n$. But $m'$ is relatively prime with $n$, so we must have $n' = n.$ By symmetry, $m' = m$. So $ord(ab) = mn$.
Just to say this again, I want to prove if $a$ and $b$ commute and $m$ and $n$ are relatively prime then 
$$ord(ab)=mn.$$ 
The comments are vague. I guess this must be the answer then and there probably is not another way to do this. 
 A: Hint/roadmap:
If $|a|$ and $|b|$ are coprime and $a$ and $b$ commute, then $|ab|=|a||b|$.  In particular, this holds for all pairs of elements in abelian groups.
This follows from these facts:


*

*if $ab=ba$, then $(ab)^x=a^xb^x$, $\hspace{17pt}$(note: this is the step which fails without commutativity)

*if $g$ is an element in any group $G$ and $g^x=\operatorname{id}_G$, then $|g|$ divides $x$,

*if $|a|$ and $|b|$ are coprime, the smallest number divisible by both $|a|$ and $|b|$ (the least common multiple, one might say) is $|a||b|$.
From these facts, one may show that the smallest number $x$ for which $(ab)^x$ is the identity is $|a||b|$, hence $|ab|=|a||b|$.
A: Hint $\rm\ (ab)^k\! = 1\Rightarrow a^k\! = b^{-k}\! =\color{#c00}c \in \langle a\rangle\cap\langle b\rangle\Rightarrow ord\,c\mid m,n\,\Rightarrow\, ord\,c\mid(m,n)\!=\!1\,\Rightarrow\, \color{#c00}{c\! =\! 1},\,$ thus $\rm\ a^k\! = 1 = b^k\,$ thus $\rm\, m,n\mid k\:\Rightarrow\:\ell \!=\! lcm(m,n)\mid k.\ $ Conversely $\rm\:m,n\mid \ell \:\Rightarrow\:(ab)^\ell\! = 1.$
A: $ord_pa=m\iff a^m\equiv1\pmod p$  and  $ord_pb=n\iff b^n\equiv1\pmod p$ where $n$ is any integer
$\implies a^{lcm(m,n)}\equiv1\pmod p,b^{lcm(m,n)}\equiv1\pmod p$
$\implies (ab)^{lcm(m,n)}\equiv1\pmod p\implies ord_p(ab)$ divides lcm$(m,n)$
Conversely, let $ord_p(ab)=h$ and $(m,n)=d$ and $\frac mM=\frac nN=d$
As $(ab)^h\equiv1\pmod p\implies (ab)^{mh}\equiv1,$
$\implies (a^m)^h\cdot b^{mh}\equiv1$
$\implies b^{mh}\equiv1\implies n$ divides $mh$ as $ord_pb=n$
$\implies Nd$ divides $Mdh \implies N$ divides $Mh \implies N$ divides $h$ as $(M,N)=1$
Similarly, $M$ divides $h\implies $lcm$(M,N)$ divides $h=ord_p(ab)$
But $ord_p(ab)$ divides lcm$(m,n)\implies ord_p(ab)=$  lcm$(m,n)$
If $(m,n)=1,$ lcm$(m,n)=mn$
A: Suppose $(ab)^t=a^t b^t=1$. Then $t/mn$. Note that $t$ cannot be a multiple of $m$ and not of $n$, since then $a^tb^t=b^t \neq 1$. Now suppose $t$ is neither a multiple of $n$ nor a multiple of $m$. Then let $n=p_{1}^{\alpha_1}...p_k^{\alpha_k}$ and $m=q_1^{\beta_1}...q_n^{\alpha_n}$. Then $t$ takes a proper piece $r$ of $n$ and a proper piece $s$ of $m$.Since $x^t=y^{-t}$, $ord (x^t)=ord (y^{-t})=ord (y^t)$, but $ord (x^t)$ is what $r$ lacks from $n$(which are a product of $p_{k}$'s), while $ord (y^t)$ is a product of $q_i$'s, which is a contradiction because $(n,m)=1$.
