# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: ''
#     name: sagemath
# ---

# + language="html"
# <link href="http://mathbook.pugetsound.edu/beta/mathbook-content.css" rel="stylesheet" type="text/css" />
# <link href="https://aimath.org/mathbook/mathbook-add-on.css" rel="stylesheet" type="text/css" />
# <style>.subtitle {font-size:medium; display:block}</style>
# <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic" rel="stylesheet" type="text/css" />
# <link href="https://fonts.googleapis.com/css?family=Inconsolata:400,700&subset=latin,latin-ext" rel="stylesheet" type="text/css" /><!-- Hide this cell. -->
# <script>
# var cell = $(".container .cell").eq(0), ia = cell.find(".input_area")
# if (cell.find(".toggle-button").length == 0) {
# ia.after(
#     $('<button class="toggle-button">Toggle hidden code</button>').click(
#         function (){ ia.toggle() }
#         )
#     )
# ia.hide()
# }
# </script>
#
# -

# **Important:** to view this notebook properly you will need to execute the cell above, which assumes you have an Internet connection.  It should already be selected, or place your cursor anywhere above to select.  Then press the "Run" button in the menu bar above (the right-pointing arrowhead), or press Shift-Enter on your keyboard.

# $\newcommand{\identity}{\mathrm{id}}
# \newcommand{\notdivide}{\nmid}
# \newcommand{\notsubset}{\not\subset}
# \newcommand{\lcm}{\operatorname{lcm}}
# \newcommand{\gf}{\operatorname{GF}}
# \newcommand{\inn}{\operatorname{Inn}}
# \newcommand{\aut}{\operatorname{Aut}}
# \newcommand{\Hom}{\operatorname{Hom}}
# \newcommand{\cis}{\operatorname{cis}}
# \newcommand{\chr}{\operatorname{char}}
# \newcommand{\Null}{\operatorname{Null}}
# \newcommand{\lt}{<}
# \newcommand{\gt}{>}
# \newcommand{\amp}{&}
# $

# <div class="mathbook-content"><h2 class="heading hide-type" alt="Section 14.2 The Class Equation"><span class="type">Section</span><span class="codenumber">14.2</span><span class="title">The Class Equation</span></h2><a href="section-class-equation.ipynb" class="permalink">¶</a></div>

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

# <div class="mathbook-content"><p id="p-2052">Now consider the special case in which $G$ acts on itself by conjugation, $(g,x) \mapsto gxg^{-1}\text{.}$ The <dfn class="terminology">center</dfn> of $G\text{,}$</p><div class="displaymath">
# \begin{equation*}
# Z(G) = \{x : xg = gx \text{ for all } g \in G \},
# \end{equation*}
# </div><p>is the set of points that are fixed by conjugation. The nontrivial orbits of the action are called the <dfn class="terminology">conjugacy classes</dfn> of $G\text{.}$ 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\text{,}$ then</p><div class="displaymath">
# \begin{equation*}
# |G| = |Z(G)| + n_1 + \cdots + n_k.
# \end{equation*}
# </div><p>The stabilizer subgroups of each of the $x_i$'s, $C(x_i) = \{ g \in G: g x_i = x_i g \}\text{,}$ are called the <dfn class="terminology">centralizer subgroups</dfn> of the $x_i$'s. From Theorem <a href="section-groups-acting-on-sets.ipynb#theorem-orbit" class="xref" alt="Theorem 14.11 " title="Theorem 14.11 ">14.11</a>, we obtain the <dfn class="terminology">class equation</dfn>:</p><div class="displaymath">
# \begin{equation*}
# |G| = |Z(G)| + [G: C(x_1) ] + \cdots + [ G: C(x_k)].
# \end{equation*}
# </div><p>One of the consequences of the class equation is that the order of each conjugacy class must divide the order of $G\text{.}$</p></div>

# <div class="mathbook-content"><article class="example-like" id="example-actions-conjugacy-class-s3"><h6 class="heading"><span class="type">Example</span><span class="codenumber">14.12</span></h6><p id="p-2053">It is easy to check that  the conjugacy classes in $S_3$ are the following:</p><div class="displaymath">
# \begin{equation*}
# \{ (1) \},  \quad \{ (123), (132) \}, \quad \{(12), (13), (23) \}.
# \end{equation*}
# </div><p>The class equation is $6 = 1+2+3\text{.}$</p></article></div>

