Learn · Mathematics · Grade 9 · Sets

Sets: notation, subsets, union and intersection

How to write a set, count its subsets, and read union, intersection, difference and complement from a Venn diagram — with the counting rule for two overlapping sets.

High school Lesson 2 of 31 Interactive figure Practice

First, the rules

Collections with no repeats and no order

A set is a collection of distinct objects. {1, 2, 3} and {3, 1, 2} are the same set; {1, 1, 2} is just {1, 2}.

Two ways to write a set
Example 1
A = {2, 4, 6, 8} (roster)
A = {x : x is an even number, 1 < x < 9} (set-builder)
Element and cardinality
3 ∈ A, 5 ∉ A, s(A) = 4
s(A) (also written |A| or n(A)) counts the elements. The empty set ∅ has s(∅) = 0.
★ Subsets
Example 1
B ⊂ A when every element of B is in A. A set with n elements has 2n subsets (each element is in or out), including ∅ and A itself; 2n − 1 proper subsets.
★ Union, intersection, difference, complement
Example 2
A ∪ B in A or B (or both) · A ∩ B in both · A \ B in A but not in B · A′ not in A (inside the universal set U)
★ Counting two overlapping sets (inclusion–exclusion)
Example 3
s(A ∪ B) = s(A) + s(B) − s(A ∩ B)
Adding s(A) and s(B) counts the overlap twice; subtract it once.
Disjoint sets
A ∩ B = ∅ ⇒ s(A ∪ B) = s(A) + s(B)
De Morgan
(A ∪ B)′ = A′ ∩ B′, (A ∩ B)′ = A′ ∪ B′

See it

Shade the Venn diagram

Pick an operation and the region lights up. Change how many elements sit in each region and watch s(A ∪ B) follow the inclusion–exclusion rule.

Step by step

Worked examples

1

Subsets of a small set

subsets

A = {x : x is a prime number less than 12}. Write A in roster form, then find the number of subsets and the number of proper subsets of A.

Ask yourself: List the elements first. How many choices does each element give you when you build a subset? (In or out: 2.)

Show the solution
  1. Primes below 12: A = {2, 3, 5, 7, 11}, so s(A) = 5.
  2. Subsets: 25 = 32 (each of the 5 elements is either in or out).
  3. Proper subsets exclude A itself: 32 − 1 = 31.

Answer 32 subsets, 31 proper subsets

2

Operations on two sets

union · intersection · difference

U = {1, 2, …, 10}, A = {1, 2, 3, 4, 5, 6} and B = {4, 5, 6, 7, 8}. Find A ∪ B, A ∩ B, A \ B, B \ A and (A ∪ B)′.

Ask yourself: Which elements are in both lists? Those form the intersection; everything else goes to one of the differences.

Show the solution
  1. A ∩ B = {4, 5, 6} — in both.
  2. A ∪ B = {1, 2, 3, 4, 5, 6, 7, 8} — in either, each written once.
  3. A \ B = {1, 2, 3} and B \ A = {7, 8}.
  4. (A ∪ B)′ = {9, 10} — the elements of U not in the union. Check: s(A ∪ B) = 6 + 5 − 3 = 8.

Answer {1,…,8}, {4, 5, 6}, {1, 2, 3}, {7, 8}, {9, 10}

3

Students who take two courses

inclusion–exclusion

In a class of 40 students, 26 take chemistry, 22 take biology and 5 take neither. How many take both?

Ask yourself: How many take at least one? Then compare with 26 + 22.

Show the solution
  1. At least one course: 40 − 5 = 35.
  2. Inclusion–exclusion: 35 = 26 + 22 − s(C ∩ B).
  3. s(C ∩ B) = 48 − 35 = 13.

Answer 13 students take both

Practice: sets

0 / 0

Count subsets, read A ∩ B or A \ B from two lists, or solve a two-course class problem. Your best score is kept in this browser only.

About this lesson

Sets for high school: roster and set-builder notation, the empty set, subsets and the number of subsets, union, intersection, difference and complement, Venn diagrams you can shade yourself, and the inclusion–exclusion rule s(A ∪ B) = s(A) + s(B) − s(A ∩ B) for word problems about students who take two courses. Worked examples and practice questions.

Part of Learn mathematics · Grade 9 · Sets. Check a number with the scientific calculator or draw a function with the function plotter. Everything on this page runs in your browser; nothing you type is sent or stored, and your practice score stays in this browser only. Spotted an error? Tell us.