1.1.1: Set Theory

Learning Objectives

  • Define sets, subsets, universal set, empty set, and infinite sets
  • Determine subsets of a set
  • Determine subsets, and complement of a set
  • Apply the set operations union, intersection, and complements of sets
  • Use Venn diagrams to illustrate set operations

KEY words

  • Subset: A set containing elements of another set
  • Empty set: a set containing no elements
  • Universal set: a set containing all elements we are interested in
  • Infinite set: a set that contains an infinite number of elements
  • Complement: the complement of a set is all elements in the universal set that are not in the original set
  • Variable: a letter that is used as a stand-in to represent any element

In mathematics, it is helpful to consider where numbers come from and how they interact with each other. To look at collections of different numbers, we will first define sets.

Sets

An art collector owns a collection of paintings, while a music lover might keep a collection of CDs. Any collection of items can form a set.

Set

A set is a collection of distinct objects, called elements of the set.

A set can be defined by describing the contents, or by listing the elements of the set, enclosed in braces and separated by commas.

It is common to name a set, to make it easier to refer to that set later. Capital letters are often used for this purpose. Sets can have a finite number of elements or an infinite number of elements and are referred to as finite or infinite sets. A set simply specifies the contents; order is not important. The set represented by {1, 2, 3} is equivalent to the set {3, 1, 2}.

Example

Some examples of sets defined by describing the contents:

  1. C=the set of all books written about travel to ChileC=the set of all books written about travel to Chile. This is a finite set.
  2. Z=the set of all integersZ=the set of all integers. This is an infinite set.

Some examples of sets defined by listing the elements of the set:

  1. A={1,3,9,12}A={1,3,9,12}.This is a finite set.
  2. R={red, orange, yellow, green, blue, indigo, purple}R={red, orange, yellow, green, blue, indigo, purple}. This is a finite set.

Notation

The symbol means “is an element of”.

A set that contains no elements, {}{}, is called the empty set and is notated .

Example

Let A={1,2,3,4}A={1,2,3,4}

To say that 2 is an element of the set, we write 2A2A.

Sometimes a collection might not contain all the elements of a set. For example, Chris owns three Madonna albums. While Chris’s collection is a set, we can also say it is a subset of the larger set of all Madonna albums.

Subset

A subset of a set AA is another set that contains only elements from the set AA. A subset may contain some elements of set AA, no elements of set AA (i.e. the empty set, ) or all elements of set AA (i.e. AA).

If set BB is a subset of set AA, we write BABA.

A proper subset is a subset that is not identical to the original set—it contains fewer elements.

If set BB is a proper subset of set AA, we write BABA.

The bottom bar in the subset notation  represents the equality sign, meaning the whole set is a subset of itself. Notice that the proper subset notation  does not have that equals bar so does not include the whole set as a subset of itself.

Example

Consider these three sets:

A=the set of all even numbersA=the set of all even numbers
B={2,4,6}B={2,4,6}
C={2,3,4,6}C={2,3,4,6}

Here BABA since every element of BB is an even number, so is an element of AA.

More formally, we could say BABA since if xBxB, then xAxA.

It is also true that BCBC because every element of BB is an element of CC.

CC is NOT a subset of AA, since CC contains an element, 3, that is not contained in AA.

Example

Suppose a set contains the plays “Much Ado About Nothing,” “MacBeth,” and “A Midsummer’s Night Dream.” What is a larger set this might be a subset of?

There are many possible answers here. One would be the set of plays by Shakespeare. This is also a subset of the set of all plays ever written. It is also a subset of all British literature.

Universal Set

Universal Set

A universal set is a set that contains all the elements we are interested in. This is defined by context.

Example

  1. If we are discussing searching for books, the universal set might be all the books in the library.
  2. If we are grouping our Facebook friends, the universal set would be all of our Facebook friends.
  3. If we are working with sets of numbers, the universal set might be all whole numbers, all integers, or all real numbers.

Union, Intersection, and Complement

It is common for sets to interact. For example, you and a new roommate decide to have a house party, and you both invite your circle of friends. At this party, two sets are being combined, though it might turn out that there are some friends that are in both sets.

Union, Intersection, and Complement

The union of two sets contains all the elements contained in either set. The union is notated ABAB. More formally, xABxAB if xAxA or xBxB.

The intersection of two sets contains only the elements that are in both sets. The intersection is notated ABABMore formally, xABifxAandxBxABifxAandxB.

The complement of a set AA contains everything that is not in the set AA. The complement is notated AA, or AcAc. A complement is relative to the universal set, so AA contains all the elements in the universal set that are not in AA.

Notice that we used a letter, xx, to represent any element in a set. This letter is called a variable and is just a stand-in for any element in a given set.

Example

Suppose the universal set is UU = all whole numbers from 1 to 9. i.e. U={1,2,3,4,5,6,7,8,9}U={1,2,3,4,5,6,7,8,9}

