If the center of a group $G$ is of index $n$, prove that every conjugacy class has at most $n$ elements. (This question is from Dummit and Foote, page 130, 3rd edition.)
Here is my attempt: we have $$ |G| = |C_G (g_i)| |G : C_G (g_i)| \,, \quad |C_G (g_i)| = |Z(G)| \cdot |C_G (g_i):Z(G)| \,. $$ Then $$ |G| = |Z(G)| \cdot |C_G (g_i):Z(G)| \cdot |G : C_G (g_i)| \,. $$ Then $$ n = |C_G (g_i):Z(G)| \cdot |G : C_G (g_i)| \,. $$
But $|C_G (g_i):Z(G)|$ is a positive integer as $Z(G)$ is subgroup of $C_G (g_i)$.
If $|G : C_G (g_i)|$ bigger than $n$, then $|C_G (g_i):Z(G)| \cdot |G : C_G (g_i)|$ is bigger than $n$.
But $|C_G (g_i):Z(G)| \cdot |G : C_G (g_i)| = n$, contradiction.
Then $|G : C_G (g_i)| \leq n$ and this completes the proof.
Is this proof right or not?
Your proof is correct, but you can simplify the end by saying that $$[G:C_G(g_i)] \leq [C_G(g_i):Z(G)]\cdot[G:C_G(g_i)] =n$$ Actually a contradiction is not needed.