# Abstract Algebra/Printable version

Abstract Algebra

The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at
https://en.wikibooks.org/wiki/Abstract_Algebra

Permission is granted to copy, distribute, and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 3.0 License.

# Sets

## Sets

In the so-called naive set theory, which is sufficient for the purpose of studying abstract algebra, the notion of a set is not rigorously defined. We describe a set as a well-defined aggregation of objects, which are referred to as members or elements of the set. If a certain object is an element of a set, it is said to be contained in that set. The elements of a set can be anything at all, but in the study of abstract algebra, elements are most frequently numbers or mathematical structures. The elements of a set completely determine the set, and so sets with the same elements as each other are equal. Conversely, sets which are equal contain the same elements.

For an element ${\displaystyle x}$ and a set ${\displaystyle A}$, we can say either ${\displaystyle x\in A}$, that is, ${\displaystyle x}$ is contained in ${\displaystyle A}$, or ${\displaystyle x\not \in A}$, that is, ${\displaystyle x}$ is not contained in ${\displaystyle A}$. To state that multiple elements ${\displaystyle a,b,c,\ldots ,n}$ are contained in ${\displaystyle A}$, we write ${\displaystyle a,b,c,\ldots ,n\in A}$.

### The axiom of extensionality

Using this notation and the symbol ${\displaystyle \rightarrow }$, which represents logical implication, we can restate the definition of equality for two sets ${\displaystyle A}$ and ${\displaystyle B}$ as follows:

${\displaystyle A=B}$ if and only if ${\displaystyle x\in A\rightarrow x\in B}$ and ${\displaystyle x\in B\rightarrow x\in A}$.

This is known as the axiom of extensionality.

### Comprehensive notation

If it is not possible to list the elements of a set, it can be defined by giving a property that its elements are sole to possess. The set of all objects ${\displaystyle x}$ with some property ${\displaystyle Q(x)}$ can be denoted by ${\displaystyle \{x:Q(x)\}}$. Similarly, the set of all elements ${\displaystyle x}$ of a set ${\displaystyle A}$ with some property ${\displaystyle Q(x)}$ can be denoted by ${\displaystyle \{x\in A:Q(x)\}}$. The colon : here is read as "such that". The vertical bar | is synonymous with the colon in similar contexts. This notation will appear quite often in the rest of this book, so it is important for the readers to familiarize themselves with this now.

As an example of this notation, the set of integers can be written as ${\displaystyle \mathbb {Z} =\{x:x{\text{ is an integer}}\}}$, and the set of even integers can be written as ${\displaystyle \{x\in \mathbb {Z} :x{\text{ is even}}\}}$.

### Set inclusion

For two sets ${\displaystyle A}$ and ${\displaystyle B}$, we define set inclusion as follows: ${\displaystyle A}$ is included in, or a subset of, ${\displaystyle B}$, if and only if every member of ${\displaystyle A}$ is a member of ${\displaystyle B}$. In other words,

${\displaystyle A\subseteq B\Leftrightarrow x\in A\rightarrow x\in B}$

where the symbol ${\displaystyle \subseteq }$ denotes "is a subset of", and ${\displaystyle \Leftrightarrow }$ denotes "if and only if".

By the aforementioned axiom of extensionality, one finds that ${\displaystyle A=B\Leftrightarrow A\subseteq B{\mbox{ and }}B\subseteq A}$.

### The empty set

One can define an empty set, written ${\displaystyle \varnothing }$, such that ${\displaystyle \forall x(x\not \in \varnothing )}$, where ${\displaystyle \forall }$ denotes universal quantification (read as "for all" or "for every"). In other words, the empty set is defined as the set which contains no elements. The empty set can be shown to be unique.

Since the empty set contains no elements, it can be shown to be a subset of every set. Similarly, no set but the empty set is a subset of the empty set.

### Proper set inclusion

For two sets ${\displaystyle A}$ and ${\displaystyle B}$, we can define proper set inclusion as follows: ${\displaystyle A}$ is a proper subset of ${\displaystyle B}$ if and only if ${\displaystyle A}$ is a subset of ${\displaystyle B}$, and ${\displaystyle A}$ does not equal ${\displaystyle B}$. In other words, there is at least one member in ${\displaystyle B}$ not contained in ${\displaystyle A}$

${\displaystyle A\subset B\Leftrightarrow (A\subseteq B\land A\neq B)}$,

where the symbol ${\displaystyle \subset }$ denotes "is a proper subset of" and the symbol ${\displaystyle \land }$ denotes logical and.

### Cardinality of sets

The cardinality of a set ${\displaystyle A}$, denoted by ${\displaystyle |A|}$, can be said informally to be a measure of the number of elements in ${\displaystyle A}$. However, this description is only rigorously accurate for finite sets. To find the cardinality of infinite sets, more sophisticated tools are needed.

### Set intersection

For sets ${\displaystyle A}$ and ${\displaystyle B}$, we define the intersection of ${\displaystyle A}$ and ${\displaystyle B}$ by the set ${\displaystyle A\cap B}$ which contains all elements which are common to both ${\displaystyle A}$ and ${\displaystyle B}$. Symbolically, this can be stated as follows:

${\displaystyle A\cap B=\{x\mid x\in A{\mbox{ and }}x\in B\}}$.

Because every element of ${\displaystyle A\cap B}$ is an element of ${\displaystyle A}$ and an element of ${\displaystyle B}$, ${\displaystyle A\cap B}$ is, by the definition of set inclusion, a subset of ${\displaystyle A}$ and ${\displaystyle B}$.

If the sets ${\displaystyle A}$ and ${\displaystyle B}$ have no elements in common, they are said to be disjoint sets. This is equivalent to the statement that ${\displaystyle A}$ and ${\displaystyle B}$ are disjoint if ${\displaystyle A\cap B=\emptyset }$.

Set intersection is an associative and commutative operation; that is, for any sets ${\displaystyle A}$, ${\displaystyle B}$, and ${\displaystyle C}$, ${\displaystyle (A\cap B)\cap C=A\cap (B\cap C)}$ and ${\displaystyle A\cap B=B\cap A}$.

By the definition of intersection, one can find that ${\displaystyle A\cap \emptyset =\emptyset }$ and ${\displaystyle A\cap A=A}$. Furthermore, ${\displaystyle A\subseteq B\Leftrightarrow A\cap B=A}$.

One can take the intersection of more than two sets at once; since set intersection is associative and commutative, the order in which these intersections are evaluated is irrelevant. If ${\displaystyle A_{i}}$ are sets for every ${\displaystyle i\in I}$, we can denote the intersection of all ${\displaystyle A_{i}}$ by

${\displaystyle \bigcap _{i\in I}A_{i}=\{x\mid (\forall i\in I)x\in A_{i}\}}$

In cases like this, ${\displaystyle I}$ is called an index set, and ${\displaystyle A_{i}}$ are said to be indexed by ${\displaystyle I}$.

In the case of ${\displaystyle I=\{1,2,...,n\}}$ one can either write ${\displaystyle A_{1}\cap A_{2}\cap A_{3}\cap \cdots \cap A_{n}}$ or

${\displaystyle \bigcap _{i=1}^{n}A_{i}}$.

### Set union

For sets ${\displaystyle A}$ and ${\displaystyle B}$, we define the union of ${\displaystyle A}$ and ${\displaystyle B}$ by the set ${\displaystyle A\cup B}$ which contains all elements which are in either ${\displaystyle A}$ or ${\displaystyle B}$ or both. Symbolically,

${\displaystyle A\cup B=\{x\mid x\in A{\mbox{ or }}x\in B\}}$.

Since the union ${\displaystyle A\cup B}$ of sets ${\displaystyle A}$ and ${\displaystyle B}$ contains the elements of ${\displaystyle A}$ and ${\displaystyle B}$, ${\displaystyle A\subseteq A\cup B}$ and ${\displaystyle B\subseteq A\cup B}$.

Like set intersection, set union is an associative and commutative operation; for any sets ${\displaystyle A}$, ${\displaystyle B}$, and ${\displaystyle C}$, ${\displaystyle (A\cup B)\cup C=A\cup (B\cup C)}$ and ${\displaystyle A\cup B=B\cup A}$.

By the definition of union, one can find that ${\displaystyle A\cup \emptyset =A\cup A=A}$. Furthermore, ${\displaystyle A\subseteq B\Leftrightarrow A\cup B=B}$.

Just as with set intersection, one can take the union of more than two sets at once; since set union is associative and commutative, the order in which these unions are evaluated is irrelevant. Let ${\displaystyle A_{i}}$ be sets for all ${\displaystyle i\in I}$. Then the union of all the ${\displaystyle A_{i}}$ is denoted by

${\displaystyle \bigcup _{i\in I}A_{i}=\{x\mid (\exists i\in I)x\in A_{i}\}}$

(Where ${\displaystyle \exists }$ may be read as "there exists".)

For the union of a finite number of sets ${\displaystyle A_{1},A_{2},A_{3},\ldots ,A_{n}}$, that is, ${\displaystyle I=\{1,2,...,n\}}$ one can either write ${\displaystyle A_{1}\cup A_{2}\cup A_{3}\cup \cdots \cup A_{n}}$ or abbreviate this as

${\displaystyle \bigcup _{i=1}^{n}A_{i}}$.

### Distributive laws

Set union and set intersection are distributive with respect to each other. That is,

${\displaystyle A\cap (B\cup C)=(B\cup C)\cap A=(A\cap B)\cup (A\cap C)}$ and
${\displaystyle A\cup (B\cap C)=(B\cap C)\cup A=(A\cup B)\cap (A\cup C)}$.

### Cartesian product

The Cartesian product of sets ${\displaystyle A}$ and ${\displaystyle B}$, denoted by ${\displaystyle A\times B}$, is the set of all ordered pairs which can be formed with the first object in the ordered pair being an element of ${\displaystyle A}$ and the second being an element of ${\displaystyle B}$. This can be expressed symbolically as

${\displaystyle A\times B=\{(x,y)\mid x\in A{\mbox{ and }}y\in B\}}$.

Since different ordered pairs result when one exchanges the objects in the pair, the Cartesian product is not commutative. The Cartesian product is also not associative. The following identities hold for the Cartesian product for any sets ${\displaystyle A,B,C,D}$:

${\displaystyle (A\cap B)\times (C\cap D)=(A\times C)\cap (B\times D)}$,
${\displaystyle (A\cup B)\times (C\cup D)=(A\times C)\cup (A\times D)\cup (B\times C)\cup (B\times D)}$,
${\displaystyle A\times (B\cap C)=(A\times B)\cap (A\times C)}$,
${\displaystyle A\times (B\cup C)=(A\times B)\cup (A\times C)}$.

The Cartesian product of any set and the empty set yields the empty set; symbolically, for any set ${\displaystyle A}$, ${\displaystyle A\times \emptyset =\emptyset \times A=\emptyset }$.

The Cartesian product can easily be generalized to the n-ary Cartesian product, which is also denoted by ${\displaystyle \times }$. The n-ary Cartesian product forms ordered n-tuples from the elements of ${\displaystyle n}$ sets. Specifically, for sets ${\displaystyle A_{1},A_{2},A_{3},\ldots ,A_{n}}$,

${\displaystyle A_{1}\times A_{2}\times A_{3}\times \cdots \times A_{n}=\{(x_{1},\ldots ,x_{n}):x_{i}\in A_{i}\}}$.

This can be abbreviated as

${\displaystyle \prod _{i=1}^{n}A_{i}}$.

In the n-ary Cartesian product, each ${\displaystyle x_{i}}$ is referred to as the ${\displaystyle i}$-th coordinate of ${\displaystyle (x_{1},\ldots ,x_{n})}$.

In the special case where all the factors are the same set ${\displaystyle A}$, we can generalize even further. Let ${\displaystyle A^{\Omega }}$ be the set of all functions ${\displaystyle f\,:\,\Omega \rightarrow A}$. Then, in analogy with the above, ${\displaystyle A^{\Omega }}$ is effectively the set of "${\displaystyle \Omega }$-tuples" of elements in ${\displaystyle A}$, and for each such function ${\displaystyle f}$ and each ${\displaystyle i\in \Omega }$, we call ${\displaystyle f(i)}$ the ${\displaystyle i}$-th coordinate of ${\displaystyle f}$. As one might expect, in the simple case when ${\displaystyle \Omega =\{1,2,...,n\}}$ for an integer ${\displaystyle n}$, this construction is equivalent to ${\displaystyle \prod _{i=1}^{n}A}$, which we can abbreviate further as ${\displaystyle A^{n}}$. We also have the important case of ${\displaystyle \Omega =\mathbb {N} }$, giving rise to the set of all infinite sequences of elements of ${\displaystyle A}$, which we can denote by ${\displaystyle A^{\infty }}$. We will need this construction later, in particular when dealing with polynomial rings.

### Disjoint union

Let ${\displaystyle A}$ and ${\displaystyle B}$ be any two sets. We then define their disjoint union, denoted ${\displaystyle A\coprod B}$ to be the following: First create copies ${\displaystyle A^{\prime }}$ and ${\displaystyle B^{\prime }}$ of ${\displaystyle A}$ and ${\displaystyle B}$ such that ${\displaystyle A^{\prime }\cap B^{\prime }=\emptyset }$. Then define ${\displaystyle A\coprod B=A^{\prime }\cup B^{\prime }}$. Notice that this definition is not explicit, like the other operations defined so far. The definition does not output a single set, but rather a family of sets. However, these are all "the same" in a sense which will be defined soon. In other words, there exists bijective functions between them.

Luckily, if a disjoint union is needed for explicit computation, one can easily be constructed, for example ${\displaystyle A\coprod B=(\{0\}\times A)\cup (\{1\}\times B)}$.

### Set difference

The set difference, or relative set complement, of sets ${\displaystyle A}$ and ${\displaystyle B}$, denoted by ${\displaystyle A\setminus B}$, is the set of elements contained in ${\displaystyle A}$ which are not contained in ${\displaystyle B}$. Symbolically,

${\displaystyle A\setminus B=\{x\mid x\in A{\mbox{ and }}x\not \in B\}}$.

By the definition of set difference, ${\displaystyle A\setminus B\subseteq A}$.

The following identities hold for any sets ${\displaystyle A,B,C}$:

${\displaystyle A\setminus B=A\Leftrightarrow A\cap B=\emptyset }$,
${\displaystyle A\setminus B=\emptyset \Leftrightarrow A\subseteq B}$,
${\displaystyle A\setminus B=A\setminus C\Leftrightarrow A\cap B=A\cap C}$,
${\displaystyle A\setminus (B\cap C)=(A\setminus B)\cup (A\setminus C)}$,
${\displaystyle A\setminus (B\cup C)=(A\setminus B)\cap (A\setminus C)}$,
${\displaystyle A\setminus (B\setminus C)=(C\cap A)\cup (A\setminus B)}$,
${\displaystyle A\setminus \emptyset =A}$,
${\displaystyle A\setminus A=\emptyset }$,
${\displaystyle \emptyset \setminus A=\emptyset }$.

The set difference of two Cartesian products can be found as ${\displaystyle (A\times B)\setminus (C\times D)=[A\times (B\setminus D)]\cup [(A\setminus C)\times B]}$.

### The universal set and set complements

We define some arbitrary set ${\displaystyle U}$ for which every set under consideration is a subset of ${\displaystyle U}$ as the universal set, or universe. The complement of any set is then defined to be the set difference of the universal set and that set. That is, for any set ${\displaystyle A\subseteq U}$, the complement of ${\displaystyle A}$ is given by ${\displaystyle A^{C}=U\setminus A}$. The following identities involving set complements hold true for any sets ${\displaystyle A}$ and ${\displaystyle B}$:

De Morgan's laws for sets:
${\displaystyle (A\cup B)^{C}=A^{C}\cap B^{C}}$,
${\displaystyle (A\cap B)^{C}=A^{C}\cup B^{C}}$,
Double complement law:
${\displaystyle A^{CC}=A}$,
Complement properties:
${\displaystyle A\cup A^{C}=U}$,
${\displaystyle A\cap A^{C}=\emptyset }$,
${\displaystyle \emptyset ^{C}=U}$,
${\displaystyle U^{C}=\emptyset }$,
${\displaystyle A\subseteq B\rightarrow B^{C}\subseteq A^{C}}$.

The set complement can be related to the set difference with the identities ${\displaystyle A\setminus B=A\cap B^{C}}$ and ${\displaystyle (A\setminus B)^{C}=A^{C}\cup B}$.

### Symmetric difference

For sets ${\displaystyle A}$ and ${\displaystyle B}$, the symmetric set difference of ${\displaystyle A}$ and ${\displaystyle B}$, denoted by ${\displaystyle A\bigtriangleup B}$ or by ${\displaystyle A\ominus B}$, is the set of elements which are contained either in ${\displaystyle A}$ or in ${\displaystyle B}$ but not in both of them. Symbolically, it can be defined as

${\displaystyle A\bigtriangleup B=\{x:(x\in A)\oplus (x\in B)\}.}$

More commonly, it is represented as

${\displaystyle A\bigtriangleup B=(A\setminus B)\cup (B\setminus A)}$ or as
${\displaystyle A\bigtriangleup B=(A\cup B)\setminus (A\cap B)}$.

The symmetric difference is commutative and associative so that ${\displaystyle A\bigtriangleup B=B\bigtriangleup A}$ and ${\displaystyle (A\bigtriangleup B)\bigtriangleup C=A\bigtriangleup (B\bigtriangleup C)}$. Every set is its own symmetric-difference inverse, and the empty set functions as an identity element for the symmetric difference, that is, ${\displaystyle A\bigtriangleup A=\emptyset }$ and ${\displaystyle A\bigtriangleup \emptyset =A}$. Furthermore, ${\displaystyle A\bigtriangleup B=\emptyset }$ if and only if ${\displaystyle A=B}$.

Set intersection is distributive over the symmetric difference operation. In other words, ${\displaystyle A\cap (B\bigtriangleup C)=(A\cap B)\bigtriangleup (A\cap C)}$.

The symmetric difference of two set complements is the same as the symmetric difference of the two sets: ${\displaystyle A^{C}\bigtriangleup B^{C}=A\bigtriangleup B}$.

### Notation for specific sets

Commonly-used sets of numbers in mathematics are often denoted by special symbols. The conventional notations used in this book are given below.

Natural numbers with 0: ${\displaystyle \mathbb {N} _{0}=\{0,1,2,\ldots \}}$ or ${\displaystyle \mathbb {N} =\{0,1,2,\ldots \}}$
Natural numbers without 0: ${\displaystyle \mathbb {N} ^{*}=\{1,2,3,\ldots \}}$
Integers: ${\displaystyle \mathbb {Z} =\{0,\pm 1,\pm 2,\ldots \}}$
Rational numbers: ${\displaystyle \mathbb {Q} =\left\{{\frac {p}{q}}:p\in \mathbb {Z} {\mbox{ and }}q\in \mathbb {N} ^{*}\right\}}$
Real numbers: ${\displaystyle \mathbb {R} }$
Complex numbers: ${\displaystyle \mathbb {C} }$

# Equivalence relations and congruence classes

We often wish to describe how two mathematical entities within a set are related. For example, if we were to look at the set of all people on Earth, we could define "is a child of" as a relationship. Similarly, the ${\displaystyle \geq }$ operator defines a relation on the set of integers. A binary relation, hereafter referred to simply as a relation, is a binary proposition defined on any selection of the elements of two sets.

Formally, a relation is any arbitrary subset of the Cartesian product between two sets ${\displaystyle X}$ and ${\displaystyle Y}$ so that, for a relation ${\displaystyle R}$, ${\displaystyle R\subseteq X\times Y}$. In this case, ${\displaystyle X}$ is referred to as the domain of the relation and ${\displaystyle Y}$ is referred to as its codomain. If an ordered pair ${\displaystyle (x,y)}$ is an element of ${\displaystyle R}$ (where, by the definition of ${\displaystyle R}$, ${\displaystyle x\in X}$ and ${\displaystyle y\in Y}$), then we say that ${\displaystyle x}$ is related to ${\displaystyle y}$ by ${\displaystyle R}$. We will use ${\displaystyle R(x)}$ to denote the set

${\displaystyle \{y\in Y:(x,y)\in R\}}$.

In other words, ${\displaystyle R(x)}$ is used to denote the set of all elements in the codomain of ${\displaystyle R}$ to which some ${\displaystyle x}$ in the domain is related.

## Equivalence relations

