# The order of $ab$ when $a,b$ commute

Let $a,b$ be two group elements of finite order that commute.

What can be said about the order of $ab$?

I thought that $|ab| = \text{lcm}(|a|,|b|)$. My proof was that $(ab)^n = a^n b^n =e$ if and only if $a^n = b^n = e$ if and only if $|a|,|b|$ both divide $n$. The smallest $n$ such that both orders divide it is the least common multiple of $|a|$ and $|b|$.

By chance I came across this answer. It has an upvote so it's clearly correct. (?)

But it contradicts what I think: It's clear that

$$(ab)^{\text{lcm}(|a|,|b|)} = e$$

hence $|ab| \mid \text{lcm}(|a|,|b|)$.

It seems to me that this is saying more than $|ab| \mid |a| |b|$. Is it not?

Now my question is: what is the precisest statement that can be made about $|ab|$? Is there anything more than $|ab| \mid \text{lcm}(|a|,|b|)$ that can be said about $|ab|$?

• "$a^nb^n=e$ if and only if $a^n=b^n=e$" isn't a correct equivalence. For example, if $a=b$ has order two, then $ab=e$ but $a,b\neq e$. – user281392 Dec 1 '15 at 7:06
• All you can conclude from $a^nb^n=e$ is that $a^n=b^{-n}$. This does mean that both $a^n$ and $b^n$ lie in the intersection $\langle a\rangle\cap \langle b\rangle$ of the two cyclic subgroups. However, that intersection need not be the trivial subgroup. It will be trivial in the often occuring case, when $\gcd(|a|,|b|)=1$. Do you see why? – Jyrki Lahtonen Dec 1 '15 at 7:09
• "It has an upvote so it's clearly correct." -- There are many answers on SE which are wrong that have upvotes, just like there are many papers and books with wrong things that are cited. – Batman Dec 1 '15 at 7:25
• The correct formula is that if $m$ is the order of $a$ and $n$ is the order of $b$, then the order of $ab$ divides $\mathop{\rm lcm}(m,n)$ and is a multiple of $\mathop{\rm lcm}(m,n)/\gcd(m,n)$, and furthermore all integers with these two properties can arise as the order of $ab$. For example, when $m=n$, the order of the product $ab$ can be any integer dividing $n$, including $1$. – Greg Martin Dec 1 '15 at 7:36
• @GregMartin It's a bit more complicated that that. For any prime $p$, if the largest powers of $p$ that divide $|a|$ and $|b|$ are not the same then the greater one must divide $|ab|$. For instance, if $a$ has order $12$ and $b$ has order $18$ then $ab$ must have order $36$. – Zoe H Dec 1 '15 at 10:07

So, just so we're all clear: writing $m$ for the order of $a$ and $n$ for the order of $b$, it's clear that the order divides $\text{lcm}(m, n)$, and that this is a stronger statement than that it divides $mn$ (for example when $m = n$). It's also clear that not all divisors occur as orders (for example when $m$ and $n$ are coprime).

So there's an interesting question about exactly which orders dividing the lcm occur. Let $d$ be such a divisor. If $ab$ has order $d$, then $(ab)^d = e$, or equivalently $a^d = b^{-d}$. Now, $a^d$ is an element of order $\frac{n}{\gcd(n, d)}$, while $b^{-d}$ is an element of order $\frac{m}{\gcd(m, d)}$. So a necessary condition for $d$ to be a possible order is that these orders match:

$$\frac{n}{\gcd(n, d)} = \frac{m}{\gcd(m, d)}.$$

It's cleanest here to think about everything one prime at a time. Write $\nu_p(n)$ for the greatest power of a prime $p$ dividing $n$. Then the identity above is equivalent to the identity

$$\nu_p(n) - \text{min}(\nu_p(n), \nu_p(d)) = \nu_p(m) - \text{min}(\nu_p(m), \nu_p(d))$$

or equivalently

$$\nu_p(n) - \nu_p(m) = \text{min}(\nu_p(n), \nu_p(d)) - \text{min}(\nu_p(m), \nu_p(d))$$

where the only constraint on $\nu_p(d)$ is that it is at most $\nu_p(\text{lcm}(m, n)) = \text{max}(\nu_p(n), \nu_p(m))$.

From here there are two cases, and different cases may occur for different primes. If $\nu_p(n) = \nu_p(m)$ then there is no constraint on $\nu_p(d)$. But if $\nu_p(n) \neq \nu_p(m)$, then both of the mins above must evaluate to $\nu_p(n)$ and $\nu_p(m)$ respectively (in order to keep their difference the same as the nonzero difference between $\nu_p(n)$ and $\nu_p(m)$), and so we conclude that $\nu_p(d) = \text{max}(\nu_p(n), \nu_p(m))$, as stated by Zoe H in the comments.

I haven't thought about whether this necessary condition is sufficient; if it is then the construction is probably straightforward. You can again work one prime at a time.