Skip to main content

Section 5.1 Sets and Operations on Sets

Beginning Activity Beginning Activity 1: Set Operations

Before beginning this section, it would be a good idea to review sets and set notation, including the roster method and set builder notation, in Section 2.3.

In Section 2.1, we used logical operators (conjunction, disjunction, negation) to form new statements from existing statements. In a similar manner, there are several ways to create new sets from sets that have already been defined. In fact, we will form these new sets using the logical operators of conjunction (and), disjunction (or), and negation (not). For example, if the universal set is the set of natural numbers N and

A={1,2,3,4,5,6} and B={1,3,5,7,9},
  • The set consisting of all natural numbers that are in A and are in B is the set {1,3,5};

  • The set consisting of all natural numbers that are in A or are in B is the set {1,2,3,4,5,6,7,9}; and

  • The set consisting of all natural numbers that are in A and are not in B is the set {2,4,6}.

These sets are examples of some of the most common set operations, which are given in the following definitions.

Definition.

Let A and B be subsets of some universal set U. The intersection of A and B, written AB and read “A intersect B,” is the set of all elements that are in both A and B. That is,

AB={xUxA and xB}.

The union of A and B, written AB and read “A union B,” is the set of all elements that are in A or in B. That is,

AB={xUxA or xB}.

Definition.

Let A and B be subsets of some universal set U. The set difference of A and B, or relative complement of B with respect to A, written AB and read “A minus B” or “the complement of B with respect to A,” is the set of all elements in A that are not in B. That is,

AB={xUxA and xB}.

The complement of the set A, written Ac and read “the complement of A,” is the set of all elements of U that are not in A. That is,

Ac={xUxA}.

For the rest of this beginning activity, the universal set is U={0,1,2,3,,10}, and we will use the following subsets of U:

A={0,1,2,3,9} and B={2,3,4,5,6}.

So in this case, AB={xUxA and xB}={2,3}. Use the roster method to specify each of the following subsets of U.

We can now use these sets to form even more sets. For example,

ABc={0,1,2,3,9}{0,1,7,8,9,10}={0,1,9}.

Use the roster method to specify each of the following subsets of U.

Beginning Activity Beginning Activity 2: Venn Diagrams for Two Sets

In Beginning Activity 1, we worked with verbal and symbolic definitions of set operations. However, it is also helpful to have a visual representation of sets. Venn diagrams are used to represent sets by circles (or some other closed geometric shape) drawn inside a rectangle. The points inside the rectangle represent the universal set U, and the elements of a set are represented by the points inside the circle that represents the set. For example, Figure 5.1 is a Venn diagram showing two sets.

Venn Diagram with two circles A and B inside the universal set U. A overlaps B creating 3 inner-circle regions. The leftmost is labelled 1, the center 2, and the right 3. The area outside the circles but in U is labelled 4.
Figure 5.1. Venn Diagram for Two Sets

In Figure 5.1, the elements of A are represented by the points inside the left circle, and the elements of B are represented by the points inside the right circle. The four distinct regions in the diagram are numbered for reference purposes only. (The numbers do not represent elements in a set.) The following table describes the four regions in the diagram.

Region Elements of U Set
1 In A and not in B AB
2 In A and in B AB
3 In B and not in A BA
4 Not in A and not in B AcBc
We can use these regions to represent other sets. For example, the set AB is represented by regions 1, 2, and 3 or the shaded region in Figure 5.2.
Venn Diagram with two circles A and B inside the universal set U. A overlaps B creating 3 inner-circle regions. The leftmost is labelled 1, the center 2, and the right 3. The area outside the circles but in U is labelled 4. Areas 1, 2, and 3 shaded.
Figure 5.2. Venn Diagram for AB

Let A and B be subsets of a universal set U. For each of the following, draw a Venn diagram for two sets and shade the region that represent the specified set. In addition, describe the set using set builder notation.

6.

(AB)(AB)

Subsection Set Equality, Subsets, and Proper Subsets

In Section 2.3, we introduced some basic definitions used in set theory, what it means to say that two sets are equal and what it means to say that one set is a subset of another set. See Definition. We need one more definition.

Definition.

