Title: Default for 35.1 Sets
Course: HELM Workbooks 2023-2024

Sets

Definition and Examples

A set is any collection of objects. Here, the word 'object' is used in its most general sense: an object may be a diode, an aircraft, a number, or a letter, for example.

A set is often described by listing the collection of objects - these are the members or elements of the set. We usually write this list of elements in curly brackets, and denote the full set by a capital letter. For example,

\(C = \{\hbox{the resistors produced in a factory on a particular day}\}\),

\(D = \{\hbox{on, off}\}\),

\(E = \{0,1,2,3,4,5,6,7,8,9\}\).

The elements of set \(C\), above, are the resistors produced in a factory on a particular day. These could be listed individually but as the number is large it is not practical to do this. Set \(D\) lists the two possible states of a simple switch, and the elements of set \(E\) are the digits used in the decimal system.

Sometimes we can describe a set in words. For example, '\(A\) is the set all odd numbers'. Clearly all the elements of this set \(A\) cannot be listed. Similarly, \(B\) is the set of binary digits viz \(B=\{0,1\}\), which has only two elements.

A set with a finite number of elements is called a finite set. The sets \(B,C,D\) and \(E\) are finite sets. The set \(A\) has an infinite number of elements and so is not a finite set. It is known as an infinite set.

Two sets are equal if they contain exactly the same elements. For example, the sets \(\{9,10,14\}\) and \(\{10,14,9\}\) are equal since the order in which elements are written is unimportant. Note also that repeated elements are ignored: The set \(\{2,3,3,3,5,5\}\) is equal to the set \(\{2,3,5\}\).

The symbol \(\in\)

To show that an element belongs to a particular set we use the symbol (Greek epsilon) \(\in\). This symbol means 'is a member of' or 'belongs to'. The symbol \(\not\in\) means 'is not a member of' or 'does not belong to'.

For example if \(X = \{\hbox{all even numbers}\}\) then we may write \(4 \in X\), \(6 \in X\), \(7 \not\in X\) and \(11 \not\in X\).

Subsets

Sometimes one set is contained completely within another set. For example, if \(X = \{2,3,4,5,6\} \hbox{ and } Y = \{2,3,6\}\), then all the elements of \(Y\) are also elements of \(X\). We say that \(Y\) is a subset of \(X\) and write \(Y \subseteq X\).

Example

Given \(A = \{0,1,2,3\}\), \(B = \{0,1,2,3,4,5,6\}\) and \(C = \{0,1\}\), state which sets are subsets.

Solution

\(A\) is a subset of \(B\), that is \(A \subseteq B\).

\(C\) is a subset of \(B\), that is \(C \subseteq B\).

\(C\) is a subset of \(A\), that is \(C \subseteq A\).

The empty set and the universal set

Sometimes a set will contain no elements. For example, suppose we define the set \(K\) by \[ K = \{\hbox{all odd numbers which are divisible by 4}\}. \] Since there are no odd numbers which are divisible by 4, then \(K\) has no elements. The set with no elements is called the empty set, and it is denoted by \(\emptyset\).

On the other hand, the set containing all the objects of interest in a particular situation is called the universal set, denoted by \(S\). The precise universal set will depend upon the context. If, for example, we are concerned only with whole numbers then \(S\) will be the set of whole numbers. If we are concerned only with the decimal digits then we take \(S = \{0,1,2,3,4,5,6,7,8,9\}\).

The complement of a set

