Page 148 - Discrete Mathematics and Its Applications
P. 148
2.2 Set Operations 127
2.2 Set Operations
Introduction
Two, or more, sets can be combined in many different ways. For instance, starting with the set
of mathematics majors at your school and the set of computer science majors at your school, we
can form the set of students who are mathematics majors or computer science majors, the set of
students who are joint majors in mathematics and computer science, the set of all students not
majoring in mathematics, and so on.
DEFINITION 1 Let A and B be sets. The union of the sets A and B, denoted by A ∪ B, is the set that contains
those elements that are either in A or in B, or in both.
An element x belongs to the union of the sets A and B if and only if x belongs to A or x belongs
to B. This tells us that
A ∪ B ={x | x ∈ A ∨ x ∈ B}.
The Venn diagram shown in Figure 1 represents the union of two sets A and B. The area
that represents A ∪ B is the shaded area within either the circle representing A or the circle
representing B.
We will give some examples of the union of sets.
EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is,
{1, 3, 5}∪{1, 2, 3}={1, 2, 3, 5}. ▲
EXAMPLE 2 The union of the set of all computer science majors at your school and the set of all mathe-
matics majors at your school is the set of students at your school who are majoring either in
mathematics or in computer science (or in both). ▲
DEFINITION 2 Let A and B be sets. The intersection of the sets A and B, denoted by A ∩ B, is the set
containing those elements in both A and B.
An element x belongs to the intersection of the sets A and B if and only if x belongs to A and
x belongs to B. This tells us that
A ∩ B ={x | x ∈ A ∧ x ∈ B}.
U U
A B A B
A B is shaded. A B is shaded.
FIGURE 1 Venn Diagram of the FIGURE 2 Venn Diagram of the
Union of A and B. Intersection of A and B.