# Mathematical Proof/Introduction to Set Theory

Objects known as sets are often used in mathematics, and there exists set theory which studies them. Although set theory can be discussed formally [1], it is not necessary for us to have such a formal discussion in this book, and we may not be interested in and understand the formal discussion in this stage.

Even if we do not discuss set theory formally, it is important for us to understand some basic concepts about sets, which will be covered in this chapter.

## What is a set?

A set may be viewed as a collection of well-defined, distinct objects (the objects can also be sets). Because of the vagueness of the term "well-defined", we do not regard this as the definition of set. Instead, we regard set as a primitive notion (i.e., concepts not defined in terms of previously-defined concepts). Other examples of primitive notions in mathematics include point and line.

We have mentioned that a set is a collection of well-defined, distinct objects. Objects in a set are called elements of the set. We write ${\displaystyle a\in A}$ to mean that the element ${\displaystyle a}$ belongs to the set ${\displaystyle A}$. If ${\displaystyle a}$ does not belong to ${\displaystyle A}$, we write ${\displaystyle a\notin A}$.

Example.

• Consider the set of all even numbers ${\displaystyle E}$. Elements of ${\displaystyle E}$ include (but are not limited to) -2, 0, and 4, i.e., ${\displaystyle -2,0,4\in E}$.
• The elements of the English alphabet (a set) are English letters.

## Ways of describing a set

There are multiple ways to describe a set precisely (in the sense that element(s) belonging to the set is (are) known precisely).

If a set consists of a small number of elements, then the listing method may be quite efficient. In the listing method, elements of a set are listed within a pair of braces ({}). In particular, just changing the listing order of elements does not change the set represented. For example, ${\displaystyle \{1,2\}}$ and ${\displaystyle \{2,1\}}$ are both representing the same set whose elements are 1 and 2. If the elements listed in the pair of braces are the same, the notations created by the listing method with different listing orders refer to the same set. Also, repeatedly listing a specific element in a set does not change the set represented. For example, ${\displaystyle \{1,1,2,2,2\}}$ and ${\displaystyle \{1,2\}}$ are both representing the same set whose elements are 1 and 2. In particular, if a set contains no elements, it can be denoted by ${\displaystyle \{\}}$ based on the listing method or ${\displaystyle \varnothing }$. This kind of set is called an empty set.

Another way to describe a set is using words. For example, consider the set ${\displaystyle S}$ of prime numbers less than 10. If we use the listing method instead, the set ${\displaystyle S}$ is represented by ${\displaystyle \{2,3,5,7\}}$.

The third way to describe a set is advantageous when a set contains many elements. This method is called set-builder notation. There are three parts within a pair of braces in this notation. They are illustrated below with descriptions: ${\displaystyle \underbrace {\{} _{\text{The set of}}\underbrace {x} _{{\text{all elements }}x}\underbrace {:} _{\text{such that}}\underbrace {P(x)} _{{\text{the property }}P(x){\text{ is satisfied}}}\}}$

As one may expect, two sets are equal if and only if they contain the same elements. Equivalently, two sets ${\displaystyle A}$ and ${\displaystyle B}$ are equal if and only if each element of ${\displaystyle A}$ is also an element of ${\displaystyle B}$ and each element of ${\displaystyle B}$ is also an element of ${\displaystyle A}$. This can be regarded as an axiom [2] or a definition. If two sets ${\displaystyle A}$ and ${\displaystyle B}$ are equal, we write ${\displaystyle A=B}$. If not, we write ${\displaystyle A\neq B}$.

In this book, when we are solving an equation, we are only considering its real solution(s) unless stated otherwise.

Example.

• ${\displaystyle \{x:3x+2=0\}=\{-2/3\}}$.
• ${\displaystyle \{y:y{\text{ is a positive odd number}}\}=\{1,3,5,\ldots \}}$.
• ${\displaystyle \{z:z{\text{ is an English letter}}\}=\{a,b,c,\ldots ,z,A,B,\ldots ,Z\}}$.

Exercise. Assume ${\displaystyle a}$ and ${\displaystyle b}$ are different elements. Is each of the following statements true or false?

1 The set ${\displaystyle {\big \{}\{\}{\big \}}}$ contains no elements.

 True. False.

2 ${\displaystyle \{\}=\varnothing .}$

 True. False.

3 ${\displaystyle \{1,1,2,3\}}$ is a set.

 True. False.

