Back to homeMathematics · 1st Year · Change subject
Start for free
1st Year · Mathematics
Sets, Counting, Volume and Congruent Triangles · Sets

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$
Practice★☆☆Not started
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.

  1. a) List the elements of $A$.
  1. b) Write down $\#A$.
  1. c) Is March $\in A$? Answer "yes" or "no".
Solve

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".

Practice★☆☆Not started
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\}$.

  1. a) List the elements of $B$.
  1. b) Write down $\#B$.
  1. c) Fill in the symbol $\in$ or $\notin$: $8 \ \square \ B$ and $9 \ \square \ B$.
Solve

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.

A large oval labelled C containing a smaller oval labelled D, showing D is a subset of C. C D 2, 6, 10 4, 8

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$.

Practice★☆☆Not started
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\}$.

  1. a) Is $D \subset C$? Answer "yes" or "no".
  1. b) Is $C \subset D$? Answer "yes" or "no".
  1. c) Let $E$ be the set of whole numbers greater than $10$ and less than $11$. Write $E$ using the correct symbol.
Solve
Practice★★☆Not started
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$.

  1. a) List them.
  1. b) How many subsets are there?
  1. c) How many subsets would a set with $4$ elements have?
Solve

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$.

Venn diagram of A and B inside the universal set U: 1, 2, 3 only in A; 4, 5 in both; 6, 7 only in B; 8, 9, 10 outside both. U A B 1, 2, 3 4, 5 6, 7 8, 9, 10

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$.

Practice★★☆Not started
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$.

  1. a) List the elements of $P$ and of $S$.
  1. b) Write down $P \cap S$ and say what this tells you.
  1. c) Write down $\#(P \cup S)$.
Solve
Practice★★☆Not started
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\}$.

  1. a) List $A \cap B$ and $A \cup B$.
  1. b) List $A \setminus B$ and $B \setminus A$.
  1. c) List $A'$, the complement of $A$.
Solve
Practice★★★Not started
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$.

  1. a) List $A \cap B$.
  1. b) Find $\#(A \cup B)$ and $\#(A \cup B)'$.
  1. c) Show that $\#(A \cup B) = \#A + \#B - \#(A \cap B)$ for these sets.
Solve

Solving set puzzles

Harder questions give you some clues and ask you to work out the rest. Use these steps:

  1. Write down what you know for certain ($\in$ and $\notin$ clues first).

  2. Use $\cap$ and $\cup$ to place each element: elements of $A \cup B$ must be in at least one set.

  3. Check that your answer satisfies every clue.

Practice★★★Not started
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.

  1. a) Find $\#(A \cup B)$.
  1. b) Find $\#(A \cup B)'$.
  1. c) Find $\#(A \setminus B)$ and $\#(B \setminus A)$.
  1. d) Explain why $\#(A \cap B)$ can never be greater than $8$ for these sets.
Solve
Practice★★★Not started
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$.

  1. a) Find $C$ if $1 \in B$ and $4 \notin B$.
  1. b) Hence list $B$.
  1. c) Justify why $7 \in C \setminus B$.
Solve

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$.

Summary

See all the exercises in this section