If A={1,2,4}A={1,2,4}, then A={3,5,6,7,8,9}A={3,5,6,7,8,9}.

Example

Consider the sets:

A={red, green, blue}A={red, green, blue}
B={red, yellow, orange}B={red, yellow, orange}
C={red, orange, yellow, green, blue, purple}C={red, orange, yellow, green, blue, purple}

Find the following:

  1. Find ABAB
  2. Find ABAB
  3. Find ACAC

Answers

  1. The union contains all the elements in either set: AB={red, green, blue, yellow, orange}AB={red, green, blue, yellow, orange}. Notice we only list red once.
  2. The intersection contains all the elements in both sets: AB={red}AB={red}. Red is the only color in both sets.
  3. Here we’re looking for all the elements that are not in set AA but are in set CC:  AC={orange, yellow, purple}AC={orange, yellow, purple}

Try It

Using the sets from the previous example, find ACAC and BABA

Set operations can be grouped together using grouping symbols to force an order of operations, just like in arithmetic. Parentheses are used to tell us which operation to perform first.

Example

Suppose H={cat, dog, rabbit, mouse}H={cat, dog, rabbit, mouse}, F={dog, cow, duck, pig, rabbit}F={dog, cow, duck, pig, rabbit}, and W={duck, rabbit, deer, frog, mouse}W={duck, rabbit, deer, frog, mouse}.

  1. Find (HF)W(HF)W
  2. Find H(FW)H(FW)
  3. Find (HF)W(HF)W

Solutions

  1. We start with the intersection since it is in parentheses: (HF)={dog, rabbit}(HF)={dog, rabbit}. Now we union that result with WW:  (HF)W={dog, duck, rabbit, deer, frog, mouse}(HF)W={dog, duck, rabbit, deer, frog, mouse}.
  2. We start with the union inside parentheses: (FW)={dog, cow, duck, pig, rabbit, deer, frog, mouse}(FW)={dog, cow, duck, pig, rabbit, deer, frog, mouse} . Now we intersect that result with HH: H(FW)={dog, rabbit, mouse}H(FW)={dog, rabbit, mouse}.
  3. We start with the intersection inside parentheses: (HF)={dog, rabbit}(HF)={dog, rabbit}. Now we want to find the elements of WW that are not in (HF)(HF).  (HF)W={duck, deer, frog, mouse}(HF)W={duck, deer, frog, mouse}.

Venn Diagrams

To visualize the interaction of sets, John Venn in 1880 thought to use overlapping circles, building on a similar idea used by Leonhard Euler in the eighteenth century. These illustrations are now called Venn Diagrams.

Venn Diagram

A Venn diagram represents each set by a circle, usually drawn inside of a containing box representing the universal set. Overlapping areas indicate elements common to both sets.

Example

Suppose the universal set is students in a class. AA = all students with blonde hair; BB = all students with blue eyes; CC = all students at least 6 feet tall.

 

1. What does BB represent?

2. What does  ABAB represent?

3. What does  (AC)B(AC)B represent?

Use the Venn to write set interactions to represent each category.

2. Students with blonde hair and blue eyes.

3. Students with blue eyes that are at least 6 feet tall.

4.Students who have blonde hair, blue eyes, and are at least 6 feet tall.

5. Students who are under 6 feet tall and have neither blonde hair nor blue eyes.

6. Students who have neither blonde hair nor blue eyes but are at least 6′ tall.

Venn diagram

 

TRY IT

The Venn diagram shows the interaction of sports watched on TV by people who answered a survey. SS = {watched soccer}, FF = {watched football}, BB = {watched baseball}, GG = {watched golf}

Sport Venn

 

Use set interactions to represent each category.

1. People who watch only baseball?

2. People who watch golf and football?

3. People who watch football and baseball?

4. People who watch football, baseball, and soccer?

5. People who watch football but neither baseball nor soccer?

6. People who do not watch golf?

Even when the elements of the sets are unknown, Venn diagrams can illustrate unions, intersections, and complements.

Example

Create Venn diagrams to illustrate ABAB, ABAB, and ABAB.

ABAB contains all elements in either set.

Fig3_1_1

ABAB contains only those elements in both sets—in the overlap of the circles.

Fig3_1_2

AA will contain all elements not in the set AA. ABAB will contain the elements in set BB that are not in set AA.

Fig3_1_3

Example

Use a Venn diagram to illustrate (HF)W(HF)W

We’ll start by identifying everything in the set HFHF

Fig3_1_4

 

Now, (HF)W(HF)W will contain everything not in the set identified above that is also in set W.

Fig3_1_5

Example

Create an expression to represent the outlined part of the Venn diagram shown.

Fig3_1_6

The elements in the outlined set are in sets HH and FF, but are not in set WW. So we represent this set as HFWHFW.

Try It

Create an expression to represent the outlined portion of the Venn diagram shown

Fig3_1_7