# Introduction to Sets

### The Concept of a Set

The basic concepts of set theory were created and developed in the late $$19\text{th}$$ century by German mathematician Georg Cantor $$\left( {1845 – 1918} \right).$$

According to Cantor’s definition, a set is any collection of well defined objects, called the elements or members of the set.

Sets are usually denoted by capital letters $$\left( {A,B,X,Y, \ldots } \right).$$ The elements of the set are denoted by small letters $$\left( {a,b,x,y, \ldots } \right).$$

If $$X$$ is a set and $$x$$ is an element of $$X,$$ we write $$x \in X.$$ The symbol $$\in$$ was introduced by Italian mathematician Giuseppe Peano $$\left( {1858 – 1932} \right)$$ and is an abbreviation of the Greek word $$\epsilon\sigma\tau\iota$$ – “be”.

If $$y$$ is not an element of $$X,$$ we write $$y \notin X.$$

### Defining Sets

There are two basic ways of describing sets – the roster method and set builder notation.

#### Roster Method

In roster notation, we just list the elements of a set. The elements are separated by commas and enclosed in curly braces. For example, $$X = \left\{ {1,5,17,286} \right\}$$ or the set of natural numbers including zero $${\mathbb{N}_0} = \left\{ {0,1,2,3,4, \ldots } \right\}.$$

In a listing of the elements of a set, each distinct element is listed only once. The order in which elements are listed does not matter. For example, the following sets are equal:

$\left\{ {5,5,6,7} \right\}\;and\;\left\{ {5,6,7} \right\};$

${\left\{ {1,2,3} \right\},\left\{ {2,3,1} \right\}\;and\;}\kern0pt{\left\{ {3,2,1} \right\}}.$

When writing infinite sets and there is a clear pattern to the elements, an ellipsis (three dots) can be used.

#### Set Builder Notation

In set builder notation, we define a set by describing the properties of its elements instead of listing them. This method is especially useful when describing infinite sets.

The notation includes on or more set variables and a rule defining which elements belong to the set and which are not. The rule is often expressed in the form of a predicate. The set variable and rule are separated by a colon “:” or vertical slash “|”.

Examples:

1. The set of all uppercase letters of the English alphabet.
2. ${U = \left\{ {x\,|\,x \text{ is an uppercase letter}}\right.}\kern0pt{\left.{{\text{of the English alphabet}}} \right\}}$
3. The set of all prime numbers $$p$$ less than $$1000.$$
4. ${P = \left\{ p\,|\,p \text{ is a prime number and}\right.}\kern0pt{\left. p \lt 1000 \right\}}$
5. The set of all $$x$$ such that $$x$$ is a negative real number.
6. ${X = \left\{ {x\,|\,x \in \mathbb{R} \text{ and } x \lt 0} \right\} \text{ or }}\kern0pt{ X = \left\{ {x \in \mathbb{R}\,|\,x \lt 0} \right\}}$
7. The set of all internal points $$\left( {x,y} \right)$$ lying within the circle of radius $$1$$ centered at the origin.
8. $C = \left\{ {x,y \in \mathbb{R}\,|\,{x^2} + {y^2} \lt 1} \right\}$

### Universal and Empty Sets

A set which contains all the elements under consideration is called the universal set and is denoted as $$U.$$ The universal set is problem specific. For example, if a question is related to numbers, the universal set can be either all natural numbers $$\left( {U = \mathbb{N}} \right),$$ or all integers $$\left( {U = \mathbb{Z}} \right),$$ or all rational numbers $$\left( {U = \mathbb{Q}} \right),$$ etc. – depending on the context.

There is a special name for the set which contains no elements. It is called the empty set and is denoted by the symbol $$\require{AMSsymbols}\varnothing.$$ There is only one empty set.

### Subsets

A set $$A$$ is a subset of the set $$B$$ if every element of $$A$$ is also an element of the set $$B.$$ A subset is denoted by the symbol $$\subseteq,$$ so we write $$A \subseteq B.$$ If a set $$C$$ is not a subset of $$B,$$ we write: $${C \not\subseteq B.}$$

