Professional Documents
Culture Documents
Elementary Set Theory: 4.1. Definition
Elementary Set Theory: 4.1. Definition
Chapter 4
Elementary set theory
4.1. Definition
By this definition a set cannot have duplicated elements. A set can be defined by listing its
elements, between curly brackets. For instance,
{apple, banana, orange}
defines a set, the set of fruits. The elements or members of the set are apple, banana, and orange.
Example 1.
The following are sets:
• {Abu Dhabi, Dubai, Sharjah, Fujairah, Ajman, Umm alQuwain, Ras alKhaimah}
This is the set of all emirates in UAE.
• {2,5,6,7}
This is a set of some whole numbers.
• {2, apple, Dubai}
This collection of objects is a set, even though the elements are not of the same type. For
this kind of set, a unified classification of its elements may not be easy to do.
By the above definition of set, the collection {1,1,4,5} is not a set, per see, because 1 is duplicated.
In mathematics, we call this kind of collection as a multiset. Multisets are not discussed on this
course.
Because a set itself is an object, it can be an element of another set.
Chapter 4. Elementary Set Theory
Example 2.
• Consider the collection
{1, 3, 5, 7, {1}, {3,5}, 11}.
This collection is a set. The elements are a mix of whole numbers and some sets of whole
numbers. For example, 1 is an element of the set;{1} is also an element of the set.
Elements 1 and {1} are two different elements. 1 is a whole number, and {1} is the set of
whole number 1. Also, the elements 3 and 5 are different from the element {3,5}.
• The collection
{1, 3, 5, 7, {1}, {3,5}, {5,3}, 11}
is not a set because the two objects {3,5} and {5,3} are two equal sets. Thus, the object
{3,5} is duplicated. This collection is a multiset.
As a convention, a set is denoted by upper-case letter and any element of it by a lower-case letter.
For instance, we can denote the above-mentioned sets using upper-case letters as follows:
• 𝐴 = {apple, banana, orange}
• 𝐵 = {Abu Dhabi, Dubai, Sharjah, Fujairah, Ajman, , Umm alQuwain, Ras alKhaimah}
• 𝑆 = {2,4,6,7}
The symbol ∈ is used to state that an object is an element/member of a set. For instance, in the
above examples, apple is an element of 𝐴; so, we write apple ∈ 𝐴. Similarly, 𝐷𝑢𝑏𝑎𝑖 ∈ 𝐵, and
2 ∈ 𝑆. To indicate that an object does not belong to a set, we use the notation ∉. For instance,
using the above sets, pear ∉ 𝐴, Muscat ∉ 𝐵, 10 ∉ 𝑆.
This may be quite confusing, but you can consider the following situations. You define a set of
students in the class, whose height is less than 170 cm. You will find many of them to form your
collection and set. Suppose you define another set: a set of students in the class, whose height is
more than 300 cm. You will likely not find any; if this is the case, then the set is empty, even
though you define it.
Chapter 4. Elementary Set Theory
Example 3.
The sets 𝐴 = {1, 3, 5, 7} and 𝐵 = {5, 1, 3, 7} are equal; the two sets have exactly the same
elements, even though the elements are not in the same order; thus, 𝐴 = 𝐵.
The set 𝐴 however is not equal to the set 𝐶 = {1, 3, 5, 7, 9}. In this case, while every element
of 𝐴 is an element of 𝐶, not every element of 𝐶 is an element of 𝐴. Specifically, 9 ∈ 𝐶, but
9 ∉ 𝐴. Thus, 𝐴 ≠ 𝐶.
Example 4.
a. Consider the set 𝐴 = {1, 3, 5, 7} and 𝐵 = {1, 3, 5, 7, 9}. Since every element of 𝐴 is an
element of 𝐵, we say 𝐴 is a subset of 𝐵, 𝐴 ⊆ 𝐵.
However, not every element of 𝐵 is an element of 𝐴. Specifically, 9 ∈ 𝐵 is not an element
of 𝐴. Thus, 𝐵 is not a subset of 𝐴; i.e., 𝐵 ⊈ 𝐴.
b. Consider the set 𝐴 = {1, 3, 5, 7} and 𝐶 = {5, 1, 3, 7}. Since every element of 𝐴 is an
element of 𝐶, we say 𝐴 is a subset of 𝐵, or 𝐴 ⊆ 𝐶.
Notice also the converse, that every element of 𝐶 is an element of 𝐴. Therefore, we say
𝐶 ⊆ 𝐴. In fact, 𝐴 = 𝐶.
Example 5.
Consider the set 𝐴 = {1, 3, 5, 7} and 𝐶 = {5, 1, 3, 7}. In Example 4, we concluded that 𝐴 ⊆ 𝐶
and 𝐴 = 𝐶. Thus, 𝐴 is not a proper subset of 𝐶.
Chapter 4. Elementary Set Theory
Example 6.
Consider the set 𝐴 = {1, 3, 5, 7} and 𝐵 = {1, 3, 5, 7, 9}. In Example 4, we concluded that 𝐴 ⊆
𝐵; In Example 3, we concluded that 𝐴 ≠ 𝐵. Thus, 𝐴 is a proper subset of 𝐵; i.e., 𝐴 ⊂ 𝐵.
Example 7.
Consider the set 𝑆 = {1, 3, 5, 7, {1}, {3,5}, 11}. Then, for instance, the following are true:
a. 3, 5 ∈ 𝑆; 3 and 5 are elements S
b. 1 ∈ 𝑆; also, the set {1} ∈ 𝑆
c. {3, 5} ∈ 𝑆; In this case, we refer to set {3,5} in the collection.
d. {3,5} ⊂ 𝑆; Here, we refer to a set formed by collecting 2 elements of 𝑆: 3 and 5.
e. {{3,5}} ⊂ 𝑆; This is a set that consists of one element: {3,5}.
This fact is not easy to understand and is not to be proved here, but must be taken for granted:
The empty set is a subset of every set.
Example 8.
Consider the set 𝐴 = {1, 3, 5, 7} and 𝐵 = {1, 3, 5, 7, 9}.
Then ∅ ⊂ 𝐴. Also, ∅ ⊂ 𝐵. In fact, ∅ ⊆ ∅.
Exercise 4.2. Given the set 𝑆 = {1, 2, 3, 4, {1,2}, {2, 3}, {1,2,3}, {1,2,3,4}}. Determine if the
following statements are true of false.
a. 1∈𝑆
b. 1,2 ∈ 𝑆
c. 1,2 ⊂ 𝑆
d. {1,2} ⊂ 𝑆
e. {1,2} ∈ 𝑆
f. {{1,2}} ∈ 𝑆
g. ∅∈𝑆
h. 0∈𝑆
i. ∅⊂𝑆
j. 0⊂𝑆
k. {{1,2}, {2,3}} ⊂ 𝑆
l. {1,2,3,4} = {{1,2,3,4}}
Chapter 4. Elementary Set Theory
Example 9.
a) The set 𝐴 = {apple, banana, orange} has a finite number of elements. Its cardinality is
|3|.
b) The set 𝐵 = {Abu Dhabi, Dubai, Sharjah, Fujairah, Ajman} has a finite number of
elements. Its cardinality is |5|
c) If 𝑆 = {1, 3, 5, 7, 9, 11, 13, 15}, then |𝑆| = 8.
A set can have infinitely many elements. Think about the set of all odd numbers. This is an
example of infinite sets. For this course, we are not concerned with the cardinality of infinity
sets.
So far, we define a set by listing its elements. Sets defined in this way is said to be in an
enumerated form. In mathematics, it often times is handier to work with a set defined in the so-
called predicative forms. We have encountered the term “predicate” earlier in Section 3.1.
Consider the set
𝑆 = {1, 3, 5, 7, 9, 11, 13, 15}.
Recall that we shall use a lower-case letter to indicate an element of a set. So, let us identify any
element of 𝐵 by 𝑥. What is this 𝑥? Of course, we cannot say 17 for 𝑥. 𝑥 has to be an element of
𝑆, and 17 ∉ 𝑆. Notice that the elements of 𝑆 are positive odd numbers, and they are less than 16.
We can use this fact to state about the set 𝑆:
“𝑆 is the set of all odd numbers 𝑥 such that 𝑥 is less than 16”.
This statement in words can be succinctly written mathematically as
𝑆 = {𝑥 ∈ odd numbers | 𝑥 < 16}
This is a predicative form of the set 𝑆 = {1, 3, 5, 7, 9, 11, 13, 15}. In the above predicative form,
𝑥 < 16 is the predicate.
In general, a predicative form of set is written in the form:
𝑆 = {𝑥 ∈ 𝑇 | 𝑃(𝑥)},
where 𝑃(𝑥) is the predicate.
Chapter 4. Elementary Set Theory
Example 10.
The binary number system is represented by 0 and 1. These two numbers, as we saw in
Chapter 2, are remainders of the division of a natural number 𝑛 by 2, 𝑛 mod 2.
Example 11.
A division of a positive odd number by 2 always gives 1 as the remainder. Thus, if 𝑛 is a
positive odd number, then 𝑛 mod 2 = 1. Using this fact, we can define the set of all positive
odd numbers in a predicative form as follows:
𝑆 = {𝑥 ∈ ℕ | 𝑥 mod 2 = 1}.
Example 12.
A division of a positive even number by 2 always gives 0 as the remainder. Thus, if 𝑛 is a
positive even number, then 𝑛 mod 2 = 0. Using this fact, we can define the set of all positive
even numbers in a predicative form as follows:
𝑆 = {𝑥 ∈ ℕ | 𝑥 mod 2 = 0}.
Example 13.
Consider the function 𝑓(𝑥) = (𝑥 − 2)(𝑥 − 4). If 𝑥 = 2, then 𝑓(2) = (2 − 2)(2 − 4) = 0.
Also, if 𝑥 = 4, then 𝑓(4) = (4 − 2)(4 − 4) = 0. Thus, 2 and 4 are two values of 𝑥 such that
𝑓(𝑥) = (𝑥 − 2)(𝑥 − 4) = 0. They are called the roots of 𝑓(𝑥). We can define a set of these
roots as follows:
𝑆 = {2,4} = {𝑥 ∈ ℝ | (𝑥 − 2)(𝑥 − 4) = 0}.
Exercise 4.4. Formulate a predicative form for the following sets. (There is more than one
answer.)
a. {0, 1, 2, 3, 4, 5, 6, 7}
b. {−4, 6}
c. {3, 5, 7, 9}
Chapter 4. Elementary Set Theory
The exact definition of a universal set depends on the actual problem at hand.
For instance, when we deal with sets of integers, we may define ℤ is the universal set, because
any finite set of whole numbers is a subset of ℤ. This does not prevent us to set ℝ as the universal
set, because any finite set of whole numbers is also a subset of ℝ.
Example 14.
Let 𝒰 = ℝ. Then, for instance,
a) {1,2,3} ⊂ 𝒰
b) ℕ⊂𝒰
c) {𝑥 ∈ ℤ | 𝑥 mod 2 = 1} ⊂ 𝒰
d) ℚ⊂𝒰
e) {𝑥 ∈ ℝ |(𝑥 − 4)(𝑥 − 7.5) = 0 } ⊂ 𝒰
f) ℝ⊆𝒰
g) 𝒰⊆𝒰
h) Certainly, ∅ ⊂ 𝒰
In this context, we do not interpret a universal set as the universe such that apple, Mazda, UAE,
10, √2, Bob, Amanda, Kunafa, Biryani, Jupiter, blackholes, etc. are elements of this universe.
Exercise 4.5.
For the given sets, define a possible universal set.
a) {2, 3, 5, 7, 11, 13, … }
b) {𝑥 | 𝑥 = 𝑛 𝑚𝑜𝑑 8, 𝑛 ∈ ℕ}
c) {Abu Dhabi, AlAin, Sharjah, Ajman}
d) {𝑥 | 𝑥 2 − 16 = 0 }
A way to illustrate the relationship between sets is by using Venn diagram. Suppose a universal
set 𝒰 is defined, and 𝐴 is a subset of 𝒰. We can use Venn diagram to illustrate the relation 𝐴 ⊂
𝒰 like this:
Chapter 4. Elementary Set Theory
Figure 1. Venn Diagram relating the universal set 𝒰 and the set 𝐴 = {1,2,3}
In Figure 1: left, the rectangular region depicts the universal set 𝒰, and the circular region depicts
the set 𝐴. That the circular region is contained inside the rectangle indicates that 𝐴 ⊂ 𝒰. Every
element of 𝐴 is contained inside the circle. For example, if 𝐴 = {1, 2, 3} and 𝒰 = ℕ, then the
elements of 𝐴 must be placed inside the circle (Figure 1: right). Because 𝐴 ⊂ 𝒰, the objects 1, 2,
and 3 are also elements of 𝒰. But 𝒰 still has many more elements, which are not in 𝐴. For
instance, 4 ∉ 𝐴 but 4 ∈ 𝒰.
𝐴 ∩ 𝐵 is illustrated by Venn diagram as in Figure 2. Notice that the blue region is contained in
both the circular region for 𝐴 and the circular region for 𝐵. An element contained in this blue
region belongs to both 𝐴 and 𝐵. Thus, the blue region indicates 𝐴 ∩ 𝐵.
Example 15.
Find the intersection of 𝐴 = {1, 3, 5, 7, 9} and 𝐵 = {2, 3, 5, 7, 11}. Determine the cardinality
of 𝐴 ∩ 𝐵.
Answer.
From the sets, the elements 3, 5, 7 are elements of both 𝐴 and 𝐵. Elements 1 and 9 of 𝐴 are
not in 𝐵 and elements 2 and 11 of 𝐵 are not in 𝐴. Thus,
𝐴 ∩ 𝐵 = {3, 5, 7}.
1, 2, 9, 11 are not elements of 𝐴 ∩ 𝐵. Venn diagram for this problem is shown in Figure 3.
Figure 3. 𝐴 ∩ 𝐵 = {3,5,7}
Two sets 𝐴 and 𝐵 are said to be disjoint if 𝐴 ∩ 𝐵 = ∅. Two disjoint sets are illustrated in Venn
diagram in Figure 4.
Example 16.
a) Let 𝐴 = {1,5, 9, 10} and 𝐵 = {3,4,8,12}. In this case, 𝐴 ∩ 𝐵 = ∅. Thus, 𝐴 and 𝐵 are
disjoint.
b) The set 𝐴 = { 𝑥 ∈ ℕ | 𝑥 mod 2 = 0 } and the set 𝐵 = { 𝑥 ∈ ℕ | 𝑥 mod 2 = 1} are
disjoint.
c) The set 𝐴 = { 𝑥 ∈ ℝ | (𝑥 − 2)(𝑥 − 8) = 0 } and the set 𝐵 = { 𝑥 ∈ ℕ | 𝑥 mod 2 = 0 } are
not disjoint. Here, 𝐴 = {2, 8}. Thus, 𝐴 ∩ 𝐵 = {2, 8}.
Chapter 4. Elementary Set Theory
By this definition, the set 𝐴 ∪ 𝐵 may also contain elements which are both elements of 𝐴 and
𝐵. Using Venn diagram, 𝐴 ∪ 𝐵 is illustrated by the blue region in Figure 5. In the left figure, 𝐴
and 𝐵 are disjoint; thus, 𝐴 ∩ 𝐵 = ∅ but 𝐴 ∪ 𝐵 is non-empty (given by the whole blue region).
In the right figure, 𝐴 and 𝐵 are not disjoint. The intersection of 𝐴 and 𝐵 is the middle part of
the blue region. Since 𝐴 ∩ 𝐵 is wholly contained in 𝐴 ∪ 𝐵, we have
𝐴 ∩ 𝐵 ⊂ 𝐴 ∪ 𝐵.
(Warning! This is NOT a proof of this property.)
Example 17.
Let 𝐴 = {1,5, 9, 10} and 𝐵 = {3,4,8,12}. Find 𝐴 ∪ 𝐵 and |𝐴 ∪ 𝐵|.
Answer.
Putting elements of 𝐴 and 𝐵 altogether in one set:
𝐴 ∪ 𝐵 = {1, 5, 9, 10, 3, 4, 8, 12}.
Thus, |𝐴 ∪ 𝐵| = 8.
Example 18.
Let 𝐴 = {1,3,5,7,9} and 𝐵 = {2,3,5,7,11}. Find 𝐴 ∪ 𝐵 and |𝐴 ∪ 𝐵|.
Answer.
Putting elements of 𝐴 and 𝐵 altogether in one set:
𝐴 ∪ 𝐵 = {1,2,3,5,7,9,11}.
Be careful here. Since 3,5,7 are elements of both 𝐴 and 𝐵, we must not list them two times.
The collection {1,2,3,3,5,5,7,7,9,11} is not a set per Definition 4.1.
|𝐴 ∪ 𝐵| is the cardinality or the number of elements of the set |𝐴 ∪ 𝐵|. Thus, |𝐴 ∪ 𝐵| = 7.
𝐴 ∩ 𝐵 = {3,5,7}. Thus, 𝐴 ∩ 𝐵 ⊂ 𝐴 ∪ 𝐵.
Example 19.
Let 𝐴 = {1,3,5,7,9} and 𝐵 = {2,3,5,7,11}. Find 𝐴 ∩ (𝐴 ∪ 𝐵) and |𝐴 ∩ (𝐴 ∪ 𝐵)|.
Answer.
We shall first work with terms in the brackets: 𝐴 ∪ 𝐵 = {1,2,3,5,7,9,11} (Figure 8: left).
Next, we form intersection of this set and 𝐴, see Figure 8: right.
𝐴 ∩ (𝐴 ∪ 𝐵) = {1,3,5,7,9} ∩ {1,2,3,5,7,9,11} = {1,3,5,7,9} = 𝐴
𝐴∪𝐵 𝐴 ∩ (𝐴 ∪ 𝐵)
Figure 8.
In Venn Diagram, 𝐴𝐶 is the remaining part of 𝒰 after excluding 𝐴, depicted as the blue region
in Figure 6.
Example 20.
Let 𝒰 = {1,3,6,7,9,10,11,12, 14,15} and 𝐴 = {6,7,10,11,14}. Determine 𝐴𝐶 .
Answer.
We need to collect elements of 𝒰, which are not elements of 𝐴. They are 1,3,9,12, and 15.
Thus,
𝐴𝐶 = {1,3,9,12,15}.
Figure 8. 𝐴𝐶 = {1,3,9,12,15}
Chapter 4. Elementary Set Theory
Example 20.
Let 𝒰 = {1,3,6,7,9,10,11,12, 14,15}, 𝐴 = {6,7,10,11,14} and 𝐵 = {3, 6,9,12}. Determine
(𝐴 ∪ 𝐵)𝐶 and |𝐴 ∪ 𝐵)𝐶 |.
Answer.
We shall first worth with terms in the brackets: 𝐴 ∪ 𝐵. In this case,
𝐴 ∪ 𝐵 = {3,6,7,9,10,11,12,14};
See Figure 9: left. The complement of the 𝐴 ∪ 𝐵 is elements of 𝒰, which are not in 𝐴 ∪ 𝐵.
They are 1 and 15. Thus, (𝐴 ∪ 𝐵)𝐶 = {1,15}; see Figure 9: right. With this, |(𝐴 ∪ 𝐵)𝐶 | = 2.
𝐴∪𝐵 (𝐴 ∪ 𝐵)𝐶
Figure 9.
Example 21.
Let 𝒰 = ℕ and 𝐴 = { 𝑥 ∈ 𝒰 | 𝑥 mod 2 = 0 }. Determine 𝐴𝑐 .
Answer.
𝐴 is the set of all positive even numbers. ℕ is the set of all positive whole numbers, which
consists of both positive even and odd numbers. Because an even number cannot be odd,
the set of all positive odd numbers are not in 𝐴. Therefore, 𝐴𝑐 = {𝑥 ∈ 𝒰 | 𝑥 mod 2 = 1 },
the set of all positive odd numbers.
For those who are interested, the formal answer to Example 15 can be done without knowing
the fact about odd or even numbers. Otherwise, just skip this part.
Using Venn diagram, 𝐴 − 𝐵 is depicted by the blue region in Figure 10. The grey region is part
of 𝐴, but is also part of 𝐵 (it is inside the circular region representing 𝐵) So, this grey region is
not part of 𝐴 − 𝐵.
If we exchange the role of 𝐴 and 𝐵 we arrive at the definition of 𝐵 − 𝐴:
𝐵 − 𝐴 = {𝑥 ∈ 𝒰 | 𝑥 ∈ 𝐵 and 𝑥 ∉ 𝐴 }.
𝐵 − 𝐴 is depicted by the white part of the circular region that represents the set 𝐴.
Figure 10. The blue region indicates 𝐴 − 𝐵. The grey region is part of 𝐴. The white part of the
circular region 𝐵 indicates 𝐵 − 𝐴.
Example 22.
Let 𝐴 = {1,3,5,7,9} and 𝐵 = {2,3,5,7,11}. Find 𝐴 − 𝐵 and 𝐵 − 𝐴.
Answer.
For 𝐴 − 𝐵, because elements 3, 5, 7 of 𝐴 also belong to 𝐵, therefore,
𝐴 − 𝐵 = {1,9}.
For 𝐵 − 𝐴, because elements 3, 5, 7 of 𝐵 also belong to 𝐴, therefore,
𝐵 − 𝐴 = {2, 11}.
Exercise 4.7. The sets 𝒰, 𝐴, 𝐵, and 𝐶 are shown in Figure 12. Determine the following sets
and the cardinality. (Note that the objects are numbers and small letters)
Figure 12.
a. 𝐴 b. 𝐵 c. 𝐶 d. 𝐴𝐶 e. 𝐵 𝐶 f. 𝐶 𝐶
g. 𝐴 ∩ 𝐵 h. 𝐴 ∩ 𝐶 i. 𝐵 ∩ 𝐶 j. 𝐴 ∪ 𝐶 k. (𝐴 ∪ 𝐶)𝐶 l. (𝐴 ∩ 𝐶)𝐶
m. (𝐴 ∪ 𝐵) ∩ 𝐶 n. (𝐴 ∩ 𝐶) ∪ 𝐵 q. 𝐴 ∩ 𝐵 ∩ 𝐶
r. 𝐴 ∪ 𝐵 ∪ 𝐶 s. 𝐴𝐶 ∩ 𝐶 t. 𝐴 ∩ 𝐵 𝐶
u. 𝐴 − 𝐵 v. (𝐴 ∪ 𝐵) − 𝐶 w. (𝐴 ∩ 𝐵) − 𝐶
Example 23.
The sets 𝒰, 𝐴, 𝐵, and 𝐶 are shown in Figure 13. The number indicates cardinality of
(sub)sets (regions). Determine
a. |𝐴| b. |𝐴 ∩ 𝐵| c. |𝐴 ∪ 𝐵| d. |𝐴𝐶 |
Figure 13.
Answer.
a. |𝐴| = 7 + 3 + 2 + 3 = 15
b. |𝐴 ∩ 𝐵| = 2 + 3 = 5
c. |𝐴 ∪ 𝐵| = 7 + 3 + 2 + 3 + 4 = 19
d. |𝐴𝐶 | = 5 + 2 + 4 + 8 = 19
Chapter 4. Elementary Set Theory
Exercise 4.8. The sets 𝒰, 𝐴, 𝐵, and 𝐶 are shown in Figure 13. The numbers shown are
cardinality of (sub)sets.
Figure 12.
Determine
a. |𝒰| b. |𝐵| c. |𝐶| d. |𝐵 𝐶 | e. |𝐶 𝐶 | f. |𝐴 ∩ 𝐶|
𝐶
g. |𝐵 ∩ 𝐶| h. |𝐴 ∪ 𝐶| i. |(𝐴 ∪ 𝐶) | j. |(𝐴 ∩ 𝐶)𝐶 | k. |(𝐴 ∪ 𝐵) ∩ 𝐶|
l. |(𝐴 ∩ 𝐶) ∪ 𝐵| m. |𝐴 ∩ 𝐵 ∩ 𝐶| n. |𝐴 ∪ 𝐵 ∪ 𝐶| o. |𝐴𝐶 ∩ 𝐶|
p. |𝐴 ∩ 𝐵 𝐶 | q. |𝐴 − 𝐵| r. |𝐶 − 𝐴| t. |(𝐴 ∪ 𝐶) − 𝐵|
u. |(𝐴 − 𝐵)𝐶 | v. |(𝐵 − 𝐶)𝐶 |
Example 24.
Let 𝐴 = {1,2}. Find the power set 𝐴.
Answer.
We need to list all possible subsets of 𝐴. They are
• ∅
• {1}
• {2}
• {1,2}
Thus, the power set of 𝐴 is 𝑃(𝐴) = {∅, {1}, {2}, {1,2}}.
Chapter 4. Elementary Set Theory
Example 25.
Let 𝐵 = {1,7, {1,2}}. Find the power set 𝐵.
Answer.
We need to list all possible subsets of 𝐵. Remember that {1,2} is an element of 𝐵. The
subsets are
• ∅
• {1}
• {7}
• {{1,2}}
• {1,7}
• {1, {1,2}}
• {7, {1,2}}
• {1,7, {1,2}}
Thus, the power set of 𝐵 is
𝑃(𝐵) = {∅, {1}, {7}, {{1,2}}, {1,7}, {1, {1,2}}, {7, {1,2}}, {1,7, {1,2}}}.
The elements of a power set are all sets. The empty set is always an element of a power set.
In Example 24, |𝐴| = 2 and |𝑃(𝐴)| = 4. In Example 25, |𝐵| = 3 and |𝑃(𝐵)| = 8.
In general, we have the rule:
If the set 𝐴 has cardinality 𝑛, i.e., |𝐴| = 𝑛, then the power set of 𝐴 has cardinality 2𝑛 , i.e.,
|𝑃(𝐴)| = 2𝑛 .
Since 𝐴 ⊆ 𝐴, consequently 𝐴 ∈ 𝑃(𝐴). Thus, out of 2𝑛 possible subsets of 𝐴, only 2𝑛 − 1 of them
are proper subsets of 𝐴.
Example 23.
|𝑃(𝐴)| = 128. How many elements does the set 𝐴 have?
Answer.
By using the rule, 𝑃(𝐴) = 2𝑛 = 128, we get 𝑛 = 7. Thus, 𝐴 has 7 elements; |𝐴| = 7.
Exercise 4.9. |𝐴| = 10. How many proper subsets of 𝐴 are there?
Exercise 4.10. 𝑃(𝐴) has 255 proper subsets of 𝐴. Find |𝐴|.
Exercise 4.11. Let 𝐴 = {𝑥 ∈ ℤ | − 2 ≤ 𝑥 ≤ 2 }. What is |𝑃(𝐴)|?
Two objects 𝑎 and 𝑏 can be collected to form a set {𝑎, 𝑏}. The set {𝑎, 𝑏} and the set {𝑏, 𝑎}. In
sets, the way the elements are listed is not important.
The same objects 𝑎 and 𝑏 can also be collected in a way that their order is important. In this
way, the list of objects 𝑎,𝑏 is then different from 𝑏, 𝑎. This list of two objects where order is
Chapter 4. Elementary Set Theory
important is called ordered 2-tuple. To distinguish sets with ordered 2-tuple, for the latter, we
shall indicate them by parentheses. Thus, (𝑎, 𝑏) is an ordered 2-tuple, not a set! Furthermore,
(𝑎, 𝑏) ≠ (𝑏, 𝑎).
In general, 𝑛 objects can be listed to form an ordered 𝒏-tuple. In ordered 𝑛-tuple, we can have
same objects listed and still lead to different ordered 𝑛-tuple. For example, (1,3,1) and (1,1,3)
are different ordered 3-tuple.
Elements of two sets 𝐴 and 𝐵 can be paired and listed to form an ordered 2-tuple. For example,
from the sets 𝐴 = {1,2} and 𝐵 = {𝑎, 𝑏, 𝑐}, we can pair 1 ∈ 𝐴 and 𝑎 ∈ 𝐵 to form (1, 𝑎) or
(𝑎, 1). Remember that (1, 𝑎) ≠ (𝑎, 1). Depending on which element we order first in the 2-
tuples, we can construct all possible 2-tuples using elements of 𝐴 and 𝐵. If we collect all these
2-tuples and form set, the resulting set is called the Cartesian product.
Notice in the definition that for 𝐴 × 𝐵, an element of 𝐴 must be listed first, followed by an
element of 𝐵. A consequence of Definition 4.13 is that
𝐵 × 𝐴 = { (𝑏, 𝑎) | 𝑎 ∈ 𝐴 and 𝑏 ∈ 𝐵 }.
So, watch out the order in the product!
Example 24.
Let 𝐴 = {1,2} and 𝐵 = {𝑎, 𝑏, 𝑐}. Find 𝐴 × 𝐵 and 𝐵 × 𝐴.
Answer.
For 𝐴 × 𝐵, we must list an element 𝐴 first in the 2-tuple, followed by an element of 𝐵. All
possible pairings are
(1, 𝑎), (1, 𝑏), (1, 𝑐), (2, 𝑎), (2, 𝑏), (2, 𝑐).
Therefore,
𝐴 × 𝐵 = {(1, 𝑎), (1, 𝑏), (1, 𝑐), (2, 𝑎), (2, 𝑏), (2, 𝑐)}.
For 𝐵 × 𝐴, we must list an element of 𝐵 first in the 2-tuple, followed by an element of 𝐴.
All possible pairings are
(𝑎, 1), (𝑎, 2), (𝑏, 1), (𝑏, 2), (𝑐, 1), (𝑐, 2).
Therefore,
𝐵 × 𝐴 = {(𝑎, 1), (𝑎, 2), (𝑏, 1), (𝑏, 2), (𝑐, 1), (𝑐, 2)}.
From Example 24, the set 𝐴 × 𝐵 has 6 elements; i.e., |𝐴 × 𝐵| = 6. Also, |𝐵 × 𝐴| = 6. In general,
if |𝐴| = 𝑛𝐴 and |𝐵| = 𝑛𝐵 , then |𝐴 × 𝐵| = |𝐵 × 𝐴| = 𝑛𝐴 ∙ 𝑛𝐵 .
Exercise 4.12. Let 𝐴 = {1,2,3} and 𝐵 = {𝑎, 𝑏, 𝑐}. Find 𝐴 × 𝐵, 𝐵 × 𝐴, |𝐴 × 𝐵|, and |𝐵 × 𝐴|.
Exercise 4.13. Let 𝐴 = {3, 7, 𝑎} and 𝐵 = {𝑐, 𝑏, 6, 8}. Find 𝐴 × 𝐵, 𝐵 × 𝐴, 𝐴 × 𝐴, 𝐵 × 𝐵,
|𝐴 × 𝐵|, |𝐵 × 𝐴|, |𝐴 × 𝐴|, and |𝐵 × 𝐵|.
Exercise 4.14. If |𝐴| = 5 and |𝐵| = 8, what is |𝐴 × 𝐴|, |𝐴 × 𝐵|, |𝐵 × 𝐴|, and |𝐵 × 𝐵|.
Also,
if |𝐴1 | = 𝑛1 , |𝐴2 | = 𝑛2 , …, |𝐴𝑚 | = 𝑛𝑚 , then |𝐴1 × 𝐴2 × … × 𝐴𝑚 | = 𝑛1 ∙ 𝑛2 ∙ … ∙ 𝑛𝑚 .
Example 25.
Let 𝐴 = {1,2}, 𝐵 = {𝑎, 𝑏, 𝑐}, and 𝐶 = {𝑥, 𝑦}. Find 𝐴 × 𝐵 × 𝐶 and |𝐴 × 𝐵 × 𝐶|.
Answer.
For 𝐴 × 𝐵 × 𝐶, we must list an element 𝐴 first in the 3-tuple, followed by an element of 𝐵,
and then 𝐶. All possible 3-tuples are
(1, 𝑎, 𝑥), (1, 𝑎, 𝑦), (1, 𝑏, 𝑥), (1, 𝑏, 𝑦), (1, 𝑐, 𝑥), (1, 𝑐, 𝑦),
(2, 𝑎, 𝑥), (2, 𝑎, 𝑦), (2, 𝑏, 𝑥), (2, 𝑏, 𝑦), (2, 𝑐, 𝑥), (2, 𝑐, 𝑦).
Thus,
𝐴 × 𝐵 × 𝐶 = {(1, 𝑎, 𝑥), (1, 𝑎, 𝑦), (1, 𝑏, 𝑥), (1, 𝑏, 𝑦), (1, 𝑐, 𝑥), (1, 𝑐, 𝑦),
(2, 𝑎, 𝑥), (2, 𝑎, 𝑦), (2, 𝑏, 𝑥), (2, 𝑏, 𝑦), (2, 𝑐, 𝑥), (2, 𝑐, 𝑦)}.
Next, |𝐴 × 𝐵 × 𝐶| = |𝐴||𝐵||𝐶| = 2 ∙ 3 ∙ 2 = 12.
Chapter 4. Elementary Set Theory
Exercise 4.15. Let 𝐴 = {1,2}, 𝐵 = {𝑎, 𝑏, 𝑐}, and 𝐶 = {𝑥, 𝑦}. Find 𝐴 × 𝐶 × 𝐵 and 𝐶 × 𝐴 × 𝐵.
Exercise 4.16. Let |𝐴| = 10, |𝐵| = 4, |𝐶| = 6, and |𝐷| = 7. What is |𝐴 × 𝐵 × 𝐶 × 𝐷| and
|𝐵 × 𝐶 × 𝐴 × 𝐷|.
Exercise 4.17. A color on the computer graphics is generated as a combination of red, green,
and blue code, or RGB. Suppose each basic color has 256 different codes
(from 0 to 255). How many possible different colors are there in this RGB
color code?
The laws in Table 1 can be verified using Venn diagram (see Example 19 for one of the
absorption laws).
Chapter 4. Elementary Set Theory
Example 26.
Verify the distributive law 𝐴 ∩ (𝐵 ∪ 𝐶) = (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) using Venn diagram.
Answer.
We start with the left-hand side. Figure 13: left indicates 𝐵 ∪ 𝐶. The mid figure indicates 𝐴.
Intersecting the two blue regions in the left and mid figure gives 𝐴 ∩ (𝐵 ∪ 𝐶) (right figure).
𝐵∪𝐶 𝐴 𝐴 ∩ (𝐵 ∪ 𝐶)
Figure 13.
For the right-hand sides, the blue region in Figure 14: left and mid indicates 𝐴 ∩ 𝐵 and 𝐴 ∩
𝐶, respectively. Taking union of the two regions gives (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) (right figure).
𝐴∩𝐵 𝐴∩𝐶 (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶)
Figure 14.
The blue region in Figure 13: right is equal to the blue region in Figure 14: right. This verifies
the distributive law.
Laws of set theory can be used to simplify expressions that involve sets, without going through,
e.g., Venn diagram.
Chapter 4. Elementary Set Theory
Example 27.
Simplify 𝐴 ∪ (𝐵 ∩ 𝐴 ∩ 𝐶).
Answer.
For the bracketed term, we can use the commutative law to rearrange:
𝐵∩𝐴∩𝐶 =𝐴∩𝐵∩𝐶
Using the associative law, we can put brackets on the 𝐵 ∩ 𝐶 term and then call this as the set
𝐷 to get
𝐵 ∩ 𝐴 ∩ 𝐶 = 𝐴 ∩ (𝐵 ∩ 𝐶) = 𝐴 ∩ 𝐷.
Hence,
𝐴 ∪ (𝐵 ∩ 𝐴 ∩ 𝐶) = 𝐴 ∪ (𝐴 ∩ 𝐷).
Using the absorption laws,
𝐴 ∪ (𝐴 ∩ 𝐷) = 𝐴.
Thus,
𝐴 ∪ (𝐵 ∩ 𝐴 ∩ 𝐶) = 𝐴.
Example 28.
Simplify (𝐴 ∩ 𝐵 𝐶 ) ∪ (𝐴 ∩ 𝐵).
Answer.
(𝐴 ∩ 𝐵 𝐶 ) ∪ (𝐴 ∩ 𝐵) = 𝐴 ∩ (𝐵 𝐶 ∪ 𝐵) (Distributive law)
=𝐴∩ 𝒰 (Inverse law)
=𝐴 (Idempotent law)
Example 29.
Simplify (𝐴 ∩ 𝐵)𝐶 ∪ (𝐵 ∩ 𝐶).
Answer.
(𝐴 ∩ 𝐵)𝐶 ∪ (𝐵 ∩ 𝐶) = [(𝐴 ∩ 𝐵)𝐶 ∪ 𝐵] ∩ [(𝐴 ∩ 𝐵)𝐶 ∪ 𝐶] (Distributive law)
= [(𝐴𝐶 ∪ 𝐵 𝐶 ) ∪ 𝐵] ∩ [(𝐴 ∩ 𝐵)𝐶 ∪ 𝐶] (De Morgan’s law)
= [𝐴𝐶 ∪ (𝐵𝐶 ∪ 𝐵)] ∩ [(𝐴 ∩ 𝐵)𝐶 ∪ 𝐶] (Associative law)
= [𝐴𝐶 ∪ 𝒰 ] ∩ [(𝐴 ∩ 𝐵)𝐶 ∪ 𝐶] (Inverse Law)
= 𝒰 ∩ [(𝐴 ∩ 𝐵)𝐶 ∪ 𝐶] (Annihilation law)
= (𝐴 ∩ 𝐵)𝐶 ∪ 𝐶 (Identity law)