Let A and B be two sets contained in some universal set U. The set A is a proper subset of B provided that AB and AB. When A is a proper subset of B, we write AB.

One reason for the definition of proper subset is that each set is a subset of itself. That is, If A is a set, then AA. However, sometimes we need to indicate that a set X is a subset of Y but XY. For example, if

X={1,2} and Y={0,1,2,3},

then XY. We know that XY since each element of X is an element of Y, but XY since 0Y and 0X. (Also, 3Y and 3X.) Notice that the notations AB and AB are used in a manner similar to inequality notation for numbers (a<b and ab).

It is often very important to be able to describe precisely what it means to say that one set is not a subset of the other. In the preceding example, Y is not a subset of X since there exists an element of Y (namely, 0) that is not in X.

In general, the subset relation is described with the use of a universal quantifier since AB means that for each element x of U, if xA, then xB. So when we negate this, we use an existential quantifier as follows:

AB means (xU)[(xA)(xB)]AB means ¬(xU)[(xA)(xB)](xU)¬[(xA)(xB)](xU)[(xA)(xB)].

So we see that AB means that there exists an x in U such that xA and xB.

Notice that if A=, then the conditional statement, “For each xU, if x, then xB” must be true since the hypothesis will always be false. Another way to look at this is to consider the following statement:

B means that there exists an x such that xB.
However, this statement must be false since there does not exist an x in . Since this is false, we must conclude that B. Although the facts that B and BB may not seem very important, we will use these facts later, and hence we summarize them in Theorem 5.3.

In Section 2.3, we also defined two sets to be equal when they have precisely the same elements. For example,

{xR|x2=4}={2,2}.

If the two sets A and B are equal, then it must be true that every element of A is an element of B, that is, AB, and it must be true that every element of B is an element of A, that is, BA. Conversely, if AB and BA, then A and B must have precisely the same elements. This gives us the following test for set equality:

Progress Check 5.5. Using Set Notation.

Let the universal set be U={1,2,3,4,5,6}, and let

A={1,2,4},B={1,2,3,5},C={xU|x22}.

In each of the following, fill in the blank with one or more of the symbols ,,=,,, or  so that the resulting statement is true. For each blank, include all symbols that result in a true statement. If none of these symbols makes a true statement, write nothing in the blank.

Subsection More about Venn Diagrams

In Beginning Activity 2, we learned how to use Venn diagrams as a visual representation for sets, set operations, and set relationships. In that activity, we restricted ourselves to using two sets. We can, of course, include more than two sets in a Venn diagram. Figure 5.6 shows a general Venn diagram for three sets (including a shaded region that corresponds to AC).

In this diagram, there are eight distinct regions, and each region has a unique reference number. For example, the set A is represented by the combination of regions 1, 2, 4, and 5, whereas the set C is represented by the combination of regions 4, 5, 6, and 7. This means that the set AC is represented by the combination of regions 4 and 5. This is shown as the shaded region in Figure 5.6.

A Venn diagram for three sets, A, B, and C. The intersection of A and C is shaded.
Figure 5.6. Venn Diagram for AC

Finally, Venn diagrams can also be used to illustrate special relationships between sets. For example, if AB, then the circle representing A should be completely contained in the circle for B. So if AB, and we know nothing about any relationship between the set C and the sets A and B, we could use the Venn diagram shown in Figure 5.7.

Venn Diagram with three circles A, B, and C. B and C overlap and A is completely inside B while overlapping C.
Figure 5.7. Venn Diagram Showing AB

Progress Check 5.8. Using Venn Diagrams.

Let A, B, and C be subsets of a universal set U.

(a)

For each of the following, draw a Venn diagram for three sets and shade the region(s) that represent the specified set.

(i)

(AB)C

Solution.

For the set (AB)C, region 5 is shaded.

(ii)

(AB)C

Solution.

For the set (AB)C, the regions 2, 4, 5, 6, 7 are shaded.

(iii)

(AcB)

Solution.

For the set (AcB), the regions 2, 3, 5, 6, 7, 8 are shaded.

(iv)

Ac(BC)

Solution.

For the set (Ac(BC)), the regions 3, 6, 7 are shaded.

(b)

Draw the most general Venn diagram showing B(AC).

(c)

