Set notation and listing elements
Your class is picking a team for the school Gaelic football blitz. Aoife says, "Everyone who plays on the camogie team and on the football team should come to the meeting." How do you say that precisely, and how do you count those students quickly? Maths has a short language for exactly this: sets.
What is a set?
We name a set with a capital letter and list its elements inside curly brackets, separated by commas.
$$A = \{\text{Mon}, \text{Wed}, \text{Fri}\}$$"The tallest students in 1st Year" is not a set, because "tallest" is not clearly defined. "The students in 1st Year taller than 170 cm" is a set.
Two facts about listing:
-
Order does not matter: $\{1, 2, 3\} = \{3, 1, 2\}$.
-
Each element is written once: $\{2, 2, 5\}$ is just $\{2, 5\}$.
We use $\in$ for "is an element of" and $\notin$ for "is not an element of". If $A = \{2, 4, 6\}$, then $4 \in A$ and $5 \notin A$.
The number of elements in $A$ is written $\#A$. Here $\#A = 3$.
The empty set has no elements. It is written $\emptyset$ (or $\{\ \}$), and $\#\emptyset = 0$. For example, the set of whole numbers greater than $10$ and less than $11$ is $\emptyset$.
Some sets of numbers have standard names:
| Symbol | Set | Elements |
|---|---|---|
| $\mathbb{N}$ | natural numbers | $1, 2, 3, \ldots$ |
| $\mathbb{Z}$ | integers | $\ldots, -2, -1, 0, 1, 2, \ldots$ |
Let $A$ be the set of the months of the year that begin with the letter J. a) List the elements of $A$. b) Write down $\#A$. c) Is March $\in A$? Answer "yes" or "no".
Let $A$ be the set of the months of the year that begin with the letter J.
- a) List the elements of $A$.
- b) Write down $\#A$.
- c) Is March $\in A$? Answer "yes" or "no".
Describing sets: lists and rules
You can describe a set in two ways. A list writes out every element. A rule (set-builder notation) says what the elements must satisfy:
$$B = \{x \mid x \in \mathbb{N},\ 2 < x \le 7\}$$Read this as "B is the set of all $x$ such that $x$ is a natural number and $x$ is greater than 2 and less than or equal to 7". The bar $\mid$ means "such that".
Let $B = \{x \mid x \text{ is an even number}, \ 3 < x \leq 15\}$. a) List the elements of $B$. b) Write down $\#B$. c) Fill in the symbol $\in$ or $\notin$:…
Let $B = \{x \mid x \text{ is an even number}, \ 3 < x \leq 15\}$.
- a) List the elements of $B$.
- b) Write down $\#B$.
- c) Fill in the symbol $\in$ or $\notin$: $8 \ \square \ B$ and $9 \ \square \ B$.
Subsets and the universal set
If every element of $D$ is also in $C$, then $D$ is a subset of $C$, written $D \subset C$.
$$C = \{2, 4, 6, 8, 10\}, \quad D = \{4, 8\} \quad\Rightarrow\quad D \subset C$$But $C \not\subset D$, because $2 \in C$ and $2 \notin D$. The empty set is a subset of every set, and every set is a subset of itself.
The universal set, written $U$, is the set of all the elements we are interested in for a particular problem. Every other set in the problem is a subset of $U$.
Let $C = \{2, 4, 6, 8, 10\}$ and $D = \{4, 8\}$. a) Is $D \subset C$? Answer "yes" or "no". b) Is $C \subset D$? Answer "yes" or "no". c) Let $E$ be the set of whole…
Let $C = \{2, 4, 6, 8, 10\}$ and $D = \{4, 8\}$.
- a) Is $D \subset C$? Answer "yes" or "no".
- b) Is $C \subset D$? Answer "yes" or "no".
- c) Let $E$ be the set of whole numbers greater than $10$ and less than $11$. Write $E$ using the correct symbol.
Write down all the subsets of $\{a, b, c\}$, including the empty set $\emptyset$. a) List them. b) How many subsets are there? c) How many subsets would a set with $4$…
Write down all the subsets of $\{a, b, c\}$, including the empty set $\emptyset$.
- a) List them.
- b) How many subsets are there?
- c) How many subsets would a set with $4$ elements have?
Intersection, union, difference and complement
Let $U = \{1, 2, \ldots, 10\}$, $A = \{1, 2, 3, 4, 5\}$ and $B = \{4, 5, 6, 7\}$. A Venn diagram shows the sets as overlapping circles inside a rectangle for $U$.
The overlap is $A \cap B$, the left part is $A \setminus B$, the right part is $B \setminus A$, and everything outside $A$ (inside the rectangle) is $A'$.
| Symbol | Name | Meaning | Example |
|---|---|---|---|
| $A \cap B$ | intersection | elements in both | $\{4, 5\}$ |
| $A \cup B$ | union | elements in at least one | $\{1, 2, 3, 4, 5, 6, 7\}$ |
| $A \setminus B$ | difference | in $A$ but not in $B$ | $\{1, 2, 3\}$ |
| $A'$ | complement | in $U$ but not in $A$ | $\{6, 7, 8, 9, 10\}$ |
In the union, an element that is in both sets is written only once.
Counting with two sets
When sets overlap, adding $\#A + \#B$ counts the overlap twice. So we subtract it once:
$$\#(A \cup B) = \#A + \#B - \#(A \cap B)$$Check with the sets above: $5 + 4 - 2 = 7$, and $A \cup B$ does have $7$ elements. Also, $\#A' = \#U - \#A$.
The universal set is $U = \{1, 2, 3, \ldots, 20\}$. Let $P$ be the set of prime numbers in $U$ and let $S$ be the set of square numbers in $U$. a) List the elements of…
The universal set is $U = \{1, 2, 3, \ldots, 20\}$. Let $P$ be the set of prime numbers in $U$ and let $S$ be the set of square numbers in $U$.
- a) List the elements of $P$ and of $S$.
- b) Write down $P \cap S$ and say what this tells you.
- c) Write down $\#(P \cup S)$.
Let $A = \{1, 3, 5, 7, 9, 11\}$ and $B = \{3, 6, 9, 12\}$, with universal set $U = \{1, 2, 3, \ldots, 12\}$. a) List $A \cap B$ and $A \cup B$. b) List $A \setminus B$…
Let $A = \{1, 3, 5, 7, 9, 11\}$ and $B = \{3, 6, 9, 12\}$, with universal set $U = \{1, 2, 3, \ldots, 12\}$.
- a) List $A \cap B$ and $A \cup B$.
- b) List $A \setminus B$ and $B \setminus A$.
- c) List $A'$, the complement of $A$.
The universal set is $U = \{x \mid x \in \mathbb{N}, \ 1 \leq x \leq 30\}$. Let $A$ be the multiples of $3$ and $B$ the multiples of $4$ in $U$. a) List $A \cap B$. b)…
The universal set is $U = \{x \mid x \in \mathbb{N}, \ 1 \leq x \leq 30\}$. Let $A$ be the multiples of $3$ and $B$ the multiples of $4$ in $U$.
- a) List $A \cap B$.
- b) Find $\#(A \cup B)$ and $\#(A \cup B)'$.
- c) Show that $\#(A \cup B) = \#A + \#B - \#(A \cap B)$ for these sets.
Solving set puzzles
Harder questions give you some clues and ask you to work out the rest. Use these steps:
-
Write down what you know for certain ($\in$ and $\notin$ clues first).
-
Use $\cap$ and $\cup$ to place each element: elements of $A \cup B$ must be in at least one set.
-
Check that your answer satisfies every clue.
Sets $A$ and $B$ satisfy $\#A = 8$, $\#B = 11$ and $\#(A \cap B) = 3$. The universal set $U$ has $25$ elements. a) Find $\#(A \cup B)$. b) Find $\#(A \cup B)'$. c) Find…
Sets $A$ and $B$ satisfy $\#A = 8$, $\#B = 11$ and $\#(A \cap B) = 3$. The universal set $U$ has $25$ elements.
- a) Find $\#(A \cup B)$.
- b) Find $\#(A \cup B)'$.
- c) Find $\#(A \setminus B)$ and $\#(B \setminus A)$.
- d) Explain why $\#(A \cap B)$ can never be greater than $8$ for these sets.
Let $A = \{1, 2, 3, 4, 5, 6\}$. The set $B$ is a subset of $A$ with $\#B = 4$. The set $C$ satisfies $B \cap C = \{2, 5\}$ and $B \cup C = \{1, 2, 3, 4, 5, 6, 7\}$, and…
Let $A = \{1, 2, 3, 4, 5, 6\}$. The set $B$ is a subset of $A$ with $\#B = 4$. The set $C$ satisfies $B \cap C = \{2, 5\}$ and $B \cup C = \{1, 2, 3, 4, 5, 6, 7\}$, and $3 \notin C$.
- a) Find $C$ if $1 \in B$ and $4 \notin B$.
- b) Hence list $B$.
- c) Justify why $7 \in C \setminus B$.
Back to the start: the students who play on both the camogie and the football team form the set $C \cap F$, and if $\#C = 14$, $\#F = 18$ and $\#(C \cup F) = 25$, then $\#(C \cap F) = 14 + 18 - 25 = 7$.