Let $X$ be a finite $G$-set and $X_G$ be the set of fixed points in $X$; that is, \begin{equation*}X_G = \{ x \in X : gx = x \text{ for all } g \in G \}.\end{equation*} Since the orbits of the action partition $X$, \begin{equation*}|X| = |X_G| + \sum_{i = k}^n |{\mathcal O}_{x_i}|,\end{equation*} where $x_k, \ldots, x_n$ are representatives from the distinct nontrivial orbits of $X$.

Now consider the special case in which $G$ acts on itself by conjugation, $(g,x) \mapsto gxg^{-1}$. The center of $G$, \begin{equation*}Z(G) = \{x : xg = gx \text{ for all } g \in G \},\end{equation*} is the set of points that are fixed by conjugation. The nontrivial orbits of the action are called the conjugacy classes of $G$. If $x_1, \ldots, x_k$ are representatives from each of the nontrivial conjugacy classes of $G$ and $|{\mathcal O}_{x_1}| = n_1, \ldots, |{\mathcal O}_{x_k}| = n_k$, then \begin{equation*}|G| = |Z(G)| + n_1 + \cdots + n_k.\end{equation*} The stabilizer subgroups of each of the $x_i$'s, $C(x_i) = \{ g \in G: g x_i = x_i g \}$, are called the centralizer subgroups of the $x_i$'s. From Theorem 14.11, we obtain the class equation: \begin{equation*}|G| = |Z(G)| + [G: C(x_1) ] + \cdots + [ G: C(x_k)].\end{equation*} One of the consequences of the class equation is that the order of each conjugacy class must divide the order of $G$.

##### Example14.12

It is easy to check that the conjugacy classes in $S_3$ are the following: \begin{equation*}\{ (1) \}, \quad \{ (123), (132) \}, \quad \{(12), (13), (23) \}.\end{equation*} The class equation is $6 = 1+2+3$.

##### Example14.13

The center of $D_4$ is $\{ (1), (13)(24) \}$, and the conjugacy classes are \begin{equation*}\{ (13), (24) \}, \quad \{ (1432), (1234) \}, \quad \{ (12)(34), (14)(23) \}.\end{equation*} Thus, the class equation for $D_4$ is $8 = 2 + 2 + 2 + 2$.

##### Example14.14

For $S_n$ it takes a bit of work to find the conjugacy classes. We begin with cycles. Suppose that $\sigma = ( a_1, \ldots, a_k)$ is a cycle and let $\tau \in S_n$. By Theorem 6.16, \begin{equation*}\tau \sigma \tau^{-1} = ( \tau( a_1), \ldots, \tau(a_k)).\end{equation*} Consequently, any two cycles of the same length are conjugate. Now let $\sigma = \sigma_1 \sigma_2 \cdots \sigma_r$ be a cycle decomposition, where the length of each cycle $\sigma_i$ is $r_i$. Then $\sigma$ is conjugate to every other $\tau \in S_n$ whose cycle decomposition has the same lengths.

The number of conjugate classes in $S_n$ is the number of ways in which $n$ can be partitioned into sums of positive integers. In the case of $S_3$ for example, we can partition the integer 3 into the following three sums: \begin{align*} 3 & = 1 + 1 + 1\\ 3 & = 1 + 2\\ 3 & = 3; \end{align*} therefore, there are three conjugacy classes. The problem of finding the number of such partitions for any positive integer $n$ is what computer scientists call NP-complete. This effectively means that the problem cannot be solved for a large $n$ because the computations would be too time-consuming for even the largest computer.