Sets and Set Operations
Your school has a camogie team and a soccer team. Some students play only one, some play both and some play neither. How do you count them without counting anyone twice? Sets and Venn diagrams are made for exactly this. We will come back to this question at the end of the page.
What is a set?
A set is a well-defined collection of objects. The objects are called elements (or members). "Well-defined" means that you can always say for certain whether something is in the set or not.
We write sets inside curly braces $\{\ \}$ and name them with capital letters. There are two ways to describe a set:
-
By a list: $A = \{2, 4, 6, 8\}$
-
By a rule: $A = \{x \in \mathbb{N} \mid x \text{ is even}, x \le 8\}$. Read it as "the set of all $x$ in $\mathbb{N}$ such that…".
The number sets are $\mathbb{N}$ (natural numbers), $\mathbb{Z}$ (integers), $\mathbb{Q}$ (rationals), $\mathbb{R}$ (real numbers) and $\mathbb{R}\setminus\mathbb{Q}$ (irrationals).
Let $P = \{a, b, c, d\}$ and $Q = \{c, d, e\}$. a) Is $c \in P$? Is $e \in P$? Use the symbols $\in$ or $\notin$. b) Find $\#(P \cup Q)$, the number of elements in…
Let $P = \{a, b, c, d\}$ and $Q = \{c, d, e\}$.
- a) Is $c \in P$? Is $e \in P$? Use the symbols $\in$ or $\notin$.
- b) Find $\#(P \cup Q)$, the number of elements in $P \cup Q$.
- c) Is $\{c, d\} \subset P$? Explain briefly.
Venn diagrams
A Venn diagram draws the universal set $U$ as a rectangle and each set as a circle inside it. Where circles overlap, the elements belong to both sets.
Each region of the diagram is a different group of elements. Always fill in the middle (the overlap) first.
Set operations
Let $A = \{2, 4, 6, 8, 10\}$ and $B = \{4, 8, 12, 16\}$. a) List the elements of $A \cap B$. b) List the elements of $A \cup B$. c) List the elements of $A \setminus B$.
Let $A = \{2, 4, 6, 8, 10\}$ and $B = \{4, 8, 12, 16\}$.
- a) List the elements of $A \cap B$.
- b) List the elements of $A \cup B$.
- c) List the elements of $A \setminus B$.
The universal set is $U = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}$ and $A = \{1, 3, 5, 7, 9\}$. a) Write down the complement $A'$ in list form. b) Write $A$ in the form "rule"…
The universal set is $U = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}$ and $A = \{1, 3, 5, 7, 9\}$.
- a) Write down the complement $A'$ in list form.
- b) Write $A$ in the form "rule" using set-builder notation, for example $\{x \in U \mid \dots\}$.
- c) Write down $A \cap A'$ using the correct symbol.
$U = \{x \in \mathbb{N} \mid 1 \le x \le 12\}$, $A = \{\text{multiples of } 3\}$ and $B = \{\text{even numbers}\}$. a) List $A$, $B$, $A \cap B$ and $A \cup B$. b) List…
$U = \{x \in \mathbb{N} \mid 1 \le x \le 12\}$, $A = \{\text{multiples of } 3\}$ and $B = \{\text{even numbers}\}$.
- a) List $A$, $B$, $A \cap B$ and $A \cup B$.
- b) List $(A \cup B)'$.
- c) List $B \setminus A$.
Three sets and the laws of sets
With three sets, work step by step and always do the brackets first.
Union and intersection are commutative ($A \cup B = B \cup A$) and associative ($A \cup (B \cup C) = (A \cup B) \cup C$), so brackets do not change the answer when you only use unions (or only intersections).
$U = \{1, 2, 3, \dots, 10\}$, $A = \{1, 2, 3, 4, 5\}$, $B = \{4, 5, 6, 7\}$ and $C = \{5, 7, 9, 10\}$. a) List $A \cap B \cap C$. b) List $(A \cup B) \cap C$. c) List…
$U = \{1, 2, 3, \dots, 10\}$, $A = \{1, 2, 3, 4, 5\}$, $B = \{4, 5, 6, 7\}$ and $C = \{5, 7, 9, 10\}$.
- a) List $A \cap B \cap C$.
- b) List $(A \cup B) \cap C$.
- c) List $A \setminus (B \cup C)$.
- d) Verify that $A \cup (B \cup C) = (A \cup B) \cup C$.
Let $U = \{1, 2, \dots, 20\}$, $A = \{\text{prime numbers}\}$, $B = \{\text{odd numbers}\}$ and $C = \{\text{multiples of } 5\}$. a) List $A$, $B$ and $C$. b) Find…
Let $U = \{1, 2, \dots, 20\}$, $A = \{\text{prime numbers}\}$, $B = \{\text{odd numbers}\}$ and $C = \{\text{multiples of } 5\}$.
- a) List $A$, $B$ and $C$.
- b) Find $A \cap B \cap C$ and $(A \cap B) \setminus C$.
- c) Show, using these sets, that $(A \cup B)' = A' \cap B'$.
- d) Which element of $U$ is in $A$ but not in $B$? Explain why it is the only one.
Counting with Venn diagrams
A Venn diagram lets us solve counting problems. The key facts:
So we can close our opening question: counting each student once means starting with the overlap, then subtracting it from each circle.
With three sets, start with the centre ($A \cap B \cap C$). Then find each "two sets only" region by subtracting the centre. Then find each "one set only" region. Finally, find the number outside all circles using $\#U$.
In a class of 30 students in Galway, 18 play camogie or hurling (set $H$), 12 play soccer (set $S$) and 5 play both. a) Draw a Venn diagram description: state the number…
In a class of 30 students in Galway, 18 play camogie or hurling (set $H$), 12 play soccer (set $S$) and 5 play both.
- a) Draw a Venn diagram description: state the number of students in $H \cap S$, in $H$ only and in $S$ only.
- b) How many students play neither sport?
- c) Find $\#(H \cup S)$.
A survey of 60 tourists in Kerry found that 35 visited the Ring of Kerry ($R$), 28 visited Killarney National Park ($K$) and 22 visited Dingle ($D$). Also, 12 visited…
A survey of 60 tourists in Kerry found that 35 visited the Ring of Kerry ($R$), 28 visited Killarney National Park ($K$) and 22 visited Dingle ($D$). Also, 12 visited $R$ and $K$ only, 9 visited $R$ and $D$ only, 7 visited $K$ and $D$ only, and 4 visited all three.
- a) Find the number who visited $R$ only, $K$ only and $D$ only.
- b) Find how many visited none of the three places.
- c) Is the data consistent? Justify your answer.
For sets $A$ and $B$ in a universal set $U$, $\#(A) = 20$, $\#(B) = 15$ and $\#(A \cup B) = 28$. a) Find $\#(A \cap B)$. b) Find $\#(A \setminus B)$ and…
For sets $A$ and $B$ in a universal set $U$, $\#(A) = 20$, $\#(B) = 15$ and $\#(A \cup B) = 28$.
- a) Find $\#(A \cap B)$.
- b) Find $\#(A \setminus B)$ and $\#(B \setminus A)$.
- c) If $\#(U) = 40$, find $\#((A \cup B)')$.
- d) Explain why $\#(A \cap B)$ could not be 16.