Draw the most general Venn diagram showing A(BcC).

Subsection The Power Set of a Set

The symbol is used to describe a relationship between an element of the universal set and a subset of the universal set, and the symbol is used to describe a relationship between two subsets of the universal set. For example, the number 5 is an integer, and so it is appropriate to write 5Z. It is not appropriate, however, to write 5Z since 5 is not a set. It is important to distinguish between 5 and {5}. The difference is that 5 is an integer and {5} is a set consisting of one element. Consequently, it is appropriate to write {5}Z, but it is not appropriate to write {5}Z. The distinction between these two symbols (5 and {5}) is important when we discuss what is called the power set of a given set.

Definition.

If A is a subset of a universal set U, then the set whose members are all the subsets of A is called the power set of A. We denote the power set of A by P(A) . Symbolically, we write

P(A)={XUXA}.

That is, XP(A) if and only if XA.

When dealing with the power set of A, we must always remember that A and AA. For example, if A={a,b}, then the subsets of A are

(37),{a},{b},{a,b}.

We can write this as

P(A)={,{a},{b},{a,b}}.

Now let B={a,b,c}. Notice that B=A{c}. We can determine the subsets of B by starting with the subsets of A in (37). We can form the other subsets of B by taking the union of each set in (37) with the set {c}. This gives us the following subsets of B.

(38){c},{a,c},{b,c},{a,b,c}.

So the subsets of B are those sets in (37) combined with those sets in (38). That is, the subsets of B are

(39),{a},{b},{a,b},{c},{a,c},{b,c},{a,b,c},

which means that

P(B)={,{a},{b},{a,b},{c},{a,c},{b,c},{a,b,c}}.

Notice that we could write

{a,c}B or that {a,c}P(B).

Also, notice that A has two elements and A has four subsets, and B has three elements and B has eight subsets. Now, let n be a nonnegative integer. The following result can be proved using mathematical induction. (See Activity 29.)

Subsection The Cardinality of a Finite Set

In our discussion of the power set, we were concerned with the number of elements in a set. In fact, the number of elements in a finite set is a distinguishing characteristic of the set, so we give it the following name.

Definition.

The number of elements in a finite set A is called the cardinality of A and is denoted by card(A).

For example, card()=0; card({a,b})=2; card(P({a,b}))=4.

Theoretical Note.

There is a mathematical way to distinguish between finite and infinite sets, and there is a way to define the cardinality of an infinite set. We will not concern ourselves with this at this time. More about the cardinality of finite and infinite sets is discussed in Chapter 9.

Subsection Standard Number Systems

We can use set notation to specify and help describe our standard number systems. The starting point is the set of natural numbers, for which we use the roster method.

N={1,2,3,4,}

The integers consist of the natural numbers, the negatives of the natural numbers, and zero. If we let N={,4,3,2,1}, then we can use set union and write

Z=N{0}N.

So we see that NZ, and in fact, NZ.

We need to use set builder notation for the set Q of all rational numbers, which consists of quotients of integers.

Q={mn|m,nZ and n0}

Since any integer n can be written as n=n1, we see that ZQ.

We do not yet have the tools to give a complete description of the real numbers. We will simply say that the real numbers consist of the rational numbers and the irrational numbers. In effect, the irrational numbers are the complement of the set of rational numbers Q in R. So we can use the notation Qc={xRxQ} and write

R=QQc and QQc=.

A number system that we have not yet discussed is the set of complex numbers. The complex numbers, C, consist of all numbers of the form a+bi, where a,bR and i=1 (or i2=1). That is,

C={a+bi|a,bR and i=1}.

We can add and multiply complex numbers as follows: If a,b,c,dR, then

(a+bi)+(c+di)=(a+c)+(b+d)i, and (a+bi)(c+di)=ac+adi+bci+bdi2=(acbd)+(ad+bc)i.

Exercises Exercises

1.

Assume the universal set is the set of real numbers. Let

A={3,2,2,3},B={xR|x2=4 or x2=9},C={xR|x2+2=0},D={xR|x>0}.

Respond to each of the following questions. In each case, explain your answer.

(b)

Is the set A a subset of the set B?

Answer.

AB

(c)

