topic badge

7.03 Subsets and sample spaces

Lesson

Concept summary

A collection of items is called a set. There are many situations which we can describe and explore mathematically using sets, and to do so we will make use of some new terminology.

Set

A collection of items, which are usually called elements. Sets are usually denoted using capital letters.

A Venn diagram showing two circles A and B. Circle A is highlighted.
Element

A single member of a set. Elements are usually denoted using lower case letters.

A set can be described by listing its elements inside a pair of braces, and we call this set notation. For example, if the set A is "the set of positive integers smaller than nine", we can write this asA = \left\{1, 2, 3, 4, 5, 6, 7, 8\right\}

If there are too many elements to write out but there is a clear pattern to the elements, we can use three dots to indicate that a pattern continues. For example, if the set B is "the set of even whole numbers", we can write this as B = \left\{2, 4, 6, 8, 10, \ldots \right\}

A special set, called the empty set, is the set which contains no elements. It is usually represented by the symbol \emptyset, but can also be expressed in set notation as\emptyset = \left\{\right\}

Sample space

A set from which all elements of the other sets in a problem can be found. Sometimes called a universal set.

A Venn diagram showing two circles A and B. The entire rectangle is highlighted.
Complement

The complement of a set A, denoted A' or \text{not}A, is the set of all elements of the sample space which are not elements of A.

A Venn diagram showing two circles A and B. Everything inside the rectangle except for the interior of circle A is highlighted.
Intersection

The intersection of two sets A and B, denoted A \cap B or or A\text{ and }B, is the set of all elements which belong to both A and B.

A Venn diagram showing two circles A and B. The region that is inside both circles A and B is highlighted.
Union

The union of two sets A and B, denoted A \cup B or A\text{ or }B, is the set of all elements which belong to either A or B.

A Venn diagram showing two circles A and B. The entirety of both circles A and B is highlighted.
Subset

A set B is a subset of another set A, denoted B \subseteq A, if every element of B is also an element of A.

To summarize the images above, we can use Venn diagrams to represent sets. The large outer rectangle represents the sample space, and each circle in the Venn diagram represents a set. We can also see their intersection as the region where the circles overlap, and their union as the collection of all parts of each circle.

We can also see these components of sets in two-way tables:

A\text{Not }A\text{Total}
Bwxw + x
\text{Not }Byzy + z
\text{Total}w + yx + zw + x + y + z

In the table above, the number of elements in set A would be the total w + y, while the number of elements in the complement of A would be x + z. We get similar results for B and its complement by looking at the rows.

The number of elements in the intersection A \cap B would be w. The number of elements in the union A \cup B would be w + x + y. There are w + x + y + z elements in total in the sample space.

Worked examples

Example 1

P is the set of odd numbers between 2 and 16, and Q is the set given by Q = \left\{1, 2, 3, 5, 8, 13, 21\right\}.

a

Express P using set notation.

Solution

We know that P is the set of odd numbers between 2 and 16. This means that the smallest number in the set will be 3, and the largest will be 15.

So we can write P as P = \left\{3, 5, 7, 9, 11, 13, 15\right\}

b

Determine the set given by P \cap Q.

Approach

Since P \cap Q we know that this is the intersection of P and Q. That is, P \cap Q contains all of the elements that belong to both P and Q.

Solution

We can see that the odd elements of Q are 1, 3, 5, 13, and 21.

Of these, 3, 5, and 13 lie between 2 and 16 and are therefore also elements of P.

So we have thatP \cap Q = \left\{3, 5, 13\right\}

Example 2

In the sample spaceS = \left\{\text{square, triangle, rhombus, parallelogram, hexagon, circle, trapezoid, rectangle}\right\}the subset A is "shapes with four sides" and the subset B is "words beginning with the letter t".

a

Describe the set "\text{not }A" using words, then express it using set notation.

Approach

The keyword "not" indicates that we want to take the complement of A. In order to think about this, it might be useful to first list out the elements of A.

Solution