The empty set $$\varnothing$$ is a subset of every set, including itself.

The sets $$A$$ and $$B$$ are equal if simultaneously $$A \subseteq B$$ and $$B \subseteq A.$$ Notation: $$A = B$$.

A set $$A$$ is called a proper subset of $$B$$ if $$A \subseteq B$$ and $$A \ne B.$$ In this case, we write $$A \subset B.$$ Some authors use the symbol $$\subset$$ to indicate any (proper and improper) subsets.

The power set of any set $$A$$ is the set of all subsets of $$A,$$ including the empty set and $$A$$ itself. It is denoted by $$\mathcal{P}\left( A \right)$$ or $${2^A}.$$ If the set $$A$$ contains $$n$$ elements, then the power set $$\mathcal{P}\left( A \right)$$ has $${2^n}$$ elements.

## Solved Problems

Click or tap a problem to see the solution.

### Example 1

In every set, all elements, except one, have some property. Describe this property and find the element that does not have it.
1. $${R = \left\{ {\text{red},\,\text{orange},\,\text{yellow},\,\text{brown},}\right.}$$ $${\left.{\text{green},\text{blue},\text{indigo},\text{violet}} \right\}}$$
2. $$S = \left\{ {2,5,10,13,17,26,37} \right\}$$
3. $${P = \left\{ {\text{tetrahedron},\,\text{cube},\,\text{pyramid},}\right.}$$ $${\left.{\text{octahedron},\,\text{dodecahedron},}\right.}$$ $${\left.{\text{icosahedron}} \right\}}$$
4. $$F = \left\{ {\large{\frac{2}{3}}\normalsize, \large{\frac{3}{8}}\normalsize, \large{\frac{4}{5}}\normalsize, \large{\frac{5}{{24}}}\normalsize, \large{\frac{6}{{35}}}\normalsize, \large{\frac{7}{{47}}}\normalsize} \right\}$$

### Example 2

Write the following sets in roster form:
1. $$A = \left\{ {n\,|\,n \in \mathbb{Z},\left| n \right| \lt 5} \right\}$$
2. $$P = \left\{ {p\,|\,p \text{ is prime},\, p \lt 25} \right\}$$
3. $$B = \left\{ {x \in \mathbb{N}\,|\,{x^2} + 4x – 5 = 0} \right\}$$
4. $$C = \left\{ {x\,|\,x \in \mathbb{Z},\,{x^2} – 2x – 8 \le 0} \right\}$$
5. $${D = \bigl\{ {\left( {x,y} \right)\,|\,x \in \mathbb{N}, y \in \mathbb{N},}\bigr.}$$ $${\bigl.{{{\left( {x – 1} \right)}^2} + {y^2} \le 1} \bigr\}}$$

### Example 3

How many elements in each of the sets:
1. $$\varnothing$$
2. $$\left\{\varnothing\right\}$$
3. $$\left\{ {\varnothing,\left\{ \varnothing \right\}} \right\}$$
4. $$\left\{ {\left\{ {\varnothing,\left\{ \varnothing \right\}} \right\}} \right\}$$
5. $$\left\{ {\varnothing,\left\{ \varnothing \right\},\varnothing} \right\}$$

### Example 4

Determine which of the statements are true and which are not:
1. $$\varnothing \in \varnothing$$
2. $$\varnothing \subseteq \varnothing$$
3. $$\varnothing \in \left\{\varnothing\right\}$$
4. $$\varnothing \subseteq \left\{\varnothing\right\}$$

### Example 5

Find the power set of the following sets:
1. $$A = \left\{ {1,\left\{ 1 \right\}} \right\}$$
2. $$B = \left\{ {1,2,3,3} \right\}$$
3. $$C = \left\{ {1,\left\{ {2,3} \right\},4} \right\}$$
4. $$D = \left\{ {x \in \mathbb{Z}\,|\,{x^2} \lt 2} \right\}$$

