Sets and Venn diagrams
Set notation, equal sets, the size of a set, the empty set, union and intersection, subsets, complements, Venn diagrams and the counting rule.
Probability is about counting outcomes, and outcomes come in collections: "the even numbers on a die", "the hearts in a pack". Sets give us precise words and symbols for those collections, and Venn diagrams let us see how they overlap.
The language of sets
- A set is a collection of distinct objects called elements, listed in braces: $A = \{2, 4, 6\}$. Order and repeats don't matter, so $\{1, 2\} = \{2, 1, 1\}$. Two sets are equal if they have exactly the same elements.
- $|A|$ is the size of $A$, the number of elements. The empty set $\varnothing$ has no elements, so $|\varnothing| = 0$.
- $A \subseteq B$ means $A$ is a subset of $B$: every element of $A$ is also in $B$. Every set is a subset of itself, and $\varnothing$ is a subset of every set.
- The universal set $U$ (some books use $E$) holds everything relevant to the problem.
And, or, not
| Word | Symbol | Name | Meaning |
|---|---|---|---|
| and | $A \cap B$ | intersection | in $A$ and in $B$ |
| or | $A \cup B$ | union | in $A$ or $B$ or both |
| not | $\overline{A}$ | complement | in $U$ but not in $A$ |
Two sets with no elements in common, $A \cap B = \varnothing$, are called disjoint. A set and its complement are always disjoint, and together they make up $U$.
$U = \{1, 2, \ldots, 12\}$, $A$ is the even numbers and $B$ is the multiples of $3$. Find $A \cap B$, $A \cup B$ and $|\overline{A}|$.
Venn diagrams and the counting rule
A Venn diagram draws $U$ as a rectangle and each set as a circle inside it. Overlapping circles split the rectangle into four regions: $A$ only, both, $B$ only, and neither. The mistake above leads straight to the rule: adding $|A|$ and $|B|$ counts the overlap twice, so subtract it once.
In a class of $32$, $20$ play soccer, $14$ play tennis and $7$ play both. How many play neither? How many play soccer only?
Click regions of the Venn diagram to shade them. The matching cells of the two-way table light up. The readout names the shaded region in set notation.
Shade the region for "exactly one of the two subjects" and write it in set notation before you read the answer. Then find a set of regions whose name is $(A \cap B)'$, and check its count is $50 - 12$.
Your turn
Of $50$ people, $28$ own a dog, $19$ own a cat and $9$ own neither. How many own both?
Show the working
$50 - 9 = 41$ people are in $D \cup C$. The counting rule gives $41 = 28 + 19 - |D \cap C|$, so $|D \cap C| = 47 - 41 = 6$.
If $A = \{1, 2, 3, 4\}$ and $B = \{3, 4, 5\}$, then $A \cap B =$
The intersection holds the elements in both sets: $3$ and $4$.
For the same sets, find $|A \cup B|$.
$A \cup B = \{1, 2, 3, 4, 5\}$, which has $5$ elements. Check: $4 + 3 - 2 = 5$.
How many subsets does $\{a, b, c, d\}$ have?
Each of the $4$ elements is either in or out: $2^4 = 16$, including $\varnothing$ and the whole set.
$\overline{A}$ means:
The complement of $A$ is everything in the universal set except $A$. The number of elements is $|A|$.
$|A| = 12$, $|B| = 9$ and $|A \cap B| = 4$. Find $|A \cup B|$.
$12 + 9 - 4 = 17$.
Of $40$ students, $25$ study Maths Extension, $18$ study Physics and $10$ study both. How many study neither?
$|M \cup P| = 25 + 18 - 10 = 33$. Neither: $40 - 33 = 7$.
For the same students, how many study Maths Extension but not Physics?
Maths only $= 25 - 10 = 15$.
$A$ and $B$ are disjoint. This means:
Disjoint sets have no elements in common, so their intersection is empty.
Exam style: $U = \{1, 2, \ldots, 20\}$, $A$ is the multiples of $4$ and $B$ is the multiples of $6$. Find $|\overline{A \cup B}|$.
$A = \{4, 8, 12, 16, 20\}$ and $B = \{6, 12, 18\}$, with $A \cap B = \{12\}$. So $|A \cup B| = 5 + 3 - 1 = 7$, and the complement has $20 - 7 = 13$ elements.
Exam style: $|A \cup B| = 30$, $|A| = 18$ and $|B| = 20$. Find $|A \cap B|$.
$30 = 18 + 20 - |A \cap B|$, so $|A \cap B| = 38 - 30 = 8$.
Coaching Centre