Chapter 5 Sets

# 5.4 Set Operations with Two Sets

Learning Objectives

By the end of this section, you will be able to:

• Determine the intersection of two sets
• Determine the union of two sets
• Determine the cardinality of the union of two sets
• Apply the concepts of AND and OR to set operations
• Draw conclusions from Venn diagrams with two sets

The movie Yours, Mine, and Ours was originally released in 1968 and starred Lucille Ball and Henry Fonda. This movie, which is loosely based on a true story, is about the marriage of Helen, a widow with eight children, and Frank, a widower with ten children, who then have an additional child together. The movie is a comedy that plays on the interpersonal and organizational struggles of feeding, bathing, and clothing twenty-one people in one household.

If we consider the set of Helen’s children and the set of Frank’s children, then the child they had together is the intersection of these two sets, and the collection of all their children combined is the union of these two sets. In this section, we will explore the operations of union and intersection as they relate to two sets.

# The Intersection of Two Sets

The members that the two sets share in common are included in the intersection of two sets. To be in the intersection of two sets, an element must be in both the first set and the second set. In this way, the intersection of two sets is a logical AND statement. Symbolically, $A$ intersection $B$ is written as $A\cap B$. $A$ intersection $B$ is written in set builder notation as $A\cap B=\{x|x\in A \text{ and } x\in B\}.$

Let us look at Helen’s and Frank’s children from the movie Yours, Mine, and Ours. Helen’s children consist of the set

$\textit {H }\text{={Colleen, Nick, Janette, Tommy, Jean, Phillip, Gerald, Theresa, Joseph}}$

and Frank’s children are included in the set

$\textit {F }\text{={Mike, Rusty, Greg, Rosemary, Loise, Susan, Veronica, Mary, Germaine, Joan, Joseph}}$.

$H$ intersection $F$ is the set of children they had together.

$H\cap F = \text{{Joseph}}$, because Joseph is in both set $A$ and set $B$.

Example 1

Finding the Intersection of Set $A$ and Set $B$

Set $A=\{1, 3, 5, 7, 9\}$and set $B=\{3, 5, 7\}$ Find $A \cap B$.

The intersection of sets $A$ and $B$ include the elements that set $A$ and $B$ have in common: $3, 5,$ and $7$.

$A\cap B =\{3, 5, 7\}$

Exercise 1

Set $A=\{m, a, r, d, i\}$ and set $B=\{g, r, a, s\}$. Find $A\cap B$.

Solution

$A\cap B=\{a, r\}$

Notice that if sets $A$ and $B$ are disjoint sets, then they do not share any elements in common, and $A$ intersection $B$ is the empty set, as shown in the Venn diagram below.

Example 2

Set $A=\{0, 2, 4, 6, 8\}$ and set $B=\{1, 3, 5, 7, 9\}$. Find $A \cap B$.

Because sets $A$ and $B$ are disjoint, they do not share any elements in common. So the intersection of set $A$ and set $B$ is the empty set. $A \cap B = \emptyset$

Exercise 2

Set $A=\text {{red, yellow, blue}}$ and set $B=\text{{purple, green, gold}}$. Find $A\cap B$.

Solution

$A\cap B=\{ \text{ }\}$

Notice that if set $A$ is a subset of set $B$, then $A$ intersection $B$ is equal to set $A$, as shown in the Venn diagram below.

Example 3

Set $A=\{1, 3, 5...\}$ and set $B=\mathbb{N} =\{1, 2, 3....\}$. Find $A\cap B$.

Because set $A$ is a subset of set $B$, $A$ intersection $B$ is equal to set $A$.

$A\cap B=A=\{1, 3, 5, ....\}$, the set of odd natural numbers.

Exercise 3

Set $A=\{a, b, c, ..., z\}$ and set $B=\{a, e, i, o, u\}$. Find $A \cap B$.

Solution

$A\cap B=B=\{a, e, i, o, u\}$

# The Union of Two Sets

Like the union of two families in marriage, the union of two sets includes all the members of the first set and all the members of the second set. To be in the union of two sets, an element must be in the first set, the second set, or both. In this way, the union of two sets is a logical inclusive OR statement. Symbolically, $A$ union $B$ is written as $A \cup B$. $A$ union $B$ is written in set builder notation as $A\cup B=\{x|x \in A \text{ or } x \in B\}$.

