Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 7.2 Exercise 7.2.13
Let $\mathcal{K} = \{k_1, \ldots, k_m \}$ be a conjugacy class in the finite group $G$. Let $R$ be a ring with 1.
(1) Prove that the element $K = \sum_{i=1}^m k_i$ is in the center of the group ring $R[G]$. [Hint: Check that $g^{-1}Kg = K$ for all $g \in G$.]
(2) Let $\mathcal{K}_1, \ldots, \mathcal{K}_n$ be the conjugacy classes of $G$, and for each $i$, let $K_i$ be the sum of the elements in $\mathcal{K}_i$ (as described in part 1). Prove that an element $\alpha \in R[G]$ is in the center if and only if $$\alpha = \sum_{i=1}^n a_iK_i$$ for some elements $a_i \in Z(R)$.
Solution:
(1) Let $g \in G$. Note that conjugation by g permutes the elements of $\mathcal{K}$, so that (as an element of $R[G]$) we have $$g^{-1}Kg = g^{-1} \left( \sum_{i=1}^m k_i \right) g = \sum_{i=1}^m g^{-1}k_ig = \sum_{i=1}^m k_i = K.$$ Thus $gK = Kg$ for all $g \in G$. Then for all $M = \sum_{i=1}^t r_i g_i \in R[G]$, we see the following.\begin{align*}KM =&\ \left( \displaystyle\sum_{i=1}^m k_i \right) \left( \displaystyle\sum_{j=1}^t r_j g_j \right)\\
=&\ \displaystyle\sum_{i=1}^m \displaystyle\sum_{j=1}^t r_j k_i g_j\\
=&\ \displaystyle\sum_{j=1}^t \displaystyle\sum_{i=1}^m r_j k_i g_j\\
=&\ \displaystyle\sum_{j=1}^t r_j \left( \displaystyle\sum_{i=1}^m k_i \right) g_j\\
=&\ \displaystyle\sum_{j=1}^t r_j K g_j\\
=&\ \displaystyle\sum_{j=1}^t r_j g_j K\\
=&\ \left( \displaystyle\sum_{j=1}^t r_j g_j \right) K\\
=&\ MK\end{align*}
Thus $K \in Z(R[G])$.
(2) First we show that $N = \sum_{i=1}^n a_i K_i \in Z(R[G])$. Let $$M = \sum_{j=1}^t r_j g_j \in R[G].$$ Then we have the following. \begin{align*}NM =&\ \left( \displaystyle\sum_{i=1}^n a_i K_i \right) M\\
=&\ \displaystyle\sum_{i=1}^n a_i K_i M\\
=&\ \displaystyle\sum_{i=1}^n a_i M K_i\\
=&\ \displaystyle\sum_{i=1}^n a_i \left( \displaystyle\sum_{j=1}^t r_j g_j \right) K_i\\
=&\ \displaystyle\sum_{i=1}^n \left( \displaystyle\sum_{j=1}^t a_i r_j g_j \right) K_i\\
=&\ \displaystyle\sum_{i=1}^n \left( \displaystyle\sum_{j=1}^t r_j a_i g_j \right) K_i\\
=&\ \displaystyle\sum_{i=1}^n \left( \displaystyle\sum_{j=1}^t r_j g_j \right) a_i K_i\\
=&\ \left(\displaystyle\sum_{j=1}^t r_j g_j \right) \left( \displaystyle\sum_{i=1}^n a_i K_i \right)\\
=&\ MN\end{align*}Thus $N \in Z(R[G])$.
Now let $M = \sum_{i=1}^t r_i g_i \in Z(R[G])$. First, let $s \in R$ be arbitrary. By examining each coefficient of $Ms = sM$, we see that $r_i \in Z(R)$ for all $i$. Now recall that $G$ acts transitively (by conjugation) on each of its conjugacy classes. If $K$ is a conjugacy class of $G$ and $g_1,g_2 \in K$, then we have $h^{-1}g_1h = g_2$ for some $h \in G$. The coefficient of $g_2$ in $M = g^{-1}Mg$ is $r_2$ on one hand and $r_1$ on the other, so that in fact $r_1 = r_2$. In fact the coefficient of each $g_i \in K$ is $r_1$, and we have $$M = \sum_{i=1}^m r_i K_i.$$