To denote that two elements ${\displaystyle x}$ and ${\displaystyle y}$ are related for a relation ${\displaystyle R}$ which is a subset of some Cartesian product ${\displaystyle X\times X}$, we will use an infix operator. We write ${\displaystyle x\sim y}$ for some ${\displaystyle x,y\in X}$ and ${\displaystyle (x,y)\in R}$.

There are very many types of relations. Indeed, further inspection of our earlier examples reveals that the two relations are quite different. In the case of the "is a child of" relationship, we observe that there are some people A,B where neither A is a child of B, nor B is a child of A. In the case of the ${\displaystyle \geq }$ operator, we know that for any two integers ${\displaystyle m,n\in Z}$ exactly one of ${\displaystyle m\geq n}$ or ${\displaystyle n>m}$ is true. In order to learn about relations, we must look at a smaller class of relations.

In particular, we care about the following properties of relations:

• Reflexivity: A relation ${\displaystyle R\subseteq X\times X}$ is reflexive if ${\displaystyle a\sim a}$ for all ${\displaystyle a\in X}$.
• Symmetry: A relation ${\displaystyle R\subseteq X\times X}$ is symmetric if ${\displaystyle {a\sim b}\implies {b\sim a}}$ for all ${\displaystyle a,b\in X}$.
• Transitivity: A relation ${\displaystyle R\subseteq X\times X}$ is transitive if ${\displaystyle {{a\sim b}\wedge {b\sim c}}\implies {a\sim c}}$ for all ${\displaystyle a,b,c\in X}$.

One should note that in all three of these properties, we quantify across all elements of the set ${\displaystyle X}$.

Any relation ${\displaystyle R\subseteq X\times X}$ which exhibits the properties of reflexivity, symmetry and transitivity is called an equivalence relation on ${\displaystyle X}$. Two elements related by an equivalence relation are called equivalent under the equivalence relation. We write ${\displaystyle a\sim _{R}b}$ to denote that ${\displaystyle a}$ and ${\displaystyle b}$ are equivalent under ${\displaystyle R}$. If only one equivalence relation is under consideration, we can instead write simply ${\displaystyle a\sim b}$. As a notational convenience, we can simply say that ${\displaystyle \sim }$ is an equivalence relation on a set ${\displaystyle X}$ and let the rest be implied.

Example: For a fixed integer ${\displaystyle p}$, we define a relation ${\displaystyle \sim _{p}}$ on the set of integers such that ${\displaystyle a\sim _{p}b}$ if and only if ${\displaystyle a-b=kp}$ for some ${\displaystyle k\in Z}$. Prove that this defines an equivalence relation on the set of integers.

Proof:

• Reflexivity: For any ${\displaystyle a\in X}$, it follows immediately that ${\displaystyle a-a=0=0p}$, and thus ${\displaystyle a\sim _{p}a}$ for all ${\displaystyle a\in G}$.
• Symmetry: For any ${\displaystyle a,b\in X}$, assume that ${\displaystyle a\sim _{p}b}$. It must then be the case that ${\displaystyle a-b=kp}$ for some integer ${\displaystyle k}$, and ${\displaystyle b-a=(-k)p}$. Since ${\displaystyle k}$ is an integer, ${\displaystyle -k}$ must also be an integer. Thus, ${\displaystyle {a\sim _{p}b}\implies {b\sim _{p}a}}$ for all ${\displaystyle a,b\in G}$.
• Transitivity: For any ${\displaystyle a,b,c\in X}$, assume that ${\displaystyle a\sim _{p}b}$ and ${\displaystyle b\sim _{p}c}$. Then ${\displaystyle a-b=k_{1}p}$ and ${\displaystyle b-c=k_{2}p}$ for some integers ${\displaystyle k_{1},k_{2}}$. By adding these two equalities together, we get ${\displaystyle {(a-b)+(b-c)=(k_{1}p)+(k_{2}p)}\Leftrightarrow {a-c=(k_{1}+k_{2})p}}$, and thus ${\displaystyle a\sim _{p}c}$.

Q.E.D.

Remark. In elementary number theory we denote this relation ${\displaystyle a\equiv b({\text{mod }}p)}$ and say a is equivalent to b modulo p.

## Equivalence classes

Let ${\displaystyle \sim }$ be an equivalence relation on ${\displaystyle X}$. Then, for any element ${\displaystyle a\in X}$ we define the equivalence class of ${\displaystyle a}$ as the subset ${\displaystyle \left[a\right]\subseteq X}$ given by

${\displaystyle \left[a\right]=\left\{b\in X|a\sim b\right\}}$

Theorem: ${\displaystyle b\in \left[a\right]\implies \left[b\right]=\left[a\right]}$

Proof: Assume ${\displaystyle b\in \left[a\right]}$. Then by definition, ${\displaystyle a\sim b}$.

• We first prove that ${\displaystyle \left[b\right]\subseteq \left[a\right]}$. Let ${\displaystyle p}$ be an arbitrary element of ${\displaystyle \left[b\right]}$. Then ${\displaystyle p\sim b}$ by definition of the equivalence class, and ${\displaystyle p\sim a}$ by transitivity of equivalence relations. Thus, ${\displaystyle {p\in \left[b\right]}\implies {p\in \left[a\right]}}$ and ${\displaystyle \left[b\right]\subseteq \left[a\right]}$.
• We now prove that ${\displaystyle \left[a\right]\subseteq \left[b\right]}$ Let ${\displaystyle q}$ be an arbitrary element of ${\displaystyle \left[a\right]}$. Then, by definition ${\displaystyle q\sim a}$. By transitivity, ${\displaystyle q\sim b}$, so ${\displaystyle q\in \left[b\right]}$. Thus, ${\displaystyle {q\in \left[a\right]}\implies {q\in \left[b\right]}}$ and ${\displaystyle \left[a\right]\subseteq \left[b\right]}$.

As ${\displaystyle \left[a\right]\subseteq \left[b\right]}$ and as ${\displaystyle \left[b\right]\subseteq \left[a\right]}$, we have ${\displaystyle \left[b\right]=\left[a\right]}$.

Q.E.D.

## Partitions of a set

A partition of a set ${\displaystyle X}$ is a disjoint family of sets ${\displaystyle X_{i}}$, ${\displaystyle i\in I}$, such that ${\displaystyle \bigcup _{i\in I}X_{i}=X}$.

Theorem: An equivalence relation ${\displaystyle \sim }$ on ${\displaystyle X}$ induces a unique partition of ${\displaystyle X}$, and likewise, a partition induces a unique equivalence relation on ${\displaystyle X}$, such that these are equivalent.

Proof: (Equivalence relation induces Partition): Let ${\displaystyle P}$ be the set of equivalence classes of ${\displaystyle \sim }$. Then, since ${\displaystyle a\in [a]}$ for each ${\displaystyle a\in X}$, ${\displaystyle \cup P=X}$. Furthermore, by the above theorem, this union is disjoint. Thus the set of equivalence relations of ${\displaystyle \sim }$ is a partition of ${\displaystyle X}$.

(Partition induces Equivalence relation): Let ${\displaystyle X_{i}\,,\,i\in I}$ be a partition of ${\displaystyle X}$. Then, define ${\displaystyle \sim }$ on ${\displaystyle X}$ such that ${\displaystyle a\sim b}$ if and only if both ${\displaystyle a}$ and ${\displaystyle b}$ are elements of the same ${\displaystyle X_{i}}$ for some ${\displaystyle i\in I}$. Reflexivity and symmetry of ${\displaystyle \sim }$ is immediate. For transitivity, if ${\displaystyle a,b\in X_{i}}$ and ${\displaystyle b,c\in X_{i}}$ for the same ${\displaystyle i\in I}$, we necessarily have ${\displaystyle a,c\in X_{i}}$, and transitivity follows. Thus, ${\displaystyle \sim }$ is an equivalence relation with ${\displaystyle X_{i}\,,\,i\in I}$ as the equivalence classes.

Lastly obtaining a partition ${\displaystyle P}$ from ${\displaystyle \sim }$ on ${\displaystyle X}$ and then obtaining an equivalence equation from ${\displaystyle P}$ obviously returns ${\displaystyle \sim }$ again, so ${\displaystyle \sim }$ and ${\displaystyle P}$ are equivalent structures.

Q.E.D.

## Quotients

Let ${\displaystyle \sim }$ be an equivalence relation on a set ${\displaystyle X}$. Then, define the set ${\displaystyle X/\sim }$ as the set of all equivalence classes of ${\displaystyle X}$. In order to say anything interesting about this construction we need more theory yet to be developed. However, this is one of the most important constructions we have, and one that will be given much attention throughout the book.

# Functions

## Definition

A function ${\displaystyle \operatorname {f} }$ is a triplet ${\displaystyle (A,B,G)}$ such that:

• ${\displaystyle A}$ is a set, called the domain of ${\displaystyle \operatorname {f} }$
• ${\displaystyle B}$ is a set, called the codomain of ${\displaystyle \operatorname {f} }$
• ${\displaystyle G}$ is a subset of ${\displaystyle A\times B}$, called the graph of ${\displaystyle \operatorname {f} }$

In addition the following two properties hold:

1. ${\displaystyle \forall x\in A,\exists y\in B\mid (x,y)\in G}$.
2. ${\displaystyle \forall x\in A,y\in B,y'\in B{\mbox{, then }}(x,y)\in G{\mbox{ and }}(x,y')\in G\Rightarrow y=y'}$.

${\displaystyle \forall x\in A}$ we write ${\displaystyle \operatorname {f} (x)}$ for the unique ${\displaystyle y\in B}$ such that ${\displaystyle (x,y)\in G}$.

We say that ${\displaystyle \operatorname {f} }$ is a function from ${\displaystyle A}$ to ${\displaystyle B}$, which we write:

${\displaystyle \operatorname {f} :A\rightarrow B}$

### Example

Let's consider the function from the reals to the reals which squares its argument. We could define it like this:

${\displaystyle \operatorname {f} :\mathbb {R} \rightarrow \mathbb {R} }$
${\displaystyle \operatorname {f} :x\mapsto x^{2}}$

### Remark

As you see in the definition of a function above, the domain and codomain are an integral part of the definition. In other words, even if the values of ${\displaystyle \operatorname {f} (x)}$ don't change, changing the domain or codomain changes the function.

Let's look at the following four functions.

The function:

${\displaystyle \operatorname {f_{1}} :\mathbb {R} \rightarrow \mathbb {R} }$
${\displaystyle \operatorname {f_{1}} :x\mapsto x^{2}}$

is neither injective nor surjective (these terms will be defined later).

The function:

${\displaystyle \operatorname {f_{2}} :\mathbb {R} \rightarrow \mathbb {R} _{\geq 0}}$
${\displaystyle \operatorname {f_{2}} :x\mapsto x^{2}}$

is not injective but surjective.

The function:

${\displaystyle \operatorname {f_{3}} :\mathbb {R} _{\geq 0}\rightarrow \mathbb {R} }$
${\displaystyle \operatorname {f_{3}} :x\mapsto x^{2}}$

is injective but not surjective.

The function:

${\displaystyle \operatorname {f_{4}} :\mathbb {R} _{\geq 0}\rightarrow \mathbb {R} _{\geq 0}}$
${\displaystyle \operatorname {f_{4}} :x\mapsto x^{2}}$

is injective and surjective

As you see, all four functions have the same mapping but all four are different. That's why just giving the mapping is insufficient; a function is only defined if its domain and codomain are known.

## Image and preimage

For a set ${\displaystyle E}$, we write ${\displaystyle {\mathcal {P}}(E)}$ for the set of subsets of ${\displaystyle E}$.

Let ${\displaystyle \operatorname {f} :A\rightarrow B}$. We will now define two related functions.

The image function:

${\displaystyle \operatorname {f} :{\mathcal {P}}(A)\rightarrow {\mathcal {P}}(B),S\subseteq A\mapsto \{\operatorname {f} (x)\mid x\in S\}}$

The preimage function:

${\displaystyle \operatorname {f^{-1}} :{\mathcal {P}}(B)\rightarrow {\mathcal {P}}(A),T\subseteq B\mapsto \{x\in A\mid \operatorname {f} (x)\in T\}}$

Note that the image and preimage are written respectively like ${\displaystyle \operatorname {f} }$ and its inverse (if it exists). There is however no ambiguity because the domains are different. Note also that the image and preimage are not necessarily inverse of one another. (See the section on bijective functions below).

We define ${\displaystyle \operatorname {Im} _{\operatorname {f} }:=\operatorname {f} (A)}$, which we call the image of ${\displaystyle \operatorname {f} }$.

For any ${\displaystyle y\in B}$, we call ${\displaystyle \operatorname {f^{-1}} (\{y\})}$ the support of ${\displaystyle y}$.

Proposition: Let ${\displaystyle \operatorname {f} :A\rightarrow B}$. Then

1. ${\displaystyle \forall S\subseteq A,S\subseteq f^{-1}(f(S))}$
2. ${\displaystyle \forall T\subseteq B,f(f^{-1}(T))\subseteq T}$

### Example

Let's take again the function:

${\displaystyle \operatorname {f} :\mathbb {R} \rightarrow \mathbb {R} }$
${\displaystyle \operatorname {f} :x\mapsto x^{2}}$

Let's consider the following examples:

${\displaystyle \operatorname {f^{-1}} (\{4\})=\{-2,2\}}$
${\displaystyle \operatorname {f^{-1}} (\mathbb {R} _{<0})=\emptyset }$
${\displaystyle \operatorname {f} (\mathbb {R} _{\geq 0})=\mathbb {R} _{\geq 0}}$

## Further definitions

Let ${\displaystyle \operatorname {f} :B\rightarrow C}$ and ${\displaystyle \operatorname {g} :A\rightarrow B}$. We define ${\displaystyle \operatorname {f} \circ \operatorname {g} :A\rightarrow C}$ by ${\displaystyle (\operatorname {f} \circ \operatorname {g} )(x):=\operatorname {f} (\operatorname {g} (x))}$, which we call the composition of ${\displaystyle \operatorname {f} }$ and ${\displaystyle \operatorname {g} }$.

Let ${\displaystyle A}$ be a set. We define the identity function on A as

${\displaystyle \operatorname {id_{A}} :A\rightarrow A,x\mapsto x}$

## Properties

Definition: A function ${\displaystyle \operatorname {f} :A\rightarrow B}$ is injective if

${\displaystyle \forall x\in A,x'\in A,\operatorname {f} (x)=\operatorname {f} (x')\Rightarrow x=x'}$

Lemma: Consider a function ${\displaystyle \operatorname {f} :A\rightarrow B}$ and suppose ${\displaystyle A\neq \emptyset }$. Then ${\displaystyle \operatorname {f} }$ is injective if and only if there exists a function ${\displaystyle \operatorname {g} :B\rightarrow A}$ with ${\displaystyle \operatorname {g} \circ \operatorname {f} =\operatorname {id_{A}} }$.
Proof:
${\displaystyle '\Rightarrow '}$:
Suppose ${\displaystyle \operatorname {f} }$ is injective. As ${\displaystyle A\neq \emptyset }$ let's define ${\displaystyle m}$ as an arbitrary element of ${\displaystyle A}$. We can then define a suitable function ${\displaystyle \operatorname {g} :B\rightarrow A}$ as follows:

${\displaystyle \operatorname {g} (y):=\left\{{\begin{array}{ll}{\mbox{the unique }}x\in A\mid \operatorname {f} (x)=y&{\text{, if }}y\in \operatorname {Im} _{\operatorname {f} }\\m&{\text{, else}}\\\end{array}}\right.}$

It is now easy to verify that ${\displaystyle \operatorname {g} \circ \operatorname {f} =\operatorname {id_{A}} }$.
${\displaystyle '\Leftarrow '}$:
Suppose there is a function ${\displaystyle \operatorname {g} :B\rightarrow A}$ with ${\displaystyle \operatorname {g} \circ \operatorname {f} =\operatorname {id_{A}} }$. Then ${\displaystyle \forall x,x'\in A,\operatorname {f} (x)=\operatorname {f} (x')\Rightarrow \operatorname {g} (\operatorname {f} (x))=\operatorname {g} (\operatorname {f} (x'))\Rightarrow x=x'}$. ${\displaystyle \operatorname {f} }$ is thus injective.
Q.E.D.

Definition: A function ${\displaystyle \operatorname {f} :A\rightarrow B}$ is surjective if

${\displaystyle \forall y\in B,\exists x\in A\mid \operatorname {f} (x)=y}$

Lemma: Consider a function ${\displaystyle \operatorname {f} :A\rightarrow B}$. Then ${\displaystyle \operatorname {f} }$ is surjective if and only if there exists a function ${\displaystyle \operatorname {g} :B\rightarrow A}$ with ${\displaystyle \operatorname {f} \circ \operatorname {g} =\operatorname {id_{B}} }$.
Proof:
${\displaystyle '\Rightarrow '}$:
Suppose ${\displaystyle \operatorname {f} }$ is surjective. We can define a suitable function ${\displaystyle \operatorname {g} :B\rightarrow A}$ as follows:

${\displaystyle \operatorname {g} (y):={\mbox{an }}x\in A\mid \operatorname {f} (x)=y}$

It is now easy to verify that ${\displaystyle \operatorname {f} \circ \operatorname {g} =\operatorname {id_{B}} }$.
${\displaystyle '\Leftarrow '}$:
Suppose there is a function ${\displaystyle \operatorname {g} :B\rightarrow A}$ with ${\displaystyle \operatorname {f} \circ \operatorname {g} =\operatorname {id_{B}} }$. Then ${\displaystyle \forall y\in B{\mbox{, let }}x:=\operatorname {g} (y)}$. Then ${\displaystyle \operatorname {f} (x)=\operatorname {f} (\operatorname {g} (y))=y}$. ${\displaystyle \operatorname {f} }$ is thus surjective.
Q.E.D.

Definition: A function ${\displaystyle \operatorname {f} :A\rightarrow B}$ is bijective if it is both injective and surjective.

Lemma: A function ${\displaystyle \operatorname {f} :A\rightarrow B}$ is bijective if and only if there exists a function ${\displaystyle \operatorname {g} :B\rightarrow A}$ with ${\displaystyle \operatorname {g} \circ \operatorname {f} =\operatorname {id_{A}} }$ and ${\displaystyle \operatorname {f} \circ \operatorname {g} =\operatorname {id_{B}} }$. Furthermore it can be shown that such a ${\displaystyle \operatorname {g} }$ is unique. We write it ${\displaystyle \operatorname {f^{-1}} :B\rightarrow A}$ and call it the inverse of ${\displaystyle \operatorname {f} }$.
Proof:
Left as an exercise.

Proposition: Consider a function ${\displaystyle \operatorname {f} :A\rightarrow B}$. Then

1. ${\displaystyle f}$ is injective iff ${\displaystyle \forall S\subseteq A,f^{-1}(f(S))=S}$
2. ${\displaystyle f}$ is surjective iff ${\displaystyle \forall T\subseteq B,f(f^{-1}(T))=T}$
3. ${\displaystyle f}$ is bijective iff the image and preimage of ${\displaystyle f}$ are inverse of each other

Example: If ${\displaystyle A}$ and ${\displaystyle B}$ are sets such that ${\displaystyle B\subseteq A}$, there exists an obviously injective function ${\displaystyle i\,:\,B\rightarrow A}$, called the inclusion ${\displaystyle B\subseteq A}$, such that ${\displaystyle i(b)=b}$ for all ${\displaystyle b\in B}$.

Example: If ${\displaystyle \sim }$ is an equivalence relation on a set ${\displaystyle X}$, there is an obviously surjective function ${\displaystyle \pi \,:\,X\rightarrow X/\sim }$, called the canonical projection onto ${\displaystyle X/\sim }$, such that ${\displaystyle \pi (x)=[x]}$ for all ${\displaystyle x\in X}$.

Theorem: Define the equivalence relation ${\displaystyle \sim }$ on ${\displaystyle A}$ such that ${\displaystyle a\sim b}$ if and only if ${\displaystyle f(a)=f(b)}$. Then, if ${\displaystyle f:A\rightarrow B}$ is any function, ${\displaystyle f}$ decomposes into the composition

${\displaystyle A{\stackrel {\pi }{\longrightarrow }}A/\sim {\stackrel {\tilde {f}}{\longrightarrow }}\mathrm {im} f{\stackrel {i}{\longrightarrow }}B}$

where ${\displaystyle \pi }$ is the canonical projection, ${\displaystyle i}$ is the inclusion ${\displaystyle \mathrm {im} \,f\subseteq B}$, and ${\displaystyle {\tilde {f}}}$ is the bijection ${\displaystyle {\tilde {f}}([a])=f(a)}$ for all ${\displaystyle a\in A}$.

Proof: The definition of ${\displaystyle {\tilde {f}}}$ immediately implies that ${\displaystyle f=i\circ {\tilde {f}}\circ \pi }$, so we only have to prove that ${\displaystyle {\tilde {f}}}$ is well defined and a bijection. Let ${\displaystyle a,a^{\prime }\in A}$. Then ${\displaystyle [a]=[a^{\prime }]\,\Rightarrow \,a\sim a^{\prime }\,\Rightarrow \,f(a)=f(a^{\prime })}$. This shows that the value of ${\displaystyle {\tilde {f}}([a])}$ is independent of the representative chosen from ${\displaystyle [a]}$, and so it is well-defined.

For injectivity, we have ${\displaystyle {\tilde {f}}([a])={\tilde {f}}([a^{\prime }])\,\Rightarrow \,f(a)=f(a^{\prime })\,\Rightarrow \,[a]=[a^{\prime }]}$, so ${\displaystyle {\tilde {f}}}$ is injective.

For surjectivity, let ${\displaystyle b\in \mathrm {im} \,f}$. Then there exists an ${\displaystyle a\in A}$ such that ${\displaystyle f(a)=b}$, and so ${\displaystyle {\tilde {f}}([a])=b}$ by definition of ${\displaystyle {\tilde {f}}}$. Since ${\displaystyle b}$ is arbitrary in ${\displaystyle \mathrm {im} \,f}$, this proves that ${\displaystyle {\tilde {f}}}$ is surjective.

Q.E.D.

Definition: Given a function ${\displaystyle f\,:\,X\rightarrow Y}$, ${\displaystyle f}$ is a

(i) Monomorphism if given any two functions ${\displaystyle g,h\,:\,W\rightarrow X}$ such that ${\displaystyle f\circ g=f\circ h}$, then ${\displaystyle g=h}$.

(ii) Epimorphism if given any two functions ${\displaystyle g,h\,:\,Y\rightarrow Z}$ such that ${\displaystyle g\circ f=h\circ f}$, then ${\displaystyle g=h}$.

Theorem: A function between sets is

(i) a monomorphism if and only if it is injective.

(ii) an epimorphism if and only if it is surjective.

Proof: (i) Let ${\displaystyle f\,:\,B\rightarrow C}$ be a monomorphism. Then, for any two functions ${\displaystyle g,h\,:\,A\rightarrow B}$, ${\displaystyle f(g(a))=f(h(a))\,\Rightarrow \,g(a)=h(a)}$ for all ${\displaystyle a\in A}$. This is the definition if injectivity. For the converse, if ${\displaystyle f}$ is injective, it has a left inverse ${\displaystyle f^{\prime }}$. Thus, if ${\displaystyle f(g(a))=f(h(a))}$ for all ${\displaystyle a\in A}$, compose with ${\displaystyle f^{\prime }}$ on the left side to obtain ${\displaystyle g(a)=h(a)}$, such that ${\displaystyle f}$ is a monomorphism.

(ii) Let ${\displaystyle f\,:\,A\rightarrow B}$ be an epimorphism. Then, for any two functions ${\displaystyle g,h\,:\,B\rightarrow C}$, ${\displaystyle g(f(a))=h(f(a))\,\Rightarrow \,g(b)=h(b)}$ for all ${\displaystyle a\in A}$ and ${\displaystyle b\in B}$. Assume ${\displaystyle \mathrm {im} f\neq B}$, that is, that ${\displaystyle f}$ is not surjective. Then there exists at least one ${\displaystyle b\in B}$ not in ${\displaystyle \mathrm {im} \,f}$. For this ${\displaystyle b}$ choose two functions ${\displaystyle g,h}$ which coincide on ${\displaystyle \mathrm {im} \,f}$ but disagree on ${\displaystyle \{b\}}$. However, we still have ${\displaystyle g(f(a))=h(f(a))}$ for all ${\displaystyle a\in A}$. This violates our assumption that ${\displaystyle f}$ is an epimorphism. Consequentally, ${\displaystyle f}$ is surjective. For the converse, assume ${\displaystyle f}$ is surjective. Then the epimorphism property immediately follows.

Q.E.D.

Remark: The equivalence between monomorphism and injectivity, and between epimorphism and surjectivity is a special property of functions between sets. This not the case in general, and we will see examples of this when discussing structure-preserving functions between groups or rings in later sections.

Example: Given any two sets ${\displaystyle A}$ and ${\displaystyle B}$, we have the canonical projections ${\displaystyle \pi _{A}\,:\,A\times B\rightarrow A}$ sending ${\displaystyle (a,b)}$ to ${\displaystyle a}$, and ${\displaystyle \pi _{B}\,:\,A\times B\rightarrow B}$ sending ${\displaystyle (a,b)}$ to ${\displaystyle b}$. These maps are obviously surjective.

In addition, we have the natural inclusions ${\displaystyle i_{A}\,:\,A\rightarrow A\coprod B}$ and ${\displaystyle i_{B}\,:\,B\rightarrow A\coprod B}$ which are obviously injective as stated above.

### Universal properties

The projections and inclusions described above are special, in that they satisfy what are called universal properties. We will give the theorem below. The proof is left to the reader.

Theorem: Let ${\displaystyle A,B,C}$ be any sets.

(i) Let ${\displaystyle f\,:\,C\rightarrow A}$ and ${\displaystyle g\,:\,C\rightarrow B}$. Then there exists a unique function ${\displaystyle u\,:\,C\rightarrow A\times B}$ such that ${\displaystyle f=\pi _{A}\circ u}$ and ${\displaystyle g=\pi _{B}\circ u}$ are simultaneously satisfied. ${\displaystyle u}$ is sometimes denoted ${\displaystyle f\times g}$.

(ii) Let ${\displaystyle f\,:\,A\rightarrow C}$ and ${\displaystyle g\,:\,B\rightarrow C}$. Then there exists a unique function ${\displaystyle u\,:\,A\coprod B\rightarrow C}$ such that ${\displaystyle f=u\circ i_{A}}$ and ${\displaystyle g=u\circ i_{B}}$ are simultaneously satifsied.

The canonical projections onto quotients also satisfy a universal property.

Theorem: Define the equivalence relation ${\displaystyle \sim }$ on ${\displaystyle X}$ and let ${\displaystyle f\,:\,X\rightarrow Y}$ be any function such that ${\displaystyle a\sim b\,\Rightarrow \,f(a)=f(b)}$ for all ${\displaystyle a,b\in X}$. Then there exists a unique function ${\displaystyle {\bar {f}}\,:\,X/\sim \rightarrow Y}$ such that ${\displaystyle f={\bar {f}}\circ \pi }$, where ${\displaystyle \pi \,:\,X\rightarrow X/\sim }$ is the canonical projection.

# Binary Operations

A binary operation on a set ${\displaystyle A}$ is a function ${\displaystyle *:A\times A\rightarrow A}$. For ${\displaystyle a,b\in A}$, we usually write ${\displaystyle *(a,b)}$ as ${\displaystyle a*b}$.

## Properties

The property that ${\displaystyle a*b\in A}$ for all ${\displaystyle a,b\in A}$ is called closure under ${\displaystyle *}$.

Example: Addition between two integers produces an integer result. Therefore addition is a binary operation on the integers. Whereas division of integers is an example of an operation that is not a binary operation. ${\displaystyle 1/2}$ is not an integer, so the integers are not closed under division.

To indicate that a set ${\displaystyle A}$ has a binary operation ${\displaystyle *}$ defined on it, we can compactly write ${\displaystyle (A,*)}$. Such a pair of a set and a binary operation on that set is collectively called a binary structure. A binary structure may have several interesting properties. The main ones we will be interested in are outlined below.

Definition: A binary operation ${\displaystyle *}$ on ${\displaystyle A}$ is associative if for all ${\displaystyle a,b,c\in A}$, ${\displaystyle (a*b)*c=a*(b*c)}$.

Example: Addition of integers is associative: ${\displaystyle (1+2)+3=6=1+(2+3)}$. Notice however, that subtraction is not associative. Indeed, ${\displaystyle 2=1-(2-3)\neq (1-2)-3=-4}$.

Definition: A binary operation ${\displaystyle *}$ on ${\displaystyle A}$ is commutative is for all ${\displaystyle a,b\in A}$, ${\displaystyle a*b=b*a}$.

Example: Multiplication of rational numbers is commutative: ${\displaystyle {\frac {a}{b}}\cdot {\frac {c}{d}}={\frac {ac}{bd}}={\frac {ca}{bd}}={\frac {c}{d}}\cdot {\frac {a}{b}}}$. Notice that division is not commutative: ${\displaystyle 2\div 3={\frac {2}{3}}}$ while ${\displaystyle 3\div 2={\frac {3}{2}}}$. Notice also that commutativity of multiplication depends on the fact that multiplication of integers is commutative as well.

## Exercise

• Of the four arithmetic operations, addition, subtraction, multiplication, and division, which are associative? commutative and identity?

operation associative commutative
Multiplication yes yes
Subtraction No No
Division No No

## Algebraic structures

Binary operations are the working parts of algebraic structures:

### One binary operation

A closed binary operation o on a set A is called a magma (A, o ).

If the binary operation respects the associative law a o (b o c) = (a o b) o c, then the magma (A, o ) is a semigroup.

If a magma has an element e satisfying e o x = x = x o e for every x in it, then it is a unital magma. The element e is called the identity with respect to o. If a unital magma has elements x and y such that x o y = e, then x and y are inverses with respect to each other.

A magma for which every equation a x = b has a solution x, and every equation y c = d has a solution y, is a quasigroup. A unital quasigroup is a loop.

A unital semigroup is called a monoid. A monoid for which every element has an inverse is a group. A group for which x o y = y o x for all its elements x and y is called a commutative group. Alternatively, it is called an abelian group.

### Two binary operations

A pair of structures with one operation can used to build those with two: Take (A, o ) as a commutative group with identity e. Let A_ denote A with e removed, and suppose (A_ , * ) is a monoid with binary operation * that distributes over o: a * (b o c) = (a * b) o (a * c). Then (A, o, * ) is a ring.

In this construction of rings, when the monoid (A_ , * ) is a group, then (A, o, * ) is a division ring or skew field. And when (A_ , * ) is a commutative group, then (A, o, * ) is a field.

The two operations sup (v) and inf (^) are presumed commutative and associative. In addition, the absorption property requires: a ^ (a v b) = a, and a v (a ^ b) = a. Then (A, v, ^ ) is called a lattice.

In a lattice, the modular identity is (a ^ b) v (x ^ b) = ((a ^ b) v x ) ^ b. A lattice satisfying the modular identity is a modular lattice.

# Linear Algebra

The reader is expected to have some familiarity with linear algebra. For example, statements such as

Given vector spaces ${\displaystyle V}$ and ${\displaystyle W}$ with bases ${\displaystyle B}$ and ${\displaystyle C}$ and dimensions ${\displaystyle n}$ and ${\displaystyle m}$, respectively, a linear map ${\displaystyle f\,:\,V\to W}$ corresponds to a unique ${\displaystyle m\times n}$ matrix, dependent on the particular choice of basis.

should be familiar. It is impossible to give a summary of the relevant topics of linear algebra in one section, so the reader is advised to take a look at the linear algebra book.

In any case, the core of linear algebra is the study of linear functions, that is, functions with the property ${\displaystyle f(\alpha x+\beta y)=\alpha f(x)+\beta f(y)}$, where greek letters are scalars and roman letters are vectors.

The core of the theory of finitely generated vector spaces is the following:

Every finite-dimensional vector space ${\displaystyle V}$ is isomorphic to ${\displaystyle \mathbb {F} ^{n}}$ for some field ${\displaystyle \mathbb {F} }$ and some ${\displaystyle n\in \mathbb {N} }$, called the dimension of ${\displaystyle V}$. Specifying such an isomorphism is equivalent to choosing a basis for ${\displaystyle V}$. Thus, any linear map between vector spaces ${\displaystyle f\,:\,V\to W}$ with dimensions ${\displaystyle n}$ and ${\displaystyle m}$ and given bases ${\displaystyle \phi }$ and ${\displaystyle \psi }$ induces a unique linear map ${\displaystyle [f]_{\phi }^{\psi }\,:\,\mathbb {R} ^{n}\to \mathbb {R} ^{m}}$. These maps are precisely the ${\displaystyle m\times n}$ matrices, and the matrix in question is called the matrix representation of ${\displaystyle f}$ relative to the bases ${\displaystyle \phi ,\psi }$.

Remark: The idea of identifying a basis of a vector space with an isomorphism to ${\displaystyle \mathbb {F} ^{n}}$ may be new to the reader, but the basic principle is the same. An alternative term for vector space is coordinate space since any point in the space may be expressed, on some particular basis, as a sequence of field elements. (All bases are equivalent under some non-singular linear transformation.) The name associated with pointy things like arrows, spears, or daggers, is distasteful to peace-loving people who don’t imagine taking up such a weapon. The orientation or direction associated with a point in coordinate space is implicit in the positive orientation of the real line (if that is the field) or in an orientation instituted in a polar expression of the multiplicative group of the field.

A coordinate space V with basis ${\displaystyle \{e_{1},e_{2},...e_{n}\}}$ has vectors ${\displaystyle v=\sum _{i=1}^{n}x_{i}e_{i}=(x_{1},x_{2},...x_{n}).}$ where ei is all zeros except 1 at index i.

As an algebraic structure, V is an amalgam of an abelian group (addition and subtraction of vectors), a scalar field F (the source of the xi's), its multiplicative group F *, and a group action F * x VV, given by

${\displaystyle (k,v)\mapsto \sum _{i=1}^{n}kx_{i}e_{i}=(kx_{1},kx_{2},...kx_{n}).}$ The group action is scalar-vector multiplication.

Linear transformations are mappings from one coordinate space V to another W corresponding to a matrix (ai j ). Suppose W has basis

${\displaystyle \{f_{i}\}_{i=1}^{n}\ {\text{and vectors}}\ \ w=\sum _{i=1}^{n}y_{i}f_{i}=(y_{1},y_{2},...y_{n}).}$

Then the elements of the matrix (ai j ) are given by the rate of change of yj depending on xi:

${\displaystyle a_{ij}={\frac {\partial y_{j}}{\partial x_{i}}}=}$ constant.

A common case involves V = W and n is a low number, such as n = 2. When F = {real numbers} = R, the set of matrices is denoted M(2,R). As an algebraic structure, M(2,R) has two binary operations that make it a ring: component-wise addition and matrix multiplication. See the chapter on 2x2 real matrices for a deconstruction of M(2,R) into a pencil of planar algebras.

More generally, when dim V = dim W = n, (ai j ) is a square matrix, an element of M(n, F), which is a ring with the + and x binary operations. These benchmarks in algebra serve as representations. In particular, when the rows or columns of such a matrix are linearly independent, then there is a matrix (bi j ) acting as a multiplicative inverse with respect to the identity matrix. The subset of invertible matrices is called the general linear group, GL(n, F). This group and its subgroups carry the burden of demonstrating physical symmetries associated with them.

The pioneers in this field included w:Sophus Lie, who viewed the continuous groups as evolving out of 1 in all directions according to an "algebra" now named after him. w:Hermann Weyl, spurred on by Eduard Study, explored and named GL(n, F) and its subgroups, calling them the classical groups.

# Number Theory

As numbers of various number systems form basic units with which one must work when studying abstract algebra, we will now define the natural numbers and the rational integers as well as the basic operations of addition and multiplication. Using these definitions, we will also derive important properties of these number sets and operations. Following this, we will discuss important concepts in number theory; this will lead us to discussion of the properties of the integers modulo n.

## The Peano postulates and the natural numbers

Definition: Using the undefined notions "1" and "successor" (denoted by ${\displaystyle '}$), we define the set of natural numbers without zero ${\displaystyle \mathbb {N} ^{*}}$, hereafter referred to simply as the natural numbers, with the following axioms, which we call the Peano postulates:

Axiom 1. ${\displaystyle \exists 1(1\in \mathbb {N} ^{*}).}$
Axiom 2. ${\displaystyle \forall a(a\in \mathbb {N} ^{*}\implies \exists b(b=a')).}$
Axiom 3. ${\displaystyle \lnot \exists a(a'=1).}$
Axiom 4. ${\displaystyle \forall a\in \mathbb {N} ^{*}(\forall b\in \mathbb {N} ^{*}(a'=b'\implies a=b)).}$
Axiom 5. ${\displaystyle \forall A\subseteq \mathbb {N} ^{*}((1\in A)\land \forall a\in A(a'\in A)\implies A=\mathbb {N} ^{*}).}$

We can prove theorems for natural numbers using mathematical induction as a consequence of the fifth Peano Postulate.

Definition: We recursively define addition for the natural numbers as a composition using two more axioms; the other properties of addition can subsequently be derived from these axioms. We denote addition with the infix operator +.

Axiom 6. ${\displaystyle \forall a\in \mathbb {N} ^{*}(a+1=a').}$
Axiom 7. ${\displaystyle \forall a\in \mathbb {N} ^{*}(\forall b\in \mathbb {N} ^{*}(a+b'=(a+b)')).}$

Axiom 6 above relies on the first Peano postulate (for the existence of 1) as well as the second (for the existence of a successor for every number).

Henceforth, we will assume that proven theorems hold for all ${\displaystyle a,b,c,\ldots ,n}$ in ${\displaystyle \mathbb {N} ^{*}}$.

### Multiplication

Definition: We similarly define multiplication for the natural numbers recursively, again using two axioms:

Axiom 8. ${\displaystyle a(1)=a.}$
Axiom 9. ${\displaystyle ab'=ab+a.}$

### Properties of addition

We start by proving that addition is associative.

Theorem 1: Associativity of addition: ${\displaystyle (a+b)+c=a+(b+c).}$

Proof: Base case: By axioms 6 and 7, ${\displaystyle a+(b+1)=(a+b)'}$.

By axiom 6, ${\displaystyle a+(b+1)=(a+b)+1}$.
Inductive hypothesis: Suppose that, for ${\displaystyle k'>1}$, ${\displaystyle (a+b)+k=a+(b+k)}$.
Inductive step: By axiom 7, ${\displaystyle (a+b)+k'=\left[(a+b)+k\right]'}$.
By the inductive hypothesis, ${\displaystyle (a+b)+k'=\left[a+(b+k)\right]'}$.
By axiom 7, ${\displaystyle (a+b)+k'=a+(b+k)'}$.
By axiom 7, ${\displaystyle (a+b)+k'=a+(b+k')}$.
By induction, ${\displaystyle (a+b)+c=a+(b+c)}$. QED.

Lemma 1: ${\displaystyle a+1=1+a.}$

Proof: Base case: 1+1=1+1.

Inductive hypothesis: Suppose that, for ${\displaystyle k'>1}$, ${\displaystyle k+1=1+k}$.
Inductive step: By axiom 6, ${\displaystyle k'+1=(k+1)+1}$.
By the inductive hypothesis, ${\displaystyle k'+1=(1+k)+1}$.
By theorem 1, ${\displaystyle k'+1=1+(k+1)}$.
By axiom 6, ${\displaystyle k'+1=1+k'}$.
By induction, ${\displaystyle a+1=1+a}$. QED.

Theorem 2: Commutativity of addition: ${\displaystyle a+b=b+a.}$

Proof: Base case: By lemma 1, ${\displaystyle a+1=1+a}$.

Inductive hypothesis: Suppose that, for ${\displaystyle k'>1}$, ${\displaystyle a+k=k+a}$.
By axiom 6, ${\displaystyle a+k'=a+(k+1)}$.
By theorem 1, ${\displaystyle a+k'=(a+k)+1}$.
By the inductive hypothesis, ${\displaystyle a+k'=(k+a)+1}$.
By theorem 1, ${\displaystyle a+k'=k+(a+1)}$.
By lemma 1, ${\displaystyle a+k'=k+(1+a)}$.
By theorem 1, ${\displaystyle a+k'=(k+1)+a}$.
By axiom 6, ${\displaystyle a+k'=k'+a}$.
By induction, ${\displaystyle a+b=b+a}$. QED.

Theorem 3: ${\displaystyle a+b=a+c\implies b=c}$.

Proof: Base case: Suppose ${\displaystyle 1+b=1+c}$.

By theorem 2, ${\displaystyle b+1=c+1}$.
By axiom 6, ${\displaystyle b'=c'}$.
By axiom 4, ${\displaystyle b=c}$.
Inductive hypothesis: Suppose that, for ${\displaystyle k'>1}$, ${\displaystyle k+b=k+c\implies b=c}$.
Inductive step: Suppose ${\displaystyle k'+b=k'+c}$.
By axiom 6, ${\displaystyle (k+1)+b=(k+1)+c}$.
By theorem 2, ${\displaystyle (1+k)+b=(1+k)+c}$.
By theorem 1, ${\displaystyle 1+(k+b)=1+(k+c)}$.
By the base case, ${\displaystyle k+b=k+c}$. Thus, ${\displaystyle k'+b=k'+c\implies k+b=k+c}$.
By the inductive hypothesis, ${\displaystyle k'+b=k'+c\implies b=c}$.
By induction, ${\displaystyle a+b=a+c\implies b=c}$. QED.

### Properties of multiplication

Theorem 4: Left-distributivity of multiplication over addition: ${\displaystyle a(b+c)=ab+ac}$.

Proof: Base case: By axioms 6 and 9, ${\displaystyle a(b+1)=ab+a}$.

By axiom 8, ${\displaystyle a(b+1)=ab+a(1)}$.
Inductive hypothesis: Suppose that, for ${\displaystyle k'>1}$, ${\displaystyle a(b+k)=ab+ak}$.
Inductive step: By axiom 7, ${\displaystyle a(b+k')=a(b+k)'}$.
By axiom 9, ${\displaystyle a(b+k')=a(b+k)+a}$.
By the inductive hypothesis, ${\displaystyle a(b+k')=(ab+ak)+a}$.
By theorem 1, ${\displaystyle a(b+k')=ab+(ak+a)}$.
By axiom 9, ${\displaystyle a(b+k')=ab+ak'}$.
By induction, ${\displaystyle a(b+c)=ab+ac}$. QED.

Theorem 5: ${\displaystyle 1a=a}$.

Proof: Base case: By axiom 8, 1(1)=1.

Inductive hypothesis: Suppose that, for ${\displaystyle k'>1}$, ${\displaystyle 1k=k}$.
Inductive step: By axiom 6, ${\displaystyle 1k'=1(k+1)}$.
By theorem 4, ${\displaystyle 1k'=1k+1(1)}$.
By the base case, ${\displaystyle 1k'=1k+1}$.
By the inductive hypothesis, ${\displaystyle 1k'=k+1}$.
By axiom 6, ${\displaystyle 1k'=k'}$.
By induction, ${\displaystyle 1a=a}$. QED.

Theorem 6: ${\displaystyle a'b=ab+b}$.

Proof: Base case: By axiom 8, ${\displaystyle a'(1)=a'}$.

By axiom 6, ${\displaystyle a'(1)=a+1}$.
By axiom 8, ${\displaystyle a'(1)=a(1)+1}$.
Inductive hypothesis: Suppose that, ${\displaystyle k'>1}$, ${\displaystyle a'k=ak+k}$.
Inductive step: By axiom 9, ${\displaystyle a'k'=a'k+a'}$.
By the inductive hypothesis, ${\displaystyle a'k'=ak+k+a'}$.
By axiom 6, ${\displaystyle a'k'=ak+k+(a+1)}$.
By theorem 1, ${\displaystyle a'k'=ak+(k+a)+1}$.
By theorem 2, ${\displaystyle a'k'=ak+(a+k)+1}$.
By theorem 1, ${\displaystyle a'k'=ak+a+k+1}$
By axiom 9, ${\displaystyle a'k'=ak'+k+1}$.
By theorem 1, ${\displaystyle a'k'=ak'+(k+1)}$.
By axiom 6, ${\displaystyle a'k'=ak'+k'}$.
By induction, ${\displaystyle a'b=ab+b}$. QED.

Theorem 7: Associativity of multiplication: ${\displaystyle (ab)c=a(bc).}$

Proof: Base case: By axiom 8, ${\displaystyle ab(1)=ab=a\left[b(1)\right]}$.

Inductive hypothesis: Suppose that, for ${\displaystyle k'>1}$, ${\displaystyle (ab)k=a(bk)}$.
Inductive step: By axiom 9, ${\displaystyle (ab)k'=(ab)k+ab}$.
By the inductive hypothesis, ${\displaystyle (ab)k'=a(bk)+ab}$.
By theorem 4, ${\displaystyle (ab)k'=a(bk+b)}$.
By axiom 9, ${\displaystyle (ab)k'=a(bk')}$.
By induction, ${\displaystyle (ab)c=a(bc)}$. QED.

Theorem 8: Commutativity of multiplication: ${\displaystyle ab=ba}$.

Proof: Base case: By axiom 8 and theorem 5, ${\displaystyle a(1)=a=1a}$.

Inductive hypothesis: Suppose that, for ${\displaystyle k'>1}$, ${\displaystyle ak=ka}$.
Inductive step: By axiom 9, ${\displaystyle ak'=ak+a}$.
By the inductive hypothesis, ${\displaystyle ak'=ka+a}$.
By theorem 6, ${\displaystyle ak'=k'a}$.
By induction, ${\displaystyle ab=ba}$. QED.

Theorem 9: Right-distributivity of multiplication over addition: ${\displaystyle (a+b)c=ac+bc}$.

Proof: By theorems 4 and 7, ${\displaystyle (a+b)c=ca+cb}$.

By theorem 7, ${\displaystyle (a+b)c=ac+bc}$. QED.

## The integers

The set of integers ${\displaystyle \mathbb {Z} }$ can be constructed from ordered pairs of natural numbers (a, b). We define an equivalence relation on the set of all such ordered pairs such that

${\displaystyle (a,b)\equiv (c,d)\Leftrightarrow a+d=c+b.}$

Then the set of rational integers is the set of all equivalence classes of such ordered pairs. We will denote the equivalence class of which some pair (a, b) is a member with the notation [(a, b)]. Then, for any natural numbers a and b, [(a, b)] represents a rational integer.

Definition: We define addition for the integers as follows:

${\displaystyle \left[(a,b)\right]+\left[(c,d)\right]=\left[(a+c,b+d)\right].}$

Using this definition and the properties for the natural numbers, one can prove that integer addition is both associative and commutative.

### Integer multiplication

Definition: Multiplication for the integers, like addition, can be defined with a single axiom:

${\displaystyle \left[(a,b)\right]\left[(c,d)\right]=\left[(ac+bd,ad+bc)\right].}$

Again, using this definition and the previously-proven properties of natural numbers, it can be shown that integer multiplication is commutative and associative, and furthermore that it is both left- and right-distributive with respect to integer addition.

# Group Theory/Group

In this section we will begin to make use of the definitions we made in the section about binary operations. In the next few sections, we will study a specific type of binary structure called a group. First, however, we need some preliminary work involving a less restrictive type of binary structure.

## Monoids

Definition 1: A monoid is a binary structure ${\displaystyle (M,*)}$ satisfying the following properties:

(i) ${\displaystyle (a*b)*c=a*(b*c)}$ for all ${\displaystyle a,b,c\in M}$. This is defined as associativity.
(ii) There exists an identity element ${\displaystyle e\in M}$ such that ${\displaystyle a*e=a=e*a}$ for all ${\displaystyle a\in M}$.

Now we have our axioms in place, we are faced with a pressing question; what is our first theorem going to be? Since the first few theorems are not dependent on one another, we simply have to make an arbitrary choice. We choose the following:

Theorem 2: The identity element of ${\displaystyle M}$ is unique.

Proof: Assume ${\displaystyle e}$ and ${\displaystyle e^{\prime }}$ are both identity elements of ${\displaystyle M}$. Then both satisfy condition (ii) in the definition above. In particular, ${\displaystyle e=e*e^{\prime }=e^{\prime }}$, proving the theorem.

This theorem will turn out to be of fundamental importance later when we define groups.

Theorem 3: If ${\displaystyle a_{1},a_{2},\ldots ,a_{n}}$ are elements of ${\displaystyle M}$ for some ${\displaystyle n\in \mathbb {N} }$, then the product ${\displaystyle a_{1}*a_{2}*\cdots *a_{n}}$ is unambiguous.

Proof: We can prove this by induction. The cases for ${\displaystyle n=1}$ and ${\displaystyle n=2}$ are trivially true. Assume that the statement is true for all ${\displaystyle n. For ${\displaystyle n=k}$, the product ${\displaystyle a_{1}*\cdots *a_{k}}$, inserting parentheses, can be "partitioned" into ${\displaystyle (a_{1}*\cdots *a_{i})*(a_{i+1}*\cdots *a_{k})}$. Both parts of the product have a number of elements less than ${\displaystyle k}$ and are thus unambiguous. The same is true if we consider a different "partition", ${\displaystyle (a_{1}*\cdots *a_{j})*(a_{j+1}*\cdots *a_{k})}$, where ${\displaystyle j>i}$. Thus, we can unambiguously compute the products ${\displaystyle (a_{1}*\cdots *a_{i})}$, ${\displaystyle (a_{i+1}*\cdots *a_{j})}$, and ${\displaystyle (a_{j+1}*\cdots *a_{k})}$, and rewrite the two "partitions" as ${\displaystyle b_{1}*(b_{2}*b_{3})}$ and ${\displaystyle (b_{1}*b_{2})*b_{3}}$. These equal each other by the definition of a monoid.

This is about as far as we are going to take the idea of a monoid. We now proceed to groups.

## Groups

Definition 4: A group is a monoid ${\displaystyle (G,*)}$ that also satisfies the property

(iii) For each ${\displaystyle a\in G}$, there exists an element ${\displaystyle a^{\prime }\in G}$ such that ${\displaystyle a*a^{\prime }=a^{\prime }*a=e}$.

Such an element ${\displaystyle a^{\prime }}$ is called an inverse of ${\displaystyle a}$. When the operation on the group is understood, we will conveniently refer to ${\displaystyle (G,*)}$ as ${\displaystyle G}$. In addition, we will gradually stop using the symbol ${\displaystyle *}$ for multiplication when we are dealing with only one group, or when it is understood which operation is meant, instead writing products by juxtaposition, ${\displaystyle a*b\equiv ab}$.

Remark 5: Notice how this definition depends on Theorem 2 to be well defined. Therefore, we could not state this definition before at least proving uniqueness of the identity element. Alternatively, we could have included the existence of a distinguished identity element in the definition. In the end, the two approaches are logically equivalent.

Also note that to show that a monoid is a group, it is sufficient to show that each element has either a left-inverse or a right-inverse. Let ${\displaystyle a\in G}$, let ${\displaystyle b}$ be a right-inverse of ${\displaystyle a}$, and let ${\displaystyle c}$ be a right-inverse of ${\displaystyle b}$. Then, ${\displaystyle a=a(bc)=(ab)c=c}$. Thus, any right-inverse is also a left-inverse, or ${\displaystyle ab=ba}$. A similar argument can be made for left-inverses.

Theorem 6: The inverse of any element is unique.

Proof: Let ${\displaystyle g\in G}$ and let ${\displaystyle g^{\prime }}$ and ${\displaystyle g^{\prime \prime }}$ be inverses of ${\displaystyle g}$. Then, ${\displaystyle g^{\prime }=g^{\prime }*e=g^{\prime }*g*g^{\prime \prime }=e*g^{\prime \prime }=g^{\prime \prime }}$.

Thus, we can speak of the inverse of an element, and we will denote this element by ${\displaystyle a^{-1}}$. We also observe this nice property:

Corollary 7: ${\displaystyle (a^{-1})^{-1}=a}$.

Proof: This follows immediately since ${\displaystyle a*a^{-1}=a^{-1}*a=e}$.

The next couple of theorems may appear obvious, but in the interest of keeping matters fairly rigorous, we allow ourselves to state and prove seemingly trivial statements.

Theorem 8: Let ${\displaystyle G}$ be a group and ${\displaystyle a,b\in G}$. Then ${\displaystyle (a*b)^{-1}=b^{-1}*a^{-1}}$.

Proof: The result follows by direct computation: ${\displaystyle (a*b)*(b^{-1}*a^{-1})=a*b*b^{-1}*a^{-1}=a*e*a^{-1}=a*a^{-1}=e}$.

Theorem 9: Let ${\displaystyle a,b,c\in G}$. Then, ${\displaystyle a*b=a*c}$ if and only if ${\displaystyle b=c}$. Also, ${\displaystyle a*c=b*c}$ if and only if ${\displaystyle a=b}$.

Proof: We will prove the first assertion. The second is identical. Assume ${\displaystyle a*b=a*c}$. Then, multiply on the left by ${\displaystyle a^{-1}}$ to obtain ${\displaystyle b=c}$. Secondly, assume ${\displaystyle b=c}$. Then, multiply on the left by ${\displaystyle a}$ to obtain ${\displaystyle a*b=a*c}$.

Theorem 10: The equation ${\displaystyle a*x=b}$ has a unique solution in ${\displaystyle G}$ for any ${\displaystyle a,b\in G}$.

Proof: We must show existence and uniqueness. For existence, observe that ${\displaystyle x=a^{-1}*b}$ is a solution in ${\displaystyle G}$. For uniqueness, multiply both sides of the equation on the left by ${\displaystyle a^{-1}}$ to show that this is the only solution.

Notation: Let ${\displaystyle G}$ be a group and ${\displaystyle a\in G}$. We will often encounter a situation where we have a product ${\displaystyle \underbrace {a*a*\cdots *a} _{\mathrm {n\,terms} }}$. For these situations, we introduce the shorthand notation ${\displaystyle a^{n}=\underbrace {a*a*\cdots *a} _{\mathrm {n\,terms} }}$ if ${\displaystyle n}$ is positive, and ${\displaystyle a^{n}=\underbrace {a^{-1}*a^{-1}*\cdots *a^{-1}} _{\mathrm {|n|\,terms} }}$ if ${\displaystyle n}$ is negative. Under these rules, it is straightforward to show ${\displaystyle g^{n}*g^{m}=g^{n+m}}$ and ${\displaystyle (a^{n})^{-1}=a^{-n}}$ and ${\displaystyle a^{0}=e}$ for all ${\displaystyle a\in G}$.

Definition 11: (i) The order of a group ${\displaystyle G}$, denoted ${\displaystyle |G|}$ or ${\displaystyle o(G)}$, is the number of elements of ${\displaystyle G}$ if ${\displaystyle G}$ is finite. Otherwise ${\displaystyle |G|}$ is said to be infinite.

(ii) The order of an element of ${\displaystyle g\in G}$, similarly denoted ${\displaystyle |g|}$ or ${\displaystyle o(g)}$, is defined as the lowest positive integer ${\displaystyle n}$ such that ${\displaystyle g^{n}=e}$ if such an integer exists. Otherwise ${\displaystyle |g|}$ is said to be infinite.

Theorem 12: Let ${\displaystyle G}$ be a group and ${\displaystyle a,b\in G}$. Then ${\displaystyle |ab|=|ba|}$.

Proof: Let the order of ${\displaystyle ab}$ be ${\displaystyle n}$. Then, ${\displaystyle (ab)^{n}=abab...ab=e}$, ${\displaystyle n}$ being the smallest positive integer such that this is true. Now, multiply by ${\displaystyle b}$ on the left and ${\displaystyle a}$ on the right to obtain ${\displaystyle (ba)^{n+1}=ba}$ implying ${\displaystyle (ba)^{n}=e}$. Thus, we have shown that ${\displaystyle |ba|\leq |ab|}$. A similar argument in the other direction shows that ${\displaystyle |ab|\leq |ba|}$. Thus, we must have ${\displaystyle |ab|=|ba|}$, proving the theorem.

Corollary 13: Let ${\displaystyle G}$ be a group with ${\displaystyle a,b\in G}$. Then, ${\displaystyle |aba^{-1}|=|b|}$.

Proof: By Theorem 12, we have that ${\displaystyle |aba^{-1}|=|ba^{-1}a|=|be|=|b|}$.

Theorem 14: An element of a group not equal to the identity has order 2 if and only if it is its own inverse.

Proof: Let ${\displaystyle g}$ have order 2 in the group ${\displaystyle G}$. Then, ${\displaystyle g^{2}=gg=e}$, so by definition, ${\displaystyle g^{-1}=g}$. Now, assume ${\displaystyle g^{-1}=g}$ and ${\displaystyle g\neq e}$. Then ${\displaystyle e=gg^{-1}=gg=g^{2}}$. Since ${\displaystyle g\neq e}$, 2 is the smallest positive integer satisfying this property, so ${\displaystyle g}$ has order 2.

Definition 15: Let ${\displaystyle G}$ be a group such that for all ${\displaystyle a,b\in G}$, ${\displaystyle ab=ba}$. Then, ${\displaystyle G}$ is said to be commutative or abelian.

When we are dealing with an abelian group, we will sometimes use so-called additive notation, writing ${\displaystyle +}$ for our binary operation and replacing ${\displaystyle a^{n}}$ with ${\displaystyle na}$. In such cases, we only need to keep track of the fact that ${\displaystyle n}$ is an integer while ${\displaystyle a}$ is a group element. We will also talk about the sum of elements rather than their product.

Abelian groups are in many ways nicer objects than general groups. They also admit more structure where ordinary groups do not. We will see more about this later when we talk about structure-preserving maps between groups.

Definition 16: Let ${\displaystyle G}$ be a group. A subset ${\displaystyle S\subseteq G}$ is called a generating set for ${\displaystyle G}$ if every element in ${\displaystyle G}$ can be written in terms of elements in ${\displaystyle S}$. We write ${\displaystyle G=\langle S\rangle =\{s_{1}^{e_{1}}\ldots s_{m}^{e_{m}}\mid s_{i}\in S,e_{i}\in \{1,-1\}\}}$.

Now that we have our definitions in place and have a small arsenal of theorems, let us look at three (really, two and a half) important families of groups.

## Multiplication tables

We will now show a convenient way of representing a group structure, or more precisely, the multiplication rule on a set. This notion will not be limited to groups only, but can be used for any structure with any number of operations. As an example, we give the group multiplication table for the Klein 4-group ${\displaystyle K_{4}}$. The multiplication table is structured such that ${\displaystyle g*h}$ is represented by the element in the "${\displaystyle (g,h)}$-position", that is, in the intersection of the ${\displaystyle g}$-row and the ${\displaystyle h}$-column.

${\displaystyle {\begin{array}{c|cccc}*&e&a&b&c\\\hline e&e&a&b&c\\a&a&e&c&b\\b&b&c&e&a\\c&c&b&a&e\end{array}}}$

This next group is for the group of integers under addition modulo 4, called ${\displaystyle \mathbb {Z} _{4}}$. We will learn more about this group later.

${\displaystyle {\begin{array}{c|cccc}+&0&1&2&3\\\hline 0&0&1&2&3\\1&1&2&3&0\\2&2&3&0&1\\3&3&0&1&2\end{array}}}$

We can clearly see that ${\displaystyle K_{4}}$ and ${\displaystyle \mathbb {Z} _{4}}$ are "different" groups. There is no way to relabel the elements such that the multiplication tables coincide. There is a notion of "equality" of groups that we have not yet made precise. We will get back to this in the section about group homomorphisms.

The reader might have noticed that each row in the group table features each element of the group exactly once. Indeed, assume that an element ${\displaystyle k\in G}$ appeared twice in some row of the multiplication table for ${\displaystyle G}$. Then there would exist ${\displaystyle g,h,h^{\prime }\in G}$ such that ${\displaystyle gh=gh^{\prime }}$, implying ${\displaystyle h=h^{\prime }}$ and contradicting the assumption of ${\displaystyle k}$ appearing twice. We state this as a theorem:

Theorem 17: Let ${\displaystyle G}$ be a group and ${\displaystyle a\in G}$. Then ${\displaystyle aG=\{a*g\mid g\in G\}=G}$.

Using this, the reader can use a multiplication table to find all groups of order 3. He/she will find that there is only one possibility.

## Problems

Problem 1: Show that ${\displaystyle M_{n}(\mathbb {R} )}$, the set of ${\displaystyle n\times n}$ matrices with real entries, forms a group under the operation of matrix addition.

Problem 2: Let ${\displaystyle V,W}$ be vector spaces and ${\displaystyle \mathrm {Hom} (V,W)}$ be the set of linear maps from ${\displaystyle V}$ to ${\displaystyle W}$. Show that ${\displaystyle \mathrm {Hom} (V,W)}$ forms an abelian group by defining ${\displaystyle (f+g)(v)=f(v)+g(v)}$