A problem about abelian group

Given a group $G$, let $G_m$ be the group generated by the set $S=\{g^m|g\in G\}$.

Prove that if $G_m$ and $G_n$ are both abelian, then $G_{\gcd(m,n)}$ is also abelian.

I will try and generalize Nicky Hekster's solution to the coprime case. Let $\gcd(m,n)=r$, with $m=ra$, $n=rb$, and $a,b$ coprime
Let $S = \{g^r \mid g \in G \}$, and let $M = G_m = \langle k^a \mid k \in S \rangle$, and $N = G_n = \langle k^b \mid k \in S \rangle$. So $M$ and $N$ are abelian normal subgroups of $G$, with $[M,N] \le M \cap N \le Z(\langle M,N \rangle)$.
It is enough to prove that any two elements $g^r$ and $h^r$ of $S$ commute. We have $r = \lambda m + \mu n$ for some $\lambda,\mu \in {\mathbb Z}$, and since $g^m$ commutes with $h^m$ and $g^n$ commutes with $h^n$, it is enough to show that $u=g^m= (g^r)^a$ commutes with $v = h^n = (g^r)^b$.
Now $u^{-1}v^{-1}uv=z \in M \cap N$, so $v^{-1}uv = uz$. Since $z$ centralizes $u$ and $v$, $v^{-1}u^bv = u^bz^b$. But $u^b,v \in G_n$, which is abelian, so $v^{-1}u^bv=u^b$ and hence $z^b=1$. Similarly $z^a=1$ and, since $a$ and $b$ are coprime, $z=1$, and we are done.
• I see, $(u^{-1}h^{-1}u)^n=u^{-1}h^{-n}u=u^{-1}v^{-1}u\in G_n.$ May 11, 2015 at 6:36