The question says,
Let $ g_1, g_2, g_3 ... g_n$ be representatives of all the distinct conjugacy classes of a finite group $G$, such that these elements pairwise commute. Prove that $G$ is abelian.
I just want my proof to get verified, as this is really simple, I'm a little sceptical about it.
Proof:
Let $C_G(g_i)$ be the centraliser of the element $g_i$. Since it is given all the $g_i$'s pairwise commute, we have $$ C_G(g_1) \cap C_G(g_2) \cap ... \cap C_G(g_n) \supset \{g_1, g_2, g_3 ... g_n\} $$.
Let us assume $|G|=N$. Since we have $|C_G(g_i)| \geq n, \forall i \in \{1,2,...,n\}$, from the class equation we have
$$ |G| = \sum_{i=1}^n{|G : C_G(g_i)|} $$ or, $$ N \geq \left( \frac{N}{n}\right) .n$$
and the equality holds iff $|C_G(g_i)|=n \forall i \in \{1,2,...,n\}$ .
Thus we have, $C_G(g_i)=\{g_1, g_2, g_3 ... g_n\} \forall i \in \{1,2,...,n\}$.
However, from the class equation, we have $C_G(g_i)=G$ for at least one $g_i$, which belongs to the centre of the group $Z(G)$.
Hence $G= \{g_1, g_2, g_3 ... g_n\}$ and the group is abelian (Proved).
Is it all right or am I missing something?