Is the set C equal to the set D?

Answer.

CD

(d)

Is the set C a subset of the set D?

Answer.

CD

(e)

Is the set A a subset of the set D?

Answer.

AD

2.

Explain why

(a)

the set {a,b} is equal to the set {b,a}.

Answer.

The two sets have precisely the same elements.

(b)

the set {a,b,b,a,c} is equal to the set {b,c,a}.

Answer.

The two sets have precisely the same elements.

3.

Assume that the universal set is the set of integers. Let

A={3,2,2,3},B={xZ|x29},C={xZ|x3},D={1,2,3,4}.

In each of the following, fill in the blank with one or more of the symbols , , , = , , ,  or  so that the resulting statement is true. For each blank, include all symbols that result in a true statement. If none of these symbols makes a true statement, write nothing in the blank.

4.

Write all of the proper subset relations that are possible using the sets of numbers N, Z, Q, and R.

Answer.
NZNQNRZQZRQR

5.

For each statement, write a brief, clear explanation of why the statement is true or why it is false.

(a)

The set {a,b} is a subset of {a,c,d,e}.

Answer.

The set {a,b} is a not a subset of {a,c,d,e} since b{a,b} and b{a,c,d,e}.

(b)

The set {2,0,2} is equal to {xZx is even and x2<5}.

Answer.

{2,0,2}={xZx is even and x2<5} since both sets have precisely the same elements.

(c)

The empty set is a subset of {1}.

Answer.

{1} since the following statement is true: For every xU, if x, then x{1}.

(d)

If A={a,b}, then the set {a} is a subset of P(A).

Answer.

The statement is false. The set {a} is an element of P(A).

6.

Use the definitions of set intersection, set union, and set difference to write useful negations of these definitions. That is, complete each of the following sentences

(a)

xAB if and only if .

Answer.

xAB if and only if xA or xB.

(b)

xAB if and only if .

(c)

xAB if and only if .

7.

Let U={1,2,3,4,5,6,7,8,9,10}, and let

A={3,4,5,6,7},B={1,5,7,9},C={3,6,9},D={2,4,6,8}.

Use the roster method to list all of the elements of each of the following sets.

(h)

(AC)(BC)

Answer.

(AC)(BC)={3,6,9}

(m)

(AD)(BD)

Answer.

(AD)(BD)={1,3,5,7,9}

8.

Let U=N, and let

A={xNx7},B={xNx is odd },C={xNx is a multiple of 3 },D={xNx is even }.

Use the roster method to list all of the elements of each of the following sets.

(f)

(AC)(BC)

(k)

(AD)(BD)

9.

Let P, Q, R, and S be subsets of a universal set U. Assume that (PQ)(RS).

(a)

Complete the following sentence:

For each xU, if x(PQ), then .

(b)

Write a useful negation of the statement in Task 9.a.

Answer.

There exists an xU such that x(PQ) and x(RS). This can be written as, There exists an xU such that xP, xQ, and xR or xS.

10.

Let U be the universal set. Consider the following statement:

For all A and B that are subsets of U, if AB, then BcAc.

(a)

Identify three conditional statements in the given statement.

Answer.

The given statement is a conditional statement. We can rewrite the subset relations in terms of conditional sentences: AB means, “For all xU, if xA, then xB,” and BcAc means, “For all xU, if xBc, then xAc.

(b)

Write the contrapositive of this statement.

(c)

Write the negation of this statement.

11.

Let A, B, and C be subsets of some universal set U. Draw a Venn diagram for each of the following situations.

(c)

AB,BA,CA, and CB

(d)

AB,CB, and AC=

12.

Let A, B, and C be subsets of some universal set U. For each of the following, draw a general Venn diagram for the three sets and then shade the indicated region.

(c)

(AB)(AC)

13.

We can extend the idea of consecutive integers (See Exercise 10 in Section 3.5) to represent four consecutive integers as m, m+1, m+2, and m+3, where m is an integer. There are other ways to represent four consecutive integers. For example, if kZ, then k1, k, k+1, and k+2 are four consecutive integers.

(a)

Prove that for each nZ, n is the sum of four consecutive integers if and only if n2(mod4).

(b)