The set A is the set of "shapes with four sides" from the sample space S. So we haveA = \left\{\text{square, rhombus, parallelogram, trapezoid, rectangle}\right\}

The complement of A is the set of all elements of S that are not in A. We can describe this as "the set of shapes which do not have four sides". In set notation, this will beA' = \left\{\text{triangle, hexagon, circle}\right\}

b

Describe the set "B \text{ or not}A" using words, then express it using set notation.

Approach

We determined the set "not A" in the first part of this question. The keyword "or" indicates that we want to take the union of this with set B. This time it might be useful to list out the elements of B.

Solution

The set B is the set of "words beginning with the letter t" from the sample space S. So we haveB = \left\{\text{triangle, trapezoid}\right\}

The union of two sets will include any element that is in at least one of those sets. So we can describe the set "B or not A as "the set of shapes which do not have four sides or start with the letter t". In set notation, this will beB \cup A' = \left\{\text{triangle, hexagon, circle, trapezoid}\right\}

Reflection

Notice that the element "triangle" appears in both B and A'. This element is still included in the union, since appearing in both sets means that it appears in at least one of the two sets.

We only need to list it once, however - we don't need to write the element twice in the union even though it appears in both sets.

Example 3

Consider the sets shown in the following Venn diagram:

A Venn diagram showing circles A and B and a number of elements. See your teacher for more information.
a

State the sample space.

Solution

The sample space contains all the possible elements that can appear in any set in the context. For a Venn diagram, this includes any element within the outer rectangle (whether or not it is inside any circles).

In this case, every number from 1 to 20 appears exactly once. So the sample space is\left\{1, 2, 3, \ldots, 19, 20\right\}

b

Indicate the region which represents A \cap B' on the diagram, and state the elements of this set.

Solution

B' is the complement of B, i.e. the region outside of circle B. We then want to take the intersection of that with set A.

So we want to include everything that is inside circle A but not inside circle B:

A Venn diagram showing circles A and B and a number of elements, with one region highlighted. See your teacher for more information.

In set notation, this isA \cap B' = \left\{1, 4, 16\right\}

Reflection

In the previous part we found that the sample space for this Venn diagram is "all integers from 1 to 20 inclusive".

Within this sample space we can describe set A as "the set of square numbers", and we can describe set B as "integers between 6 and 12 inclusive".

So within the sample space, we could also describe the set A \cap B' as "square numbers that are not between 6 and 12".

Example 4

Using the following two-way table, determine the number of elements in the set given by "X \text{ or not }Y".

Y\text{Not }Y\text{Total}
X821294
\text{Not }X415394
\text{Total}12365188

Approach

While a two-way table contains row and column totals, we need to be careful about using these as we don't want to count elements multiple times. So it will be easier to use the four values not in any total row or column.

Solution

We want to include all elements that appear in either the row X or the column "\text{Not }Y".

There are 12 elements that appear in both of these. There are also 82 other elements in the row for X, and 53 other elements in the column for "\text{Not }Y".

Putting this all together, there are 12 + 82 + 53 = 147 elements in the set "X\text{ or not }Y".

Reflection

We could also convert this two-way table to a Venn diagram to confirm our answer.

A Venn diagram showing circles X and Y with the number 82 in their intersection, 12 in X but not the Y, 41 in Y but not X, and 53 outside of the two cirlce, but inside the rectangle.

From here we can see that if we want the number of elements that are in X or are not in Y we want to add up 53+12+82=147.

Outcomes

M3.S.CP.A.1

Use set notation to represent contextual situations.*

M3.S.CP.A.1.A

Describe events as subsets of a sample space (the set of outcomes) using characteristics (or categories) of the outcomes, or as unions, intersections, or complements of other events ("or", "and", "not").

M3.S.CP.A.1.B

Flexibly move between visual models (Venn diagrams, frequency tables, etc.) and set notation.

M3.MP1

Make sense of problems and persevere in solving them.

M3.MP4

Model with mathematics.

M3.MP5

Use appropriate tools strategically.

M3.MP6

Attend to precision.

What is Mathspace

About Mathspace