Let us consider the sets of Helen’s and Frank’s children from the movie Yours, Mine, and Ours again. Helen’s children consist of the set $\textit{H }\text{={Colleen, Nick, Janette, Tommy, Jean, Phillip, Gerald, Theresa, Joseph}}$

and Frank’s children are included in the set $\textit {F }\text{={Mike, Rusty, Greg, Rosemary, Loise, Susan, Veronica, Mary, Germaine, Joan, Joseph}}$.

The union of these two sets is the collection of all nineteen of their children,

$H\cup F = \text{{Colleen, Nick, Janette, Tommy, Jean, Phillip, Gerald, Theresa, Joseph, Mike, Rusty, Greg, Rosemary, Loise, Susan, Veronica, Mary, Germaine, Joan }}$

Notice, Joseph is in both set $H$ and set $F$, but he is only one child, so he is only listed once in the union.

Example  4

Set $A=\{1, 3, 5, 7, 9\}$ and set $B=\{2, 3, 5, 7\}$. Find $A \cup B$.

$A$ union $B$ is the set formed by including all the unique elements in set $A$, set $B$, or both sets $A$ and $B$: $A \cup B=\{1, 3, 5, 7, 9, 2\}$.
The first five elements of the union are the five unique elements in set $A$. Even though $3, 5,$ and $7$ are also members of set $B$, these elements are only listed one time. Lastly, set $B$ includes the unique element $2$, so $2$ is also included as part of the union of sets $A$ and $B$.

Exercise 4

Set $A=\{m, a, r, d, i\}$ and set $B=\{g, r, a, s\}$. Find $A\cup B$.

Solution

$A\cup B=\{a, d, g, i, m, r, s\}$

When observing the union of sets $A$ and $B$, notice that both set $A$ and set $B$ are subsets of $A$ union $B$. Graphically, $A$ union $B$ can be represented in several different ways depending on the members that they have in common. If $A$ and $B$ are disjoint sets, then $A$ union $B$ would be represented with two disjoint circles within the universal set, as shown in the Venn diagram below.

If sets $A$ and $B$ share some but not all members in common, then the Venn diagram is drawn as two separate circles that overlap.

If every member of set $A$ is also a member of set $B$, then $A$ is a subset of set $B$, and $A$ union $B$ would be equal to set $B$. To draw the Venn diagram, the circle representing set $A$ should be completely enclosed in the circle containing set $B$.

Example 5

Set $A=\{0, 2, 4, 6, 8\}$ and set $B=\{1, 3, 5, 7, 9\}$. Find $A \cup B$.

Because sets $A$ and $B$ are disjoint, the union is simply the set containing all the elements in both set $A$ and set $B$.

$A \cup B=\{0, 1, 2, 3, 4, 5, 6, 7, 8, 9\}$.

Exercise 5

Set $A=\text {{red, yellow, blue}}$ and set $B=\text{{purple, green, gold}}$. Find $A\cup B$.

Solution

$A\cup B=\text{{red, yellow, blue, purple, green, gold}}$

Example 6

Set $A=\{1, 3, 5,...\}$ and set $B=\mathbb{N} =\{1, 2, 3....\}$. Find $A\cup B$.

Because set $A$ is a subset of set $B$, $A$ union $B$ is equal to set $B$.

$A\cup B=\mathbb{N} =\{1, 2, 3....\}=B$

Exercise 6

Set $A=\{a, b, c, ..., z\}$ and set $B=\{a, e, i, o, u\}$. Find $A \cup B$.

Solution

$A\cup B=\{a, b, c,...,z\}=A$

Determining the Cardinality of Two Sets
The cardinality of the union of two sets is the total number of elements in the union of the two sets. Symbolically, the cardinality of $A$ union $B$ is written $n(A \cup B)$. If two sets $A$ and $B$ are disjoint, the cardinality of $A$ union $B$ is the sum of the cardinality of set $A$ and the cardinality of set $B$. If the two sets intersect, then $A$ intersection $B$ is a subset of both set $A$ and set $B$. This means that if we add the cardinality of set $A$ and set $B$, we will have added the number of elements in $A$ intersection $B$ twice, so we must then subtract it once as shown in the formula that follows.

The cardinality of $A$ union $B$ is found by adding the number of elements in set $A$ to the number of elements in set $B$, then subtracting the number of elements in the intersection of set $A$ and set $B$.

$n(A \cup B)=n(A)+n(B)-n(A \cap B)$

or

$n(A \text{ or } B)=n(A)+n(B)-n(A \text{ and } B)$.

