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.
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}.
A = {x : x is an even number, 1 < x < 9} (set-builder)
s(A) (also written |A| or n(A)) counts the elements. The empty set ∅ has s(∅) = 0.
Adding s(A) and s(B) counts the overlap twice; subtract it once.
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
Subsets of a small set
subsetsA = {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
- Primes below 12: A = {2, 3, 5, 7, 11}, so s(A) = 5.
- Subsets: 25 = 32 (each of the 5 elements is either in or out).
- Proper subsets exclude A itself: 32 − 1 = 31.
Answer 32 subsets, 31 proper subsets
Operations on two sets
union · intersection · differenceU = {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
- A ∩ B = {4, 5, 6} — in both.
- A ∪ B = {1, 2, 3, 4, 5, 6, 7, 8} — in either, each written once.
- A \ B = {1, 2, 3} and B \ A = {7, 8}.
- (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}
Students who take two courses
inclusion–exclusionIn 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
- At least one course: 40 − 5 = 35.
- Inclusion–exclusion: 35 = 26 + 22 − s(C ∩ B).
- s(C ∩ B) = 48 − 35 = 13.
Answer 13 students take both
Practice: sets
0 / 0Count 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.