4 ${\displaystyle \{x:0.

 True. False.

5 ${\displaystyle \{a,b,b\}\in \{\{a,b\},a,b,b\}}$.

 True. False.

6 ${\displaystyle \{\{a\},\{a\}\}\in \{\varnothing ,\{a\},\{b\},\{a,b\}\}}$.

 True. False.

## Set cardinality

If a set contains finite number of elements, it is called a finite set, and it is called an infinite set otherwise. If a set is finite, then its cardinality is its number of elements. For infinite sets, it is harder and more complicated to define their cardinalities, and so we will do this in the later chapter about set cardinalities. For each set ${\displaystyle S}$, its cardinality is denoted by ${\displaystyle |S|}$.

Example.

• Let ${\displaystyle A=\{{\text{red}},{\text{yellow}},{\text{blue}}\}}$. Then, ${\displaystyle |A|=3}$.
• Let ${\displaystyle B=\{\varnothing ,\{\varnothing \},\varnothing \}}$. Then, ${\displaystyle |B|=2}$ (not 3 since the element ${\displaystyle \varnothing }$ is listed repeatedly).
• Let ${\displaystyle C=\{x:x^{2}<0\}}$. Then, ${\displaystyle |C|=0}$ since there is no solution for ${\displaystyle x^{2}<0}$ (for real number ${\displaystyle x}$), and thus ${\displaystyle C}$ is an empty set.
• Let ${\displaystyle D=\{y:y^{2}-4y+4=0\}}$. Solving ${\displaystyle y^{2}-4y+4=0\Leftrightarrow (y-2)^{2}=0}$, we have ${\displaystyle y=2}$. Hence, ${\displaystyle D=\{2\}}$ and thus ${\displaystyle |D|=1}$ [3].

There are some special infinite sets for which notations are given, as follows:

• ${\displaystyle \mathbb {N} }$ is the set of all natural numbers (0 is not regarded as a natural number in this book).
• ${\displaystyle \mathbb {Z} }$ is the set of all integers.
• ${\displaystyle \mathbb {Q} }$ is the set of all rational numbers.
• (nonstandard notation) ${\displaystyle \mathbb {I} }$ is the set of all irrational numbers.
• ${\displaystyle \mathbb {R} }$ is the set of all real numbers.
• ${\displaystyle \mathbb {C} }$ is the set of all complex numbers.

In particular, we can use set-builder notation to express ${\displaystyle \mathbb {Q} }$, as follows: ${\displaystyle \mathbb {Q} =\{p/q:p,q\in \mathbb {Z} {\text{ and }}q\neq 0\}}$.

Example.

• ${\displaystyle {\sqrt {2}},{\sqrt {3}}\notin \mathbb {Q} }$
• ${\displaystyle {\sqrt {5}},\pi ,e\in \mathbb {I} }$

Exercise. Use set-builder notation to express ${\displaystyle \mathbb {C} }$ without using "${\displaystyle \mathbb {C} }$" in the expression.

Solution

We can express like this: ${\displaystyle \mathbb {C} =\{x:x=a+bi{\text{ and }}a,b\in \mathbb {R} \}}$ (${\displaystyle i={\sqrt {-1}}}$).

## Subsets

Definition. (Subset) A set ${\displaystyle A}$ is a subset of a set ${\displaystyle B}$ (denoted by ${\displaystyle A\subseteq B}$) if each element of ${\displaystyle A}$ is also an element of ${\displaystyle B}$.

Remark.

• If ${\displaystyle A}$ is not a subset of ${\displaystyle B}$, we denote it as ${\displaystyle A\not \subseteq B}$.
• Recall that two sets ${\displaystyle A}$ and ${\displaystyle B}$ if and only if each element of ${\displaystyle A}$ belongs to ${\displaystyle B}$ and each element of ${\displaystyle B}$ belongs to ${\displaystyle A}$. Using the notion of subsets, we can write ${\displaystyle A=B}$ if and only if ${\displaystyle A\subseteq B}$ and ${\displaystyle B\subseteq A}$.

Example.

• ${\displaystyle \mathbb {N} \subseteq \mathbb {Z} \subseteq \mathbb {Q} \subseteq \mathbb {R} \subseteq \mathbb {C} }$.
• ${\displaystyle \mathbb {Z} \not \subseteq \mathbb {I} }$ (e.g. ${\displaystyle 1\in \mathbb {Z} }$ but ${\displaystyle 1\notin \mathbb {I} }$)
• ${\displaystyle \mathbb {C} \not \subseteq \mathbb {R} }$ (e.g. ${\displaystyle i\in \mathbb {C} }$ but ${\displaystyle i\notin \mathbb {R} }$)
• For each set ${\displaystyle S}$, ${\displaystyle S\subseteq S}$, i.e. each set is a subset of itself.
• This is because each element of set ${\displaystyle S}$ is an element of ${\displaystyle S}$.
• For each set ${\displaystyle S}$, ${\displaystyle \varnothing \subseteq S}$.
• If we want to prove this directly, there are some difficulties since ${\displaystyle \varnothing }$ does not contain any element. So, what is meant by "each element of ${\displaystyle \varnothing }$"?
• Under this situation, it may be better to prove by contradiction (a proof technique covered in the later chapter about methods of proof). First, we suppose on the contrary that ${\displaystyle \varnothing \not \subseteq S}$. By the negation of the definition, there is at least one element of ${\displaystyle \varnothing }$ that is not an element of ${\displaystyle S}$, which is false. This yields a contradiction, and thus the hypothesis is false (explanation will be provided later), i.e. ${\displaystyle \varnothing \not \subseteq S}$ is false.

Definition. (Proper subset) A set ${\displaystyle A}$ is a proper subset of a set ${\displaystyle B}$ (denoted by ${\displaystyle A\subsetneq B}$) if ${\displaystyle A}$ is a subset of ${\displaystyle B}$ and ${\displaystyle A\neq B}$.

Remark.

• Similarly, if ${\displaystyle A}$ is not a proper subset of ${\displaystyle B}$, we write ${\displaystyle A\not \subsetneq B}$.

Example.

• For each nonempty set ${\displaystyle S}$, ${\displaystyle \varnothing \subsetneq S}$ since ${\displaystyle \varnothing \subseteq S}$ (shown previously) and ${\displaystyle \varnothing \neq S}$ if ${\displaystyle S}$ is a nonempty set.
• ${\displaystyle \mathbb {N} \subsetneq \mathbb {Z} \subsetneq \mathbb {Q} \subsetneq \mathbb {R} \subsetneq \mathbb {C} }$.
• ${\displaystyle \{1,2\}\subsetneq \{1,2,3\}}$.
• ${\displaystyle \{1,2\}\not \subsetneq \{\{1,2\},2,3\}}$ and ${\displaystyle \{1,2\}\not \subseteq \{\{1,2\},2,3\}}$.

Exercise. Let ${\displaystyle A=\{1\}}$.

1 Which of the following set(s) is a subset of ${\displaystyle A}$?

 ${\displaystyle \{1\}}$ ${\displaystyle \{\}}$ ${\displaystyle \{\{1\}\}}$ ${\displaystyle \{1,\{1\}\}}$

2 Select the set(s) of which the set ${\displaystyle A}$ is a subset.

 ${\displaystyle \{1\}}$ ${\displaystyle \{\}}$ ${\displaystyle \{\{1\}\}}$ ${\displaystyle \{1,\{1\}\}}$

3 Select the set(s) of which the set ${\displaystyle A}$ is an element.

 ${\displaystyle \{1\}}$ ${\displaystyle \{\}}$ ${\displaystyle \{\{1\}\}}$ ${\displaystyle \{1,\{1\}\}}$

We call some commonly encountered subsets of ${\displaystyle \mathbb {R} }$ intervals. For each real number ${\displaystyle a,b}$ such that ${\displaystyle a,

• ${\displaystyle (a,b){\overset {\text{ def }}{=}}\{x\in \mathbb {R} :a (open intervals)
• ${\displaystyle (a,b]{\overset {\text{ def }}{=}}\{x\in \mathbb {R} :a (half-open (or half-closed) intervals)
• ${\displaystyle [a,b){\overset {\text{ def }}{=}}\{x\in \mathbb {R} :a\leq x (half-open (or half-closed) intervals)
• ${\displaystyle [a,b]{\overset {\text{ def }}{=}}\{x\in \mathbb {R} :a\leq x\leq b\}}$ (closed intervals)

There are also some infinite intervals:

• ${\displaystyle (-\infty ,a){\overset {\text{ def }}{=}}\{x\in \mathbb {R} :x
• ${\displaystyle (-\infty ,a]{\overset {\text{ def }}{=}}\{x\in \mathbb {R} :x\leq a\}}$
• ${\displaystyle (a,\infty ){\overset {\text{ def }}{=}}\{x\in \mathbb {R} :a
• ${\displaystyle [a,\infty ){\overset {\text{ def }}{=}}\{x\in \mathbb {R} :a\leq x\}}$
• ${\displaystyle (-\infty ,\infty ){\overset {\text{ def }}{=}}\mathbb {R} }$

Note: ${\displaystyle \{x\in S:P(x)\}}$ is a shorthand of ${\displaystyle \{x:x\in S{\text{ and }}P(x)\}}$ (${\displaystyle S}$ is a set).

Example.

• ${\displaystyle (0,1)\subseteq [0,1)\subseteq [0,1]}$.
• ${\displaystyle {\sqrt {2}},e,\pi \in (1,4)}$.
• ${\displaystyle (0,1]\not \subseteq [0,1)}$ since the element "1" of the set on LHS does not belong to the set on RHS.
• ${\displaystyle (0,1)\subseteq (0,\infty )}$.

Example.

• The set of (real) solutions of ${\displaystyle x^{2}-9\leq 0}$ is ${\displaystyle [-3,3]}$.
• The set of (real) solutions of ${\displaystyle x^{2}\leq 0}$ is ${\displaystyle \{0\}}$. (Note: we cannot express this set as ${\displaystyle [0,0]}$ since it is required that ${\displaystyle a for an interval ${\displaystyle [a,b]}$.)
• The set of (real) solutions of ${\displaystyle x^{2}<0}$ is ${\displaystyle \varnothing }$.

Exercise.

Which of the following is (are) valid interval(s)?

 ${\displaystyle (0,0)}$ ${\displaystyle (0,0.000001)}$ ${\displaystyle (-2,-3)}$ ${\displaystyle [-1,\infty ]}$

## Universal set and Venn diagram

Definition. (Universal set) A universal set, denoted by ${\displaystyle U}$, is a set containing all elements considered in a certain investigation.

Example.

• If we are studying real numbers, the universal set is ${\displaystyle \mathbb {R} }$.

Definition. (Complement) The complement of a set ${\displaystyle A}$ that is a subset of the universal set ${\displaystyle U}$, denoted by ${\displaystyle A^{c}}$, is the set ${\displaystyle \{x\in U:x\notin A\}}$.

Example.

• Let ${\displaystyle A=\{1\}}$ and ${\displaystyle U=\{0,1,1,2\}}$. Then, ${\displaystyle A^{c}=\{0,2\}}$. (Note: ${\displaystyle U=\{0,1,2\}}$ also.)
• For each universal set ${\displaystyle U}$, ${\displaystyle \varnothing ^{c}=U}$ (since each element of ${\displaystyle U}$ does not belong to ${\displaystyle \varnothing }$[4]) and ${\displaystyle U^{c}=\varnothing }$ (since there are no elements of ${\displaystyle U}$ that does not belong to ${\displaystyle U}$).
• Let ${\displaystyle B=\{1,3,5\}}$ and ${\displaystyle U=\{2,4,6\}}$. Then, ${\displaystyle B^{c}=\{2,4,6\}=U}$ since each element of ${\displaystyle U}$ does not belong to ${\displaystyle B}$.

Exercise. Let the universal set be ${\displaystyle \mathbb {R} }$.

1 What is ${\displaystyle (-\infty ,1]^{c}}$?

 ${\displaystyle [1,\infty )}$ ${\displaystyle (1,\infty )}$ ${\displaystyle (-\infty ,1)}$ ${\displaystyle (-\infty ,1]}$

2 What is ${\displaystyle (-\infty ,1)^{c}}$?

 ${\displaystyle [1,\infty )}$ ${\displaystyle (1,\infty )}$ ${\displaystyle (-\infty ,1)}$ ${\displaystyle (-\infty ,1]}$

3 If the universal set is ${\displaystyle U}$ instead, ${\displaystyle (-\infty ,1)^{c}=(1,3)}$. Which of the following can be ${\displaystyle U}$ (there may be more than one answer)?

 ${\displaystyle [1,3]}$ ${\displaystyle (1,3)}$ ${\displaystyle (1,\infty )}$ ${\displaystyle (3,\infty )}$ ${\displaystyle (-\infty ,3)}$

A Venn diagram is a diagram showing all possible logical relationships between a finite number of sets. The universal set is usually represented by a region enclosed by a rectangle, while the sets are usually represents by regions enclosed by circles. The following is a Venn diagram.

In this diagram, if the white region represents set ${\displaystyle A}$ and the region enclosed by the rectangle represents the universal set, then the red region is the set ${\displaystyle A^{c}}$.

However, the following is not a Venn diagram.

This is because there are not regions in which only the yellow and blue region intersect, and only the red and green region intersect, respectively. So, not all logical relationships between the sets are shown.

To show all logical relationships between four sets, the following Venn diagram can be used.

## Set operations

Similar to the arithmetic operations for real numbers which combine two numbers into one, the set operations combine two sets into one.

### Union of sets

Definition. (Union of sets)

The union of a set ${\displaystyle A}$ and a set ${\displaystyle B}$, denoted by ${\displaystyle A\cup B}$, is the set ${\displaystyle \{x:x\in A{\text{ or }}x\in B\}}$.

Remark.

• The "or" here is inclusive, i.e. if an element belongs to both ${\displaystyle A}$ and ${\displaystyle B}$, it also belongs to ${\displaystyle A\cup B}$.

Example.

• ${\displaystyle \{1,3,5\}\cup \{2,4,6\}=\{1,2,3,4,5,6\}}$.
• ${\displaystyle \{1,3,5\}\cup \{1,4,6\}=\{1,3,4,5,6\}}$.
• ${\displaystyle \{1,3,5\}\cup \{1,3,5\}=\{1,3,5\}}$.
• ${\displaystyle \mathbb {Q} \cup \mathbb {I} =\mathbb {R} }$.

Proposition. Let ${\displaystyle A,B}$ and ${\displaystyle C}$ be sets. Then,

• ${\displaystyle A\cup A=A}$
• ${\displaystyle A\cup B=B\cup A}$ (commutative law)
• ${\displaystyle A\cup (B\cup C)=(A\cup B)\cup C}$ (associative law)
• ${\displaystyle A\subseteq A\cup B}$ and ${\displaystyle B\subseteq A\cup B}$
• ${\displaystyle A\cup \varnothing =A}$

Proof. (Formal) proof will be discussed later. For now, you may verify these results using Venn diagram.

${\displaystyle \Box }$

Remark.

• Because of the associative law, we can write union of three (or more) sets without brackets. We will have similar results for intersection of sets, and so we can also write intersection of three (or more) sets without brackets.

### Intersection of sets

Definition. (Intersection of sets)

The intersection of a set ${\displaystyle A}$ and a set ${\displaystyle B}$, denoted by ${\displaystyle A\cap B}$, is the set ${\displaystyle \{x:x\in A{\text{ and }}x\in B\}}$.

Remark.

• If ${\displaystyle A\cap B=\varnothing }$, we say that ${\displaystyle A}$ and ${\displaystyle B}$ are disjoint.

Proposition. Let ${\displaystyle A,B}$ and ${\displaystyle C}$ be sets. Then,

• ${\displaystyle A\cap A=A}$
• ${\displaystyle A\cap B=B\cap A}$ (commutative law)
• ${\displaystyle A\cap (B\cap C)=(A\cap B)\cap C}$ (associative law)
• ${\displaystyle A\cap B\subseteq A}$ and ${\displaystyle A\cap B\subseteq B}$
• ${\displaystyle A\cap \varnothing =A}$

Proof. (Formal) proof will be discussed later. For now, you may verify these results using Venn diagram.

${\displaystyle \Box }$

Proposition. (Distributive laws) Let ${\displaystyle A,B}$ and ${\displaystyle C}$ be sets. Then,

• ${\displaystyle A\cap (B\cup C)=(A\cap B)\cup (A\cap C)}$ (the "${\displaystyle A\cap }$" is "distributed" to ${\displaystyle B}$ and ${\displaystyle C}$ respectively)
• ${\displaystyle A\cup (B\cap C)=(A\cup B)\cap (A\cup C)}$

### Relative complement

Definition. (Relative complement)

The relative complement of a set ${\displaystyle A}$ in a set ${\displaystyle B}$, denoted by ${\displaystyle B\setminus A}$, is the set ${\displaystyle \{x:x\in B{\text{ and }}x\notin A\}}$.

Remark.

• ${\displaystyle A^{c}=U\setminus A}$ if ${\displaystyle U}$ is the universal set. So, the complement of a set ${\displaystyle A}$ is also the relative complement of ${\displaystyle A}$ in ${\displaystyle U}$.
• The notation ${\displaystyle B\setminus A}$ is read "B with A taken away".
• We can see from the definition that ${\displaystyle B\setminus A=B\cap A^{c}}$

Example.

• ${\displaystyle \{a,b,c\}\setminus \{b,c,d\}=\{a\}}$.
• ${\displaystyle \{a,b,c\}\setminus \{a,b,c,d\}=\varnothing }$.
• ${\displaystyle \{a,b,c\}\setminus \{1,2,3\}=\{a,b,c\}}$.
• ${\displaystyle \mathbb {R} \setminus \mathbb {Q} =\mathbb {I} }$.
• ${\displaystyle \mathbb {Z} \setminus \mathbb {N} =\{0,-1,-2,\ldots \}}$.

Exercise.

1 What is ${\displaystyle \mathbb {R} \setminus \mathbb {C} }$?

 ${\displaystyle \{x:x=a+bi,a,b\in \mathbb {R} {\text{ and }}b\neq 0\}}$ ${\displaystyle \{x:x=bi,b\in \mathbb {R} \}}$ ${\displaystyle \varnothing }$ ${\displaystyle \mathbb {C} }$ ${\displaystyle \mathbb {R} }$

2 What is ${\displaystyle [1,10]\setminus (3,5)}$?

 ${\displaystyle [1,3]\cup [5,10]}$ ${\displaystyle [1,3)\cup (5,10]}$ ${\displaystyle (1,3)\cup (5,10)}$ ${\displaystyle (1,3]\cup [5,10)}$

3 What is ${\displaystyle \mathbb {R} \setminus \{0\}}$?

 ${\displaystyle (-\infty ,0)\cup (0,\infty )}$ ${\displaystyle (-\infty ,0]\cup [0,\infty )}$ ${\displaystyle (-\infty ,0)\cap (0,\infty )}$ ${\displaystyle (-\infty ,0]\cap [0,\infty )}$

4 Which of the following set(s) is (are) the set of all positive numbers?

 ${\displaystyle \mathbb {R} \setminus (-\infty ,0)}$ ${\displaystyle \mathbb {R} \setminus (-\infty ,0]}$ ${\displaystyle (0,\infty )}$ ${\displaystyle [0,\infty )}$ ${\displaystyle \mathbb {R} \cup (0,\infty )}$ ${\displaystyle \mathbb {R} \cap (0,\infty )}$

5 What is ${\displaystyle \varnothing \setminus \varnothing }$?

 ${\displaystyle \varnothing }$ The universal set. ${\displaystyle \{\varnothing \}}$

Proposition. Let ${\displaystyle A}$ and ${\displaystyle B}$ be sets. Then,

• ${\displaystyle A\setminus A=\varnothing }$.
• ${\displaystyle A\setminus \varnothing =A}$.
• ${\displaystyle \varnothing \setminus A=\varnothing }$.
• ${\displaystyle A\setminus B=\varnothing }$ if and only if ${\displaystyle A\subseteq B}$.
• ${\displaystyle (A\setminus B)\cap (B\setminus A)=\varnothing }$.
• ${\displaystyle A\cap (B\setminus A)=\varnothing }$.

Proof. (Formal) proof will be discussed later. For now, you may verify these results using Venn diagram.

${\displaystyle \Box }$

Theorem. (De Morgan's Laws) Let ${\displaystyle A}$ and ${\displaystyle B}$ be sets. Then, ${\displaystyle (A\cup B)^{c}=A^{c}\cap B^{c}{\text{ and }}(A\cap B)^{c}=A^{c}\cup B^{c}.}$

Proof. (Formal) proof will be discussed later. For now, you may verify these results using Venn diagram.

${\displaystyle \Box }$

Example. Suppose the universal set is ${\displaystyle \{1,2,3,4,5,6,7\}}$, ${\displaystyle A=\{1,2,3\}}$ and ${\displaystyle B=\{1,3,5\}}$. Since ${\displaystyle A\cup B=\{1,2,3,5\}}$, ${\displaystyle (A\cup B)^{c}=\{4,6,7\}}$. On the other hand, since ${\displaystyle A^{c}=\{4,5,6,7\}}$ and ${\displaystyle B^{c}=\{2,4,6,7\}}$, ${\displaystyle A^{c}\cap B^{c}=\{4,6,7\}=(A\cup B)^{c}}$.

Exercise.

What is ${\displaystyle (A\cap B)^{c}}$?

 ${\displaystyle \{4,6,7\}}$ ${\displaystyle \{4,5,6,7\}}$ ${\displaystyle \{2,4,6,7\}}$ ${\displaystyle \{2,4,5,6,7\}}$

### Symmetric difference

Definition. (Symmetric difference)

The symmetric difference of sets ${\displaystyle A}$ and ${\displaystyle B}$, denoted by ${\displaystyle A\triangle B}$, is the set ${\displaystyle (A\setminus B)\cup (B\setminus A)}$.

Example.

• ${\displaystyle \{0,1,2\}\triangle \{1,2,3\}=\{0\}\cup \{3\}=\{0,3\}}$.
• ${\displaystyle \{x,y\}\triangle \{y\}=\{x\}\cup \varnothing =\{x\}}$
• ${\displaystyle \{x\}\triangle \{y\}=\{x\}\cup \{y\}=\{x,y\}}$

Proposition. Let ${\displaystyle A,B}$ and ${\displaystyle C}$ be sets. Then,

• ${\displaystyle A\triangle A=\varnothing }$
• ${\displaystyle A\triangle \varnothing =A}$
• ${\displaystyle A\triangle B=(A\cup B)\setminus (A\cap B)}$
• ${\displaystyle A\triangle (B\triangle C)=(A\triangle B)\triangle C}$ (associative law)
• ${\displaystyle A\triangle B=B\triangle A}$ (commutative law)

Exercise.

1 What is ${\displaystyle \varnothing \triangle \varnothing }$?

 ${\displaystyle \varnothing }$ ${\displaystyle \{\varnothing \}}$ ${\displaystyle \{\varnothing ,\{\varnothing \}\}}$ ${\displaystyle \{\{\varnothing \}\}}$

2 What is ${\displaystyle A\triangle (B\setminus A)}$?

 ${\displaystyle A\cup B}$ ${\displaystyle A\cap B}$ ${\displaystyle A\setminus B}$ ${\displaystyle A\triangle B}$ ${\displaystyle B\setminus A}$ ${\displaystyle A}$ ${\displaystyle B}$

3 Does ${\displaystyle A\triangle B\triangle C=(A\cup B\cup C)\setminus (A\cap B\cap C)}$[5]? (Try to determine it using Venn diagrams. No mathematical proof is required at the moment.)

 Yes. No.

### Power set

Definition. (Power set) The power set of a set ${\displaystyle A}$, denoted by ${\displaystyle {\mathcal {P}}(A)}$, is the set of all subsets of ${\displaystyle A}$. In set-builder notation, ${\displaystyle {\mathcal {P}}(A)=\{S:S\subseteq A\}}$.

Remark.

• Since ${\displaystyle \varnothing \subseteq A}$ for each set ${\displaystyle A}$, ${\displaystyle \varnothing }$ is an element of each power set.
• Also, since ${\displaystyle A\subseteq A}$ for each set ${\displaystyle A}$, ${\displaystyle A}$ is an element of the power set ${\displaystyle {\mathcal {P}}(A)}$.

Example.

• ${\displaystyle {\mathcal {P}}(\varnothing )=\{\varnothing \}}$. Its cardinality is 1.
• If ${\displaystyle A=\{1\}}$, then ${\displaystyle {\mathcal {P}}(A)=\{\varnothing ,A\}=\{\varnothing ,\{1\}\}}$. Its cardinality is 2.
• If ${\displaystyle B=\{1,\{1\}\}}$, then ${\displaystyle {\mathcal {P}}(B)=\{\varnothing ,\{1\},\{\{1\}\},B\}}$. Its cardinality is 4.
• ${\displaystyle {\mathcal {P}}(\{1,2,3\})=\{\varnothing ,\{1\},\{2\},\{3\},\{1,2\},\{2,3\},\{1,3\},\{1,2,3\}\}}$. Its cardinality is 8.

Theorem. (Cardinality of power set of a finite set) Let ${\displaystyle A}$ be a finite set with cardinality ${\displaystyle n}$. Then, ${\displaystyle |{\mathcal {P}}(A)|=2^{n}}$.

Proof. Assume ${\displaystyle A}$ is a finite set with cardinality ${\displaystyle n}$. Since each element of the power set ${\displaystyle {\mathcal {P}}(A)}$ is a subset of ${\displaystyle A}$, it suffices to prove that there are ${\displaystyle 2^{n}}$ subsets of ${\displaystyle A}$. In the following, we consider subsets of ${\displaystyle A}$ with different number of elements separately, and count the number of subsets of each of the different types using combinatorics.

• For the subset with zero element, it is the empty set, and thus there is only one such subset.
• For the subsets with one element, there are ${\displaystyle C_{1}^{n}}$ subsets.
• For the subsets with two elements, there are ${\displaystyle C_{2}^{n}}$ subsets.
• ...
• For the subsets with ${\displaystyle n-1}$ elements, there are ${\displaystyle C_{n-1}^{n}}$ subsets.
• For the subset with ${\displaystyle n}$ elements, it is the set ${\displaystyle A}$, and thus there is only one such subset.

So, the total number of subsets of ${\displaystyle A}$ is ${\displaystyle 1+C_{1}^{n}+C_{2}^{n}+\dotsb +C_{n-1}^{n}+1=(1+1)^{n}=2^{n}}$ by binomial theorem.

${\displaystyle \Box }$

Remark.

• The proof method employed here is called direct proof, which is probably the most "natural" method, and most commonly used. We will discuss methods of proof in a later chapter.
• There are alternative ways to prove this theorem.

Exercise. In each of the following questions, choose the power set of the set given in the question.

1 ${\displaystyle \{\varnothing \}}$

 ${\displaystyle {\big \{}\varnothing ,\{\{\varnothing \}\}{\big \}}}$ ${\displaystyle {\big \{}\{\varnothing \},\{\{\varnothing \}\}{\big \}}}$ ${\displaystyle {\big \{}\varnothing ,\{\varnothing \}{\big \}}}$ ${\displaystyle {\big \{}\varnothing ,\{\varnothing \},\{\{\varnothing \}\}{\big \}}}$

2 ${\displaystyle {\mathcal {P}}(\{\varnothing \})}$

 ${\displaystyle {\big \{}\varnothing ,\{\varnothing \},\{\{\varnothing \}\},\{\varnothing ,\{\varnothing \}\}{\big \}}}$ ${\displaystyle {\big \{}\varnothing ,\{\varnothing ,\{\varnothing \}\},\{\{\varnothing \}\},\{\varnothing ,\{\varnothing \}\}{\big \}}}$ ${\displaystyle \left\{\varnothing ,\{\{\varnothing \}\},\{\{\{\varnothing \}\}\},{\big \{}\{\varnothing \},\{\{\varnothing \}\}{\big \}}\right\}}$ ${\displaystyle \left\{\varnothing ,\{\varnothing \},\{\{\varnothing \}\},{\big \{}\{\varnothing \},\{\{\varnothing \}\}{\big \}}\right\}}$

3 ${\displaystyle \{a,\{a\}\}}$

 ${\displaystyle \{\varnothing ,\{a\},\{\{a\}\},\{a,\{a\}\}\}}$ ${\displaystyle \{\varnothing ,a,\{a\},\{a,\{a\}\}\}}$ ${\displaystyle \{\varnothing ,a,\{\{a\}\},\{a,\{a\}\}\}}$ ${\displaystyle \{\varnothing ,a,\{a\},\{\{a\}\}\}}$

4 ${\displaystyle S=\{1,3\}\triangle \{3,5\}}$

 ${\displaystyle \{\varnothing ,\{1\},\{3\},\{5\},\{1,3\},\{3,5\},\{1,5\},S\}}$ ${\displaystyle \{\varnothing ,\{1\},\{3\},\{5\},S\}}$ ${\displaystyle \{\varnothing ,S\}}$ ${\displaystyle \{\varnothing ,\{1\},\{5\},\{1,5\},S\}}$

It is given that ${\displaystyle |A|=2}$. In each of the following questions, choose the cardinality of the set given in the question.

1 ${\displaystyle {\mathcal {P}}({\mathcal {P}}(A))}$

 4 8 16 32

2 ${\displaystyle {\mathcal {P}}({\mathcal {P}}(\varnothing ))}$

 0 1 2 4

3 ${\displaystyle \{{\mathcal {P}}(A)\}}$

 1 2 4 8

4 ${\displaystyle {\mathcal {P}}(\{A\})}$

 1 2 4 8

5 ${\displaystyle {\mathcal {P}}(\varnothing \cap {\mathcal {P}}(A))}$

 1 2 4 8

### Cartesian product

Definition. (Cartesian product) The Cartesian product of sets ${\displaystyle A}$ and ${\displaystyle B}$, denoted by ${\displaystyle A\times B}$, is ${\displaystyle A\times B=\{(a,b):a\in A{\text{ and }}b\in B\}}$.

Remark.

• ${\displaystyle (a,b)}$ is the ordered pair (i.e. a pair of things for which order is important).
• The ordered pair is used to specify points on the plane, and the ordered pair is called coordinates.
• In particular, we have ${\displaystyle (a,b)\neq (b,a)}$ if ${\displaystyle a\neq b}$.
• (notation) We use ${\displaystyle A^{2}}$ to denote ${\displaystyle A\times A}$ for each set ${\displaystyle A}$.
• We can observe that ${\displaystyle |A\times B|=|A|\times |B|}$.

Example. Let ${\displaystyle A=\{0,1\}}$ and ${\displaystyle B=\{a,b,c\}}$. Then,

• ${\displaystyle A\times B=\{(0,a),(0,b),(0,c),(1,a),(1,b),(1,c)\}}$.
• ${\displaystyle B\times A=\{(a,0),(b,0),(c,0),(a,1),(b,1),(c,1)\}}$.

Remark.

• We can see from the above example that the Cartesian product is not commutative, i.e. it is not necessary for ${\displaystyle A\times B=B\times A}$.

Exercise. Let ${\displaystyle A=\{1,2,3\}}$.

1 What is ${\displaystyle A\times \varnothing }$ (there may be more than one answer)?

 ${\displaystyle \{(1,0),(2,0),(3,0)\}}$ ${\displaystyle \{(1,\varnothing ),(2,\varnothing ),(3,\varnothing )\}}$ ${\displaystyle \varnothing }$ ${\displaystyle \varnothing \times A}$ ${\displaystyle \varnothing ^{2}}$

2 What is ${\displaystyle A^{2}}$?

 ${\displaystyle \{(1,1),(2,2),(3,3)\}}$ ${\displaystyle \{(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)\}}$ ${\displaystyle A}$ ${\displaystyle \{(1,A),(2,A),(3,A)\}}$

Similarly, we can define the Cartesian product of three or more sets.

Definition. (Cartesian product of three or more sets) Let ${\displaystyle n}$ be an integer greater than 2. The Cartesian product of ${\displaystyle n}$ sets ${\displaystyle A_{1},A_{2},\dotsc ,A_{n}}$ is ${\displaystyle A_{1}\times A_{2}\times \dotsb \times A_{n}=\{(a_{1},a_{2},\dotsc ,a_{n}):a_{1}\in A_{1},a_{2}\in A_{2},\dotsc ,{\text{ and }}a_{n}\in A_{n}\}}$.

Remark.

• (notation) We use ${\displaystyle A^{n}}$ to denote ${\displaystyle \underbrace {A\times A\times \dotsb \times A} _{n{\text{ times}}}}$, where ${\displaystyle n\in \mathbb {N} }$.

1. There are various types of axiomatic set theory, in which Zermelo-Fraenkel set theory is the most well-known one.
2. . Indeed, this is the axiom of extension in the Zermelo-Fraenkel set theory.
3. For sets with exactly one element, they are called singleton. In this case, ${\displaystyle D}$ is a singleton.
4. There are no elements belonging to ${\displaystyle \varnothing }$.
5. We need not to write brackets for LHS because of the associative law.