# <div class="mathbook-content"><article class="example-like" id="example-actions-conjugacy-class-d4"><h6 class="heading"><span class="type">Example</span><span class="codenumber">14.13</span></h6><p id="p-2054">The center of $D_4$ is $\{ (1), (13)(24) \}\text{,}$ and the conjugacy classes are</p><div class="displaymath">
# \begin{equation*}
# \{ (13), (24) \}, \quad \{ (1432), (1234) \}, \quad \{ (12)(34), (14)(23) \}.
# \end{equation*}
# </div><p>Thus, the class equation for $D_4$ is $8 = 2 + 2 + 2 + 2\text{.}$</p></article></div>

# <div class="mathbook-content"><article class="example-like" id="example-actions-conjugacy-class-sn"><h6 class="heading"><span class="type">Example</span><span class="codenumber">14.14</span></h6><p id="p-2055">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\text{.}$ By Theorem <a href="section-lagranges-theorem.ipynb#theorem-cycle-length-theorem" class="xref" alt="Theorem 6.16 " title="Theorem 6.16 ">6.16</a>,</p><div class="displaymath">
# \begin{equation*}
# \tau \sigma \tau^{-1} = ( \tau( a_1), \ldots, \tau(a_k)).
# \end{equation*}
# </div><p>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\text{.}$ Then $\sigma$ is conjugate to every other $\tau \in S_n$ whose cycle decomposition has the same lengths.</p><p id="p-2056">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:</p><div class="displaymath">
# \begin{align*}
# 3 & =  1 + 1 + 1\\
# 3 & =  1 + 2\\
# 3 & =  3;
# \end{align*}
# </div><p>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 <dfn class="terminology">NP-complete</dfn>.  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.</p></article></div>

# <div class="mathbook-content"><article class="theorem-like" id="theorem-pn"><h6 class="heading"><span class="type">Theorem</span><span class="codenumber">14.15</span></h6><p id="p-2057">Let $G$ be a group of order $p^n$ where $p$ is prime. Then $G$ has a nontrivial center.</p></article><article class="proof" id="proof-89"><h6 class="heading"><span class="type">Proof</span></h6><p id="p-2058">We apply the class equation</p><div class="displaymath">
# \begin{equation*}
# |G| = |Z(G)|  + n_1 + \cdots + n_k.
# \end{equation*}
# </div><p>Since each $n_i \gt 1$ and $n_i \mid |G|\text{,}$ it follows that $p$  must divide each $n_i\text{.}$ Also, $p \mid |G|\text{;}$ hence, $p$ must divide $|Z(G)|\text{.}$ Since the identity is always in the center of $G\text{,}$ $|Z(G)| \geq 1\text{.}$ Therefore, $|Z(G)|  \geq p\text{,}$ and there exists some $g \in Z(G)$ such that $g \neq 1\text{.}$</p></article></div>

# <div class="mathbook-content"><article class="theorem-like" id="corollary-p2abelian"><h6 class="heading"><span class="type">Corollary</span><span class="codenumber">14.16</span></h6><p id="p-2059">Let $G$ be a group of order $p^2$ where $p$ is prime. Then $G$ is abelian.</p></article><article class="proof" id="proof-90"><h6 class="heading"><span class="type">Proof</span></h6><p id="p-2060">By Theorem <a href="section-class-equation.ipynb#theorem-pn" class="xref" alt="Theorem 14.15 " title="Theorem 14.15 ">14.15</a>, $|Z(G)| = p$ or $p^2\text{.}$  If $|Z(G)| = p^2\text{,}$ then we are done.  Suppose that $|Z(G)| = p\text{.}$ Then $Z(G)$ and $G / Z(G)$ both have order $p$ and must both be cyclic groups.  Choosing  a generator $aZ(G)$ for $G / Z(G)\text{,}$ we can write any element $gZ(G)$ in the quotient group as $a^m Z(G)$ for some integer $m\text{;}$ hence, $g = a^m x$ for some $x$ in the center of $G\text{.}$  Similarly, if $hZ(G) \in G / Z(G)\text{,}$ there exists a $y$ in $Z(G)$ such that $h = a^n y$ for some integer $n\text{.}$  Since $x$ and $y$ are in the center of $G\text{,}$ they commute with all other elements of $G\text{;}$ therefore,</p><div class="displaymath">
# \begin{equation*}
# gh  =  a^m x a^n y =  a^{m+n} x y = a^n y a^m x = hg,
# \end{equation*}
# </div><p>and $G$ must be abelian.</p></article></div>

StarcoderdataJupyterScriptsDedupFiltered