\section{Groups} Group theory gives us a set tools for understanding complex structures. We can use groups to solve the Rubik's cube, to solve problems in physics and chemistry, and to understand complex geometric symmetries. It's also worth noting that much of modern cryptography is built using results from group theory. \definition{} A \textit{group} $(G, \ast)$ consists of a set $G$ and an operator $\ast$. \par Groups always have the following properties: \begin{enumerate} \item $G$ is closed under $\ast$. In other words, $a, b \in G \implies a \ast b \in G$. \item $\ast$ is associative: $(a \ast b) \ast c = a \ast (b \ast c)$ for all $a,b,c \in G$ \item There is an \textit{identity} $e \in G$, so that $a \ast e = a \ast e = a$ for all $a \in G$. \item For any $a \in G$, there exists a $b \in G$ so that $a \ast b = b \ast a = e$. $b$ is called the \textit{inverse} of $a$. \par This element is written as $-a$ if our operator is addition and $a^{-1}$ otherwise. \end{enumerate} Any pair $(G, \ast)$ that satisfies these properties is a group. \problem{} Is $(\mathbb{Z}_5, +)$ a group? \par Is $(\mathbb{Z}_5, -)$ a group? \par \hint{$+$ and $-$ refer to the usual operations in modular arithmetic.} \vfill \problem{} Show that $(\mathbb{R}, \times)$ is not a group, then make it one by modifying $\mathbb{R}$. \par \begin{solution} $(\mathbb{R}, \times)$ is not a group because $0$ has no inverse. \par The solution is simple: remove the problem. \vspace{3mm} $(\mathbb{R} - \{0\}, \times)$ is a group. \end{solution} \vfill \problem{} What is the smallest group we can create? \begin{solution} Let $(G, \circledcirc)$ be our group, where $G = \{\star\}$ and $\circledcirc$ is defined by the identity $\star \circledcirc \star = \star$ Verifying that the trivial group is a group is trivial. \end{solution} \vfill \pagebreak \problem{} Let $(G, \ast)$ be a group with finitely many elements, and let $a \in G$. \par Show that $\exists n \in \mathbb{Z}^+$ so that $a^n = e$ \par \hint{$a^n = a \ast a \ast ... \ast a$ repeated $n$ times.} \vspace{2mm} The smallest such $n$ defines the \textit{order} of $g$. \vfill \problem{} What is the order of 5 in $(\mathbb{Z}_{25}, +)$? \par What is the order of 2 in $(\mathbb{Z}_{17}^\times, \times)$? \par \vfill \theorem{} Let $p$ be a prime number. \par In any group $(\mathbb{Z}_p^\times, \ast)$ there exists a $g \in \mathbb{Z}_p^\times$ where... \begin{itemize} \item The order of $g$ is $p - 1$ \item $\{a^0,~ a^1,~ ...,~ a^{p - 2}\} = \mathbb{Z}_n^\times$ \end{itemize} We call such a $g$ a \textit{generator}, since its powers generate every other element in the group. \begin{instructornote} $\mathbb{Z}_p^\times$ has $p-1$ elements. \par The set $\{a^0,~ a^1,~ ...,~ a^{p - 2}\}$ also has $p-1$ elements, since we start counting from zero. \vspace{2mm} The fact that the last power here is $p-2$ can be a bit confusing, but it's just the result of counting from zero. We could also write this set as $\{a^1,~ a^2,~ ...,~ a^{p - 1}\}$, since $a^0 = a^{p - 1}$. \end{instructornote} \vfill \pagebreak