TITLE: nilpotent group is almost abelian - counterexample for infinite order case
QUESTION [5 upvotes]: Some books use this property to characterized the finite nilpotent group:

A finite group $G$ is nilpotent if and only if whenever $a,b\in G$ are elements of finite order with $\gcd(\mathrm{ord}(a),\mathrm{ord}(b))=1$ then $ab=ba$.

I wonder what happen when $G$ is infinite. Does it still hold, become just an "if" statement, just an "only if" statement, or neither?
Edit: what I meant is that the property holds whenever $a$ and $b$ are of finite order (even when $G$ is infinite)

REPLY [7 votes]: There is also a simple proof of the "only if" part by induction on the smallest $n$ such that $G^{(n)}=\{e\}$ (where $G^{(0)}=G$ and $G^{(n+1)}=[G,G^{(n)}]$).
If $G$ is abelian it is obviously true.
If $n>1$, let $C$ be the center of $G$.
Then $G/C$ has a smaller $n$, and the order of $\bar{a} = a \mod C$ divides $o(a)$ (the order of $a$), and the same for $b$, so $ab=ba \mod C$, that is, $[a,b]=aba^{-1}b^{-1} \in C$.
But then $a$ and $b$ commute to $[a,b]$, so $[a,b]^{o(a)}=a^{o(a)} \left(ba^{-1}b^{-1}\right)^{o(a)}=a^{o(a)} \left(ba^{-o(a)}b^{-1}\right)=e$, and similarly $[a,b]^{o(b)}=e$, and a Bezout relation between $o(a)$ and $o(b)$ allows us to conclude that $[a,b]=e$.