### Example 6

Let $$A \subseteq B$$ and $$a \in A.$$ Determine whether these statements are true or false:
1. $$a \not\in B$$
2. $$A \in B$$
3. $$a \subseteq A$$
4. $$\left\{a\right\} \subseteq A$$
5. $$\left\{a\right\} \subseteq B$$

### Example 1.

In every set, all elements, except one, have some property. Describe this property and find the element that does not have it.
1. $${R = \left\{ {\text{red},\,\text{orange},\,\text{yellow},\,\text{brown},}\right.}$$ $${\left.{\text{green},\text{blue},\text{indigo},\text{violet}} \right\}}$$
2. $$S = \left\{ {2,5,10,13,17,26,37} \right\}$$
3. $${P = \left\{ {\text{tetrahedron},\,\text{cube},\,\text{pyramid},}\right.}$$ $${\left.{\text{octahedron},\,\text{dodecahedron},}\right.}$$ $${\left.{\text{icosahedron}} \right\}}$$
4. $$F = \left\{ {\large{\frac{2}{3}}\normalsize, \large{\frac{3}{8}}\normalsize, \large{\frac{4}{5}}\normalsize, \large{\frac{5}{{24}}}\normalsize, \large{\frac{6}{{35}}}\normalsize, \large{\frac{7}{{47}}}\normalsize} \right\}$$

Solution.

1. The set $$R$$ descibes $$7$$ colors of rainbow. The brown color is superfluous.
2. The set $$S = \left\{ {2,5,10,13,17,26,37} \right\}$$ is described by the expression $${n^2}+1,$$ where the number $$n$$ varies from $$n = 1$$ to $$n = 5.$$ The element $$13$$ is superfluous.
3. The set $${P = \left\{ {\text{tetrahedron},\,\text{cube},\,\text{pyramid},}\right.}$$ $${\left.{\text{octahedron},\,\text{dodecahedron},}\right.}$$ $${\left.{\text{icosahedron}} \right\}}$$ lists platonic solids. Pyramid should not be part of this set.
4. The set $$F = \left\{ {\large{\frac{2}{3}}\normalsize, \large{\frac{3}{8}}\normalsize, \large{\frac{4}{5}}\normalsize, \large{\frac{5}{{24}}}\normalsize, \large{\frac{6}{{35}}}\normalsize, \large{\frac{7}{{47}}}\normalsize} \right\}$$ contains fractions of kind $$\large{\frac{n}{{{n^2} – 1}}}\normalsize,$$ where $$n$$ varies from $$n = 2$$ to $$n = 6.$$ The fraction $${\large{\frac{7}{{47}}}\normalsize}$$ is superfluous.

### Example 2.

Write the following sets in roster form:
1. $$A = \left\{ {n\,|\,n \in \mathbb{Z},\left| n \right| \lt 5} \right\}$$
2. $$P = \left\{ {p\,|\,p \text{ is prime},\, p \lt 25} \right\}$$
3. $$B = \left\{ {x \in \mathbb{N}\,|\,{x^2} + 4x – 5 = 0} \right\}$$
4. $$C = \left\{ {x\,|\,x \in \mathbb{Z},\,{x^2} – 2x – 8 \le 0} \right\}$$
5. $${D = \bigl\{ {\left( {x,y} \right)\,|\,x \in \mathbb{N}, y \in \mathbb{N},}\bigr.}$$ $${\bigl.{{{\left( {x – 1} \right)}^2} + {y^2} \le 1} \bigr\}}$$

Solution.