Given a set \(A\) and a universal set \(S\) we can define a new set, called the complement of \(A\) and denoted by \(A'\). The complement of \(A\) contains all the elements of the universal set that are not in \(A\).

Example

Given \(A = \{2,3,7\}\), \(B = \{0,1,2,3,4\}\) and \(S = \{0,1,2,3,4,5,6,7,8,9\}\) state

1. \(A'\)
2. \(B'\)

Solution

1. The elements of \(A'\) are those which belong to \(S\) but not to \(A\): \[A'= \{0,1,4,5,6,8,9\}.\]
2. \(B' = \{5,6,7,8,9\}\).

Sometimes a set is described in a mathematical way. Suppose the set \(Q\) contains all numbers which are divisible by 4 and 7. We can write \[Q = \{x: x \hbox{ is divisible by 4 and }x \hbox{ is divisible by 7}\}.\]

The symbol : stands for 'such that '. We read the above as '\(Q\) is the set comprising all elements \(x\), such that \(x\) is divisible by 4 and by 7'.

Venn diagrams

Sets are often represented pictorially by Venn diagrams as in the following figure.

[Image: Venn diagram figure]

Here \(A,B,C,D\) represent sets. The sets \(A,B\) have no items in common so are drawn as non-intersecting regions whilst the sets \(C,D\) have some items in common so are drawn overlapping. In a Venn diagram, the universal set is always represented by a rectangle and sets of interest by area region within this rectangle.

Example

Represent the sets \(A = \{0,1\}\) and \(B = \{0,1,2,3,4\}\) using a Venn diagram.

Solution

The elements 0 and 1 are in set \(A\), represented by the small circle in the figure below. The large circle represents set \(B\) and so contains the elements \(0,1,2,3\) and \(4\). A suitable universal set in this case is the set of all integers. The universal set is shown by the rectangle. Note that \(A \subseteq B\). This is shown in the Venn diagram by \(A\) being completely inside \(B\).

[Image]

Figure: The set \(A\) is contained completely within \(B\).

The intersection and union of sets

Intersection

Given two sets, \(A\) and \(B\), the intersection of \(A\) and \(B\) is a set which contains elements that are common both to \(A\) and \(B\). We write \(A \cap B\) to denote the intersection of \(A\) and \(B\). Mathematically we write this as:

Key Point

\(A \cap B = \{x:x \in A \hbox{ and }x \in B\}\).

This says that the intersection contains all the elements \(x\) such that \(x\) belongs to \(A\) and also \(x\) belongs to \(B\). Note that \(A \cap B\) and \(B \cap A\) are identical. The intersection of two sets can be represented by a Venn diagram as shown in the following figure.

[Image]

Figure: The overlapping area represents \(A \cap B\).

Example

Given \(A = \{3,4,5,6\}\), \(B = \{3,5,9,10,15\}\) and \(C = \{4,6,10\}\) state

1. \(A \cap B\)
2. \(B \cap C\)

and draw a Venn diagram representing these intersections.

Solution

1. The elements common to both \(A\) and \(B\) are \(3\) and \(5\). Hence \(A \cap B = \{3,5\}\).
2. The only element common to \(B\) and \(C\) is \(10\). Hence \(B \cap C = \{10\}\).

[Image: Venn diagram representing intersections]

The intersection of three or more sets is possible.

Example

Given \(A = \{0,1,2,3\}\), \(B = \{1,2,3,4,5\}\) and \(C = \{2,3,4,7,9\}\) state

1. \(A \cap B\)
2. \((A \cap B) \cap C\)
3. \(B \cap C\)
4. \(A \cap (B \cap C)\)

Solution

1. The elements common to \(A\) and \(B\) are \(1, 2\) and \(3\) so \(A \cap B = \{1,2,3\}\).
2. We need to consider the sets \((A \cap B)\) and \(C\). \(A \cap B\) is given in (a). The elements common to \((A \cap B)\) and \(C\) are \(2\) and \(3\). Hence \((A \cap B) \cap C = \{2,3\}\).
3. The elements common to \(B\) and \(C\) are \(2, 3\) and \(4\) so \(B \cap C = \{2,3,4\}\).
4. We look at the sets \(A\) and \((B \cap C)\). The common elements are \(2\) and \(3\). Hence \(A \cap (B \cap C) = \{2,3\}\).
Note from (b) and (d) that \((A \cap B) \cap C = A \cap (B \cap C)\).

The example illustrates a general rule. For any sets \(A\), \(B\) and \(C\) it is true that \[(A \cap B) \cap C = A \cap (B \cap C).\] The position of the brackets is thus unimportant. They are usually omitted and we write \(A \cap B \cap C\).

Suppose that sets \(A\) and \(B\) have no elements in common. Then their intersection contains no elements and we say that \(A\) and \(B\) are disjoint sets. We express this as \[A \cap B = \emptyset.\] Recall that \(\emptyset\) is the empty set. Disjoint sets are represented by separate area regions in the Venn diagram.

Union

The union of two sets \(A\) and \(B\) is a set which contains all the elements of \(A\) together with all the elements of \(B\). We write \(A \cup B\) to denote the union of \(A\) and \(B\). We can describe the set \(A \cup B\) formally by:

Key Point

\(A \cup B = \{x: x \in A \hbox{ or }x \in B \hbox{ or both}\}\).

Thus the elements of the set \(A \cup B\) are those quantities \(x\) such that \(x\) is a member of \(A\) or a member of \(B\) or a member of both \(A\) and \(B\). The deeply shaded areas of the figures below represents \(A \cup B\).

[Image]

Figure (a)

[Image]

Figure (b)

In Figure (a) the sets intersect, whereas in Figure (b) the sets have no region in common. We say they are disjoint.

Example

Given \(A = \{0,1\}\), \(B = \{1,2,3\}\) and \(C = \{2,3,4,5\}\) write down

1. \(A \cup B\)
2. \(A \cup C\)
3. \(B \cup C\)

Solution

1. \(A \cup B = \{0,1,2,3\}\).
2. \(A \cup C = \{0,1,2,3,4,5\}\).
3. \(B \cup C =\{1,2,3,4,5\}\).

Recall that there is no need to repeat elements in a set. Clearly the order of the union is unimportant so \(A \cup B = B \cup A\).

Q: Exercise

Given a set \(A\), its complement \(A'\) and a universal set \(S\), which of the following expressions are true?
- \(A \cup A' = S\)
- \(A \cap A' = \emptyset\)
- \(A \cap A' = S\)
- \(A \cup \emptyset = A \)
- \(A \cup \emptyset = \emptyset\)
- \(A \cap \emptyset = A\)
- \(A \cap \emptyset = \emptyset\)
- \(A \cup S = S \)
A: \(A \cup A' = S\); \(A \cap A' = \emptyset\); \(A \cup \emptyset = A \); \(A \cap \emptyset = \emptyset\); \(A \cup S = S \)
Feedback: The complement set \(A'\) consists of all elements in the universal set that are not in set \(A\), so \(A \cup A' = S\) and \(A \cap A' = \emptyset\). Also, the subset sequence \(\emptyset \subset A \subset S\) means means that a union between any pair equates to the larger set, \(A \cup \emptyset = A\), and an intersection equates to the smaller set, \(A \cap S = A\).

Exercise

Given \(A = [value]\), \(B = [value]\), and \(C = [value]\), obtain the sets:

1. \(A \cup B = \)
2. \(B \cap C = \)
3. \(A \cap (B \cup C) = \)
Feedback: We are given the sets \(A = [value]\), \(B = [value]\), and \(C = [value].\) 1. \(A \cup B\) consists of all elements of \(A\) together with all elements of \(B\), hence \[ A \cup B = [value].\] 2. \( B \cap C\) consists of elements that are common to both \(B\) and \(C\), hence \[ B \cap C = [value].\] 3. First \(B \cup C \) consists of all elements of \(B\) together with all elements of \(C\), hence \[ B \cup C = [value].\] Next, \(A \cap (B \cup C)\) consists of elements that are common to both \(A\) and \(B \cup C\), hence \[ A \cap (B \cup C) = [value] \cap [value] = [value].\]

Exercise

Given \(A = [value]\), \(B = [value]\), and \(C = [value]\), obtain the sets:

1. \(C \cap (B \cup A) = \)
2. \(A \cap B \cap C = \)
3. \(B \cup (A \cap C) = \)
Feedback: We are given the sets \(A = [value]\), \(B = [value]\), and \(C = [value].\) 1. \(B \cup A = [value] \cup [value] = [value]\). Hence, \[C \cap (B \cup A) = [value] \cap [value] = [value].\] 2. \(A \cap B \cap C\) contains elements that are common to \(A, B\) and \(C\), so \[A \cap B \cap C = [value].\] 3. \( A \cap C = [value] \cap [value] = [value]\). Hence, \[ B \cup (A \cap C) = [value] \cup [value] = [value].\]

Exercise

Let \(A = \{x: x \hbox{ is an odd integer and } x \hbox{ is greater than 0 and less than } [value]\}\), and let \( B = \{x: x \hbox{ is an even integer and } x \hbox{ is greater than } [value] \hbox{ and less than } [value] \}\). List the elements of the sets \(A\) and \(B\).

1. \(A = \)
2. \(B = \)
Feedback: 1. \(\begin{align*}A & = \{x: x \hbox{ is an odd integer and } x \hbox{ is greater than 0 and less than } [value]\}\\ & = [value]. \end{align*}\) 2. \(\begin{align*}B & = \{x: x \hbox{ is an even integer and } x \hbox{ is greater than } [value] \hbox{ and less than } [value] \}\\ & = [value]. \end{align*}\)

Exercise

Let \(A = [value]\) and let \(B = [value]\). Obtain the following sets.

1. \(A \cup B =\)
2. \(A \cap B =\)
Feedback: We are given the sets \(A = [value]\) and let \(B = [value]\). 1. \( A \cup B \) consists of all elements of \(A\) together with all elements in \(B\). Hence, \[A \cup B =[value] \cup [value] = [value].\] 2. \(A \cap B\) contains elements that are common to both \(A \) and \(B \). Hence, \[A \cap B = [value] \cap [value] = [value].\]

Exercise

Let \(A = [value]\), \(B = [value]\) and \(C = [value]\). Obtain the following sets.

1. \((A \cup B) \cap C =\)
2. \((A \cap B) \cup C =\)
3. \( A \cup B \cup C = \)
Feedback: We are given the sets \(A = [value]\), \(B = [value]\) and \(C = [value]\) 1. We need to look at the sets \(A \cup B\) and \(C\). \[A \cup B = [value].\] The set \((A \cup B) \cap C\) consists of the elements common to both of \(A \cup B\) and \(C\). Hence, \((A \cup B) \cap C = [value]\). 2. First note that \(A \cap B =[value]\). We form the union of the sets \(A \cap B\) and \(C\) to obtain \((A \cap B) \cup C = [value]\). 3. The set formed by the union of all three sets will contain all the elements from all the sets:\[A \cup B \cup C = [value].\]

Exercise

Let \(D = [value] \) and let \(F\) be the set containing the entire English alphabet. State

\(D \cap F = \)
Feedback: The elements common to \(D\) and \(F\) are \([value], [value]\) and \([value]\), and so \(D \cap F = [value]\). Note that \(D\) is a subset of \(F\) and so \(D \cap F = D\).

Q: Exercise

A factory produces cars over a five day period; Monday to Friday. Consider the following sets,

\(A = \{\hbox{cars produced from Monday to Friday}\}\)

\(B = \{\hbox{cars produced from Monday to Thursday}\}\)

\(D = \{\hbox{cars produced on Wednesday}\}\)

\(E = \{\hbox{cars produced on Wednesday and Thursday}\}\)

Which of the following statements are correct?
- \(B \subset A \)
- \(B \subset E\)
- \(D \subset A\)
- \(E \subset A\)
- \(D \subset B\)
- \(E \subset B\)
- \(D \subset E\)
- \(A \subset B\)
A: \(B \subset A \); \(D \subset A\); \(E \subset A\); \(D \subset B\); \(E \subset B\); \(D \subset E\)
Feedback: Let \(A = \{\hbox{Mo}, \hbox{Tu}, \hbox{We}, \hbox{Th}, \hbox{Fi} \}\), \(B = \{\hbox{Mo}, \hbox{Tu}, \hbox{We}, \hbox{Th} \}\), \(D = \{\hbox{We}\}\) and \(E = \{\hbox{We}, \hbox{Th} \}\), then \(D \subset E \subset B \subset A\). Note that \(E \subset A\) because \(E \subset B\) and \(B \subset A\).

Q: Exercise

Let \(A\) and \(B\) be intersecting sets, i.e. are not disjoint. Consider the following Venn diagrams.

[Image: Venn_diagram]

The shaded area of diagram (a) represents [...]

The shaded area of diagram (b) represents [...]

The shaded area of diagram (c) represents [...]

The shaded area of diagram (d) represents [...]

The shaded area of diagram (e) represents [...]
Also offered: union of A' and B; intersection of A and B'; intersection of A' and B; union of A and B; intersection of A and B
A: A'; B'; union of A and B'; union of A' and B'; intersection of A' and B'
Feedback: Note the following equivalent definitions: (c) \(A \cup B' = (A' \cap B)'\) (d) \(A' \cup B' = (A \cap B)'\) (e) \(A' \cap B' = (A \cup B)'\)

Example

Let \(A = \{0,1\}\) and let \(B = \{2,3,4\}\).

Note that \(A\) and \(B\) have no elements in common. This is represented pictorially in the Venn diagram by circles which are totally separate from each other as shown in the figure below. Here, \(S\) denotes the universal set.

[Image]

Figure: The sets \(A\) and \(B\) have no elements in common.

The complement of \(A\), denoted by \(A'\), is the set whose elements do not belong to \(A\). The set \(A'\) is shown in the figure below (the shaded area).

[Image]

Figure: The complement of \(A\) contains elements which are not in \(A\).

Similarly, the set \(B'\) is shown in the figure below (the shaded area).

[Image]

Figure: Everything outside of \(B\) (but within \(S\)) is \(B'\).

Q: Exercise

Given 2 sets \(A, B\) and a universal set \(S\), recall that the complement of \(A\) is denoted by \(A'\) and the complement of \(B\) is denoted by \(B'\). Which of the following statements are true?
- \( (A \cap B)' = A' \cup B' \)
- \( (A \cup B)' = A' \cap B' \)
- \( (A \cap B)' = A' \cap B' \)
- \( (A \cup B)' = A' \cup B' \)
- \(A \cup B = A' \cup B'\)
A: \( (A \cap B)' = A' \cup B' \); \( (A \cup B)' = A' \cap B' \)
Feedback: To see that these 2 statements are true, use definitions of complement, union, intersection. Alternatively, draw Venn diagrams representing the sets in question.

Exercise

Let \(A = [value]\), \(B = [value]\), and \(S = [value]\) the universal set. List the elements of each of the following sets.

Recall that the complement of \(A\) is denoted by \(A'\) and the complement of \(B\) is denoted by \(B'\).

1. \(A' = \)
2. \(B' = \)
3. \(A \cup B = \)
4. \((A' \cap B)' = \)
5. \((B' \cup A)' = \)
Feedback: We are given \(A = [value]\), \(B = [value]\), and \(S = [value]\) the universal set. 1. \(A'\) consists of elements in \(S\) that are not in \(A\), hence \[A' = [value].\] 2. Similarly \(B' = [value].\) 3. \(A \cup B = [value] \cup [value] = [value]\). 4. Note that \[A' \cap B = [value] \cap [value] \\ = [value].\] Hence, \((A' \cap B)' = [value]\). 5. Note that \[B' \cup A = [value] \cup [value] \\ = [value].\] Hence, \((B' \cup A)' = [value]\).

Exercise

Let \(A = [value]\), \(B = [value]\), and \(S = [value]\) the universal set. Recall that the complement of \(A\) is denoted by \(A'\) and the complement of \(B\) is denoted by \(B'\). List the elements of each of the following sets.

1. \(A' \cup B' = \)
2. \(A' \cap B' = \)
3. \((A \cup B)' = \)
4. \((A \cap B)' = \)
Feedback: We are given \(A = [value]\), \(B = [value]\), and \(S = [value]\) the universal set. We have \(A' = [value]\) and \(B' = [value]\), so (a) \(A' \cup B' = [value]\), (b) \(A' \cap B' = [value]\). (c) We have \(A \cup B = [value]\), so \[(A \cup B)' = [value].\] (d) We have \(A \cap B = [value]\), so \[(A \cap B)' = [value].\] Note that the answers for (a) and (d) are the same. Also, the answers for (b) and (c) are the same.