Originally Posted by
topspin1617 Hmm.. well that's not the way to go. Just because representatives of classes commute, doesn't mean that all elements between the classes commute. For example, consider the classes $\displaystyle [(1\,2)],[(3\,4\,5)]\subseteq S_5$. There must be another way..
EDIT: Try this.
First, we need the fact that, for any finite group $\displaystyle G$ and subgroup $\displaystyle H$, $\displaystyle G\neq \bigcup_{a\in G}a^{-1}Ha$.
Now, we let $\displaystyle G$ act on itself by conjugation. Since it is assumed that the $\displaystyle g_i$ commute pairwise, we have $\displaystyle g_i^{-1}g_kg_i=g_k$ for all $\displaystyle 1\leq i,k \leq r$. That is, for each $\displaystyle k$, $\displaystyle g_1,\ldots ,g_r\in G_{g_k)$ (the stabilizer of $\displaystyle g_k$ under this group action).
Let $\displaystyle g\in G$ be arbitrary. Then there exist $\displaystyle i\in \{1,\ldots,r\},x\in G$ such that $\displaystyle g=x^{-1}g_ix$. Hence $\displaystyle g=x^{-1}g_ix\in x^{-1}G_{g_k}x$ for each $\displaystyle k$.
We have shown that, for any $\displaystyle g\in G$, we can find $\displaystyle x\in G$ so that $\displaystyle g\in x^{-1}G_{g_k}x$. It follows that $\displaystyle G=\bigcup_{x\in G}x^{-1}G_{g_k}x$ (for each $\displaystyle k$).
By the claim above, since $\displaystyle G$ is finite, this forces $\displaystyle G=G_{g_k}$ for each $\displaystyle k$. That is, the conjugacy class of $\displaystyle g_k$ is $\displaystyle \{g_k\}$. We know that this means $\displaystyle g_k\in Z(G)$ and, since these elements form a complete set of representatives for the conjugacy classes of $\displaystyle G$, $\displaystyle G=\{g_1,\ldots,g_r\}$, and the group is abelian.