1. In roster form, we write down the integer values which satisfy the inequality $$-5 \lt n \lt 5:$$
2. $A = \left\{ { – 4, – 3, – 2, – 1,0,1,2,3,4} \right\}.$
3. The set $$P = \left\{ {p\,|\,p \text{ is prime},\, p \lt 25} \right\}$$ contains prime numbers until $$25:$$
4. $P = \left\{ {2,3,5,7,11,13,17,19,23} \right\}.$
5. The quadratic equation $${{x^2} + 4x – 5 = 0}$$ has the solutions $$x = -5,$$ $$x = 1.$$ Since the set $$B = \left\{ {x \in \mathbb{N}\,|\,{x^2} + 4x – 5 = 0} \right\}$$ contains only natural numbers, it is written in the roster form as
6. $B = \{ 1\}.$
7. The quadratic inequality $${{x^2} – 2x – 8 \le 0}$$ has the solution $$-2 \le x \le 4.$$ The set $$C = \left\{ {x\,|\,x \in \mathbb{Z},\,{x^2} – 2x – 8 \le 0} \right\}$$ contains integer values in the closed interval $$-2 \le x \le 4,$$ so we have
8. $C = \left\{ { – 2, – 1,0,1,2,3,4} \right\}.$
9. The set $${D = \bigl\{ {\left( {x,y} \right)\,|\,x \in \mathbb{N}, y \in \mathbb{N},}\bigr.}$$ $${\bigl.{{{\left( {x – 1} \right)}^2} + {y^2} \le 1} \bigr\}}$$ contains points that have integer coordinates and lie inside the circle with radius $$1$$ and centered at $$\left({1,0}\right).$$
10. ${D = \left\{ {\left( {0,0} \right),\left( {1,0} \right),\left( {2,0} \right),}\right.}\kern0pt{\left.{\left( {1,1} \right),\left( {1, – 1} \right)} \right\}.}$

### Example 3.

How many elements in each of the sets:
1. $$\varnothing$$
2. $$\left\{\varnothing\right\}$$
3. $$\left\{ {\varnothing,\left\{ \varnothing \right\}} \right\}$$
4. $$\left\{ {\left\{ {\varnothing,\left\{ \varnothing \right\}} \right\}} \right\}$$
5. $$\left\{ {\varnothing,\left\{ \varnothing \right\},\varnothing} \right\}$$

Solution.

1. By definition, the empty set $$\varnothing$$ contains no elements.
2. The set $$\left\{\varnothing\right\}$$ has $$1$$ element – the empty set $$\varnothing.$$
3. The set $$\left\{ {\varnothing,\left\{ \varnothing \right\}} \right\}$$ has $$2$$ elements. The first element is the empty set $$\varnothing.$$ The second element $$\left\{\varnothing\right\}$$ is a set containing, in its turn, the empty set.
4. The set $$\left\{ {\left\{ {\varnothing,\left\{ \varnothing \right\}} \right\}} \right\}$$ contains $$1$$ element, which is the set $$\left\{ {\varnothing,\left\{ \varnothing \right\}} \right\}.$$
5. By definition, a set cannot have duplicate elements. Therefore, the set $$\left\{ {\varnothing,\left\{ \varnothing \right\},\varnothing} \right\}$$ has $$2$$ elements – $$\varnothing$$ and $$\left\{\varnothing\right\}.$$

### Example 4.

Determine which of the statements are true and which are not:
1. $$\varnothing \in \varnothing$$
2. $$\varnothing \subseteq \varnothing$$
3. $$\varnothing \in \left\{\varnothing\right\}$$
4. $$\varnothing \subseteq \left\{\varnothing\right\}$$

Solution.

1. The statement $$\varnothing \in \varnothing$$ is not true as, by definition, the empty set contains no elements.
2. The statement $$\varnothing \subseteq \varnothing$$ is true. The empty set is a subset of every set, including itself.
3. The statement $$\varnothing \in \left\{\varnothing\right\}$$ is true, since the set $$\left\{\varnothing\right\}$$ contains one element – $$\varnothing.$$
4. The statement $$\varnothing \subseteq \left\{\varnothing\right\}$$ is true. The empty set is a subset of every set, including the set $$\left\{\varnothing\right\}.$$

### Example 5.