If sets $A$ and $B$ are disjoint, then $n(A \cap B)=n(A\text{ and }B) =0$ and the formula is still valid but simplifies to $n(A\cup B)=n(A)+n(B).$

Example 7

The number of elements in set $A$ is 10, the number of elements in set $B$ is 20, and the number of elements in $A$ intersection $B$ is 4. Find the number of elements in $A$ union $B$.

Using the formula for determining the cardinality of the union of two sets, we can say $n(A \cup B)=n(A)+n(B)-n(A \cap B)=10+20-4=26$

Exercise 7

If $n(A)=23, n(B)=17$, and $n(A \cap B)=7,$ then find $n(A \cup B).$

Solution

$33$

Example 8

If $A$ and $B$ are disjoint sets and the cardinality of set $A$ is 37 and the cardinality of set $B$ is 43, find the cardinality of $A$ union $B$.

To find the cardinality of $A$ union $B$, apply the formula $n(A \cup B)=n(A)+n(B)-n(A \cap B)$.

Because sets $A$ and $B$ are disjoint, $A \cap B$ is the empty set; therefore, $n(A \cap B)=n(\emptyset )=0$ and $n(A \cup B)=37+43-0=80$.

Exercise 8

If $A \cap B = \emptyset, n(A)=35,$ and $n(B)=78,$ then find $n(A \cup B).$

Solution

$113$

# Applying Concepts of “AND” and “OR” to Set Operations

For an “AND” statement to be true, both conditions that make up the statement must be true. Similarly, the intersection of two sets $A$ and $B$ is the set of elements that are in both set $A$ and set $B$. To be a member of $A$ intersection $B$, an element must be in set $A$ and also must be in set $B$. The intersection of two sets corresponds to a logical “AND” statement.

The union of two sets is a logical inclusive “OR” statement. Say you are at a birthday party and the host offers Leah, Lenny, Maya, and you some cake or ice cream for dessert. Leah asks for cake, Lenny accepts both cake and ice cream, Maya turns down both, and you choose only ice cream. Leah, Lenny, and you are all having dessert.

The “OR” statement is true if at least one of the components is true. Maya is the only one who did not have cake or ice cream; therefore, she did not have dessert, and the “OR” statement is false. To be in the union of two sets $A$ and $B$, an element must be in set $A$ or set $B$ or both set $A$ and set $B$.

Example 9

$A=\{0, 3, 6, 9, 12\}, B=\{0, 4, 8, 12, 16\},$ and $C=\{1, 2, 3, 5, 8, 13\}.$
Find the set consisting of elements in:

a) $A$ and $B$

$A \text{ and } B=A \cap B =\{0, 12\}$, because only the elements $0$ and $12$ are members of both set $A$ and set $B$.

b) $A$ or $B$

$A \text{ or }B=A \cup B=\{0, 3, 4, 6, 8, 9, 12, 16\}$, because the set $A$ or $B$ is the collection of all elements in set $A$ or set $B$ or both.

c) $A$ or $C$

$A \text{ or } C=A\cup C=\{0, 1, 2, 3, 5, 6, 8, 9, 12, 13\}$ because the set $A$ or $C$ is the collection of all elements in set $A$ or set $C$ or both.

d) $(B \text{ and } C)$ or $A$.

$(B \text{ and }C )\text{ or } A=(B\cap C)\cup A$. Parentheses are evaluated first: the only member that both set $B$ and set $C$ share in common is $8$. So now we need to find $\{8\}$ or $\{0, 3, 6, 9, 12\}$, Because the word “or” translates to the union operation, the problem becomes $\{8\} \cup \{0, 3, 6, 9, 12\}$, which is equal to $\{0, 3, 6, 8, 9, 12\}$.

Exercise 9

$A=\{h, a, p, y\}$ and $B=\{a, w, e, s, o, m\}$, and $C=\{m, a, t, h\}$.

Find the set consisting of elements in:

a) $A$ or $B$

b) $A$ and $C$

c) $B$ or $C$

d) $(A \text{ and } C) \text{ and } B$.

Solution

a) $A \text { or } B=A\cup B = \{h, a, p, y, w, e, s, o, m\}$.

b) $A \text{ and } C=A \cap C=\{a, h\}.$

c) $B \text { or }C=B\cup C=\{a, w, e, s, o, m, t, h\}.$

