# Order of a product of elements in a generic group

I'm dealing with the following question: having a group $G$ (of which nothing else is specified, doesn't have to be abelian), prove that $|ab|=|ba|$ for any $a$, $b$. Since $G$ is not abelian I'm not sure what to use here. I was thinking that except the case where $b=a^{-1}$, the order of those would be $lcm(m,n)$ where $m$ and $n$ are the orders of a and b. But looking it up it seems not to be so simple, even if all the info I could find was for abelian groups, so I would like some help with this specific case.

HINT: there is an identity $$ab=b^{-1}(ba)b.$$
(1). Assume $|ab| < \infty, |ba| < \infty.$ Let $|ab| = n \Rightarrow ababa \cdots ab = e$ ($n$ times) $\Rightarrow (ba)^{n+1} = b (ab)^n a = ba \Rightarrow (ba)^n = e.$ Similarly, the other way. This shows that $|ab| = |ba|.$
(2). Let at least one of $|ab|$ or $|ba|$ is finite. Assume $|ab| < \infty.$ Then a argument as above shows that, $|ba|$ is also finite and again $|ab| = |ba|.$
(3). $|ab| = |ba| = \infty.$
• Can you explain the second implication? The one that gives $(ba)^{n+1}$ – Snowflake Dec 26 '14 at 19:04
• @Snowflake: multiply $b$ from left and $a$ from right. – Krish Dec 26 '14 at 19:07