Use set builder notation or the roster method to specify the set of integers that are the sum of four consecutive integers.

(c)

Specify the set of all natural numbers that can be written as the sum of four consecutive natural numbers.

(d)

Prove that for each nZ, n is the sum of eight consecutive integers if and only if n4(mod8).

(e)

Use set builder notation or the roster method to specify the set of integers that are the sum of eight consecutive integers.

(f)

Specify the set of all natural numbers can be written as the sum of eight consecutive natural numbers.

14.

One of the properties of real numbers is the so-called Law of Trichotomy, which states that if a,bR, then exactly one of the following is true:

  • a<b;

  • a=b;

  • a>b.

Is the following proposition concerning sets true or false? Either provide a proof that it is true or a counterexample showing it is false. If A and B are subsets of some universal set, then exactly one of the following is true:

  • AB;

  • A=B;

  • BA.

Activity 27. Intervals of Real Numbers.

In previous mathematics courses, we have frequently used subsets of the real numbers called intervals. There are some common names and notations for intervals. These are given in the following table, where it is assumed that a and b are real numbers and a<b.

Interval
Notation
Set Notation Name
(a,b)= {xR|a<x<b} Open interval from a to b
[a,b]= {xR|axb} Closed interval from a to b
[a,b)= {xR|ax<b} Half-open interval
(a,b]= {xR|a<xb} Half-open interval
(a,+)= {xR|x>a} Open ray
(,b)= {xR|x<b} Open ray
[a,+)= {xR|xa} Closed ray
(,b]= {xR|xb} Closed ray
(a)

Is (a,b) a proper subset of (a,b]? Explain.

(b)

Is [a,b] a subset of (a,+)? Explain.

(c)

Use interval notation to describe

(i)

the intersection of the interval [3,7] with the interval (5,9];

(ii)

the union of the interval [3,7] with the interval (5,9];

(iii)

the set difference [3,7](5,9].

(d)

Write the set {xR|x|0.01} using interval notation.

(e)

Write the set {xR|x|>2} as the union of two intervals.

Activity 28. More Work with Intervals.

For this exercise, use the interval notation described in Activity 27.

(a)

Determine the intersection and union of [2,5] and [1,+).

(b)

Determine the intersection and union of [2,5] and [3.4,+).

(c)

Determine the intersection and union of [2,5] and [7,+).

(d)

Now let a, b, and c be real numbers with a<b.

Explain why the intersection of [a,b] and [c,+) is either a closed interval, a set with one element, or the empty set.

(e)

Explain why the union of [a,b] and [c,+) is either a closed ray or the union of a closed interval and a closed ray.

Activity 29. Proof of Theorem 5.9.

To help with the proof by induction of Theorem 5.9, we first prove the following lemma. (The idea for the proof of this lemma was illustrated with the discussion of power set after Definition.)

Proof.

Let A and B be subsets of some universal set, and assume that A=B{x} where xB. Let Y be a subset of A. We need to show that Y is a subset of B or that Y=C{x}, where C is some subset of B. There are two cases to consider: (1) x is not an element of Y, and (2) x is an element of Y.

Case 1: Assume that xY. Let yY. Then yA and yx. Since

A=B{x},

this means that y must be in B. Therefore, YB.

Case 2: Assume that xY. In this case, let C=Y{x}. Then every element of C is an element of B. Hence, we can conclude that CB and that Y=C{x}.

Cases (1) and (2) show that if YA, then YB or Y=C{x}, where CB.

To begin the induction proof of Theorem 5.9, for each nonnegative integer n, we let P(n) be, “If a finite set has exactly n elements, then that set has exactly 2n subsets.”

(a)

Verify that P(0) is true. (This is the basis step for the induction proof.)

(b)

Verify that P(1) and P(2) are true.

(c)

Now assume that k is a nonnegative integer and assume that P(k) is true. That is, assume that if a set has k elements, then that set has 2k subsets. (This is the inductive assumption for the induction proof.) Let T be a subset of the universal set with card(T)=k+1, and let xT. Then the set B=T{x} has k elements. Now use the inductive assumption to determine how many subsets B has. Then use Lemma 5.10 to prove that T has twice as many subsets as B. This should help complete the inductive step for the induction proof.