d) $(A \text{ and }C) \text{ and }B=(A \cap C)\cap B=\{a, h\} \cap \{a, w, e, s, o, m\}=\{a\}$.

Example 10

Determine and apply the appropriate set operations to solve the problem.

Don Woods is serving cake and ice cream at his Juneteenth celebration. The party has a total of $54$ guests in attendance. Suppose $30$ guests requested cake, $20$ guests asked for ice cream, and $12$ guests did not have either cake or ice cream.

a) How many guests had cake or ice cream?

The total number of people at the party is $54$, and $12$ people did not have cake or ice cream. Recall that the total number of elements in the universal set is always equal to the number of elements in a subset plus the number of elements in the complement of the set, $n(U)=n(A)+n(A')$.

That means $54=n(\text { cake or ice cream }+n(\text{ not(cake or ice cream)})$,

or equivalently, $n(\text{cake} \cup \text{ice cream})=54-n(\text{(cake} \cup \text{ice cream)'})=54-12=42$.

A total of $42$ people at the party had cake or ice cream.

b) How many guests had cake and ice cream?

To determine the number of people who had both cake and ice cream, we need to find the intersection of the set of people who had cake and the set of people who had ice cream. From Question 1, the number of people who had cake or ice cream is $42$. This is the union of the two sets. The formula for the union of two sets is $n(A \cup B)=n(A)+n(B) -n(A \cap B)$.

Use the information given in the problem and substitute the known values into the formula to solve for the number of people in the intersection: $42=30+20-n(A \cap B)$.

Adding 30 and 20, the equation simplifies to $42=50-n(\text{cake and ice cream})$.

Which means $n(\text{ cake and ice cream })=50-42=8$.

Exercise 10

Ravi and Priya are serving shrimp bisque and salad along with the main course at their wedding reception. The reception will have a total of $150$ guests in attendance. A total of $92$ shrimp bisques and $85$ salads were ordered, while $23$ guests did not order any shrimp bisque or salad.

Solution

a) $127$

b) $50$

# Drawing Conclusions from a Venn Diagram with Two Sets

All Venn diagrams will display the relationships between the sets, such as subset, intersecting, and/or disjoint. In addition to displaying the relationship between the two sets, there are two main additional details that Venn diagrams can include: the individual members of the sets or the cardinality of each disjoint subset of the universal set.
A Venn diagram with two subsets will partition the universal set into 3 or 4 sections depending on whether they are disjoint or intersecting sets. Recall that the complement of set $A$, written $A'$ is the set of all elements in the universal set that are not in set $A$.

Example 11

a) Find $A \cup B$.

$A\cup B=\{1, 2, 3, 4, 5, 6, 7, 8\}$, because $A$ union $B$ is the collection of all elements in set $A$ or set $B$ or both.

b) Find $A \cap B$.

Because $A$ and $B$ are disjoint sets, there are no elements that are in both $A$ and $B$. Therefore, $A$ intersection $B$ is the empty set, $\emptyset$.

c) Find $B'$.

The complement of set $B$ is the set of all elements in the universal set that are not in set $B$: $B'=\{0, 1, 3, 5, 7, 9\}$.

d) Find $n(B')$.

The cardinality, or number of elements, in set $B'$ is $n(B')=6$.

Exercise 11

a) Find $A \cap B$.

b) Find $A \cup B$.

c) Find $A \cap B'$.

d) Find $n(A \cap B')$.

Solution

a) $A \cap B=\{3, 5, 7\}$.

b) $A \cup B=\{1, 2, 3, 5, 7, 9\}$.

c) $A \cap B'=\{1, 9\}$.

d) $n(A \cap B')=2$.

Example 12

Using a Venn Diagram to Draw Conclusions about Set Cardinality

a) Find $n(A \text{ or } B)$.

The number of elements in $A$ or $B$ is the number of elements in $A$ union $B$: $n(A \cup B)=n(\{2, 5, 7\})=14$.

b) Find $n(A \text{ and } B)$.

The number of elements in $A$ and $B$ is the number of elements in $A$ intersection $B$: $n(A \cap B)=5$.

c) Find $n(A)$.

The number of elements in set $A$ is the sum of all the numbers enclosed in the circle representing set $A$: $n(A)=n(\{7, 5\})=12$.

Exercise 12

a) Find $n(A \text{ or } B)$.

b) Find $n(A \text{ and } B)$.

c) Find $n(A)$.

Solution

a) $40$

b) $0$

c) $23$