Find the power set of the following sets:
1. $$A = \left\{ {1,\left\{ 1 \right\}} \right\}$$
2. $$B = \left\{ {1,2,3,3} \right\}$$
3. $$C = \left\{ {1,\left\{ {2,3} \right\},4} \right\}$$
4. $$D = \left\{ {x \in \mathbb{Z}\,|\,{x^2} \lt 2} \right\}$$

Solution.

1. The set $$A = \left\{ {1,\left\{ 1 \right\}} \right\}$$ has $$2$$ elements. Its power set is given by
2. $\mathcal{P}\left( A \right) = \left\{ {\varnothing,\left\{ 1 \right\},\left\{\left\{ 1 \right\}\right\},\left\{ {1,\left\{ 1 \right\}} \right\}} \right\}.$
3. The set $$B = \left\{ {1,2,3,3} \right\}$$ has $$3$$ elements – $$1,$$ $$2,$$ and $$3.$$ The power set of $$B$$ includes $$8$$ subsets:
4. ${\mathcal{P}\left( B \right) = \left\{ {\varnothing,\left\{ 1 \right\},\left\{ 2 \right\},\left\{ 3 \right\},\left\{ {1,2} \right\},\left\{ {2,3} \right\},}\right.}\kern0pt{\left.{\left\{ {1,3} \right\},\left\{ {1,2,3} \right\}} \right\}.}$
5. The set $$C = \left\{ {1,\left\{ {2,3} \right\},4} \right\}$$ contains elements $$1,$$ $$4$$ and the set $$\left\{ {2,3} \right\},$$ so the power set of $$C$$ is written as
6. ${\mathcal{P}\left( C \right) = \left\{ {\varnothing,\left\{ 1 \right\},\left\{\left\{ {2,3} \right\}\right\},\left\{ 4 \right\},\left\{ {1,\left\{ {2,3} \right\}} \right\},}\right.}\kern0pt{\left.{\left\{ {1,4} \right\},\left\{ {\left\{ {2,3} \right\},4} \right\},}\right.}\kern0pt{\left.{\left\{ {1,\left\{ {2,3} \right\},4} \right\}} \right\}.}$
7. In roster form, the set $$D = \left\{ {x \in \mathbb{Z}\,|\,{x^2} \lt 2} \right\}$$ is written as $$D = \left\{ { – 1,0,1} \right\}.$$ We see that it has $$3$$ elements. Hence,
8. ${\mathcal{P}\left( D \right) = \left\{ {\varnothing, \left\{ {-1} \right\},\left\{ 0 \right\},\left\{ 1 \right\},\left\{ { – 1,0} \right\},}\right.}\kern0pt{\left.{\left\{ { – 1,1} \right\},\left\{ {0,1} \right\},}\right.}\kern0pt{\left.{\left\{ { – 1,0,1} \right\}} \right\}.}$

### Example 6.

Let $$A \subseteq B$$ and $$a \in A.$$ Determine whether these statements are true or false:
1. $$a \not\in B$$
2. $$A \in B$$
3. $$a \subseteq A$$
4. $$\left\{a\right\} \subseteq A$$
5. $$\left\{a\right\} \subseteq B$$

Solution.

1. The statement $$a \not\in B$$ is false. Since the set $$A$$ is a subset of $$B,$$ then each element of $$A$$ (including the element $$a$$) belongs to the set $$B,$$ that is $$a \in B.$$
2. The statement $$A \in B$$ is false. The $$\in$$ symbol defines membership and is related to elements. The set $$A$$ is not an element.
3. Similarly to the previous example, the statement $$a \subseteq A$$ is false. The $$\subseteq$$ symbol is used for subsets. The element $$a$$ is not a subset.
4. The statement $$\left\{a\right\} \subseteq A$$ is true. The set $$\left\{a\right\},$$ consisting of one element $$a,$$ is a subset of the set $$A.$$
5. The statement $$\left\{a\right\} \subseteq B$$ is true. The set $$\left\{a\right\}$$ is a subset of $$A,$$ and $$A$$ is a subset of $$B.$$ The subset relation is transitive. Hence, $$\left\{a\right\}$$ is a subset of $$B.$$