# Abstract Algebra/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} }$