Back to homeMathematics · 3rd Year · Change subject
Start for free
3rd Year · Mathematics
Applied Mathematics Gaps for Junior Cycle: Trigonometry, Probability, Arithmetic, Sets and Algebra · Sets and Venn Diagrams

Set notation, operations and Venn diagrams

In a class of 30 students, 20 are in the choir and 15 are in the school band. Can every student be in only one of the two groups? If not, what is the smallest number who must be in both? Sets and Venn diagrams are the tools for sorting out questions like this.

Sets and their notation

A set is a collection of objects, called elements (or members). The elements go inside curly brackets, separated by commas.

$$A = \{2, 3, 5, 7, 11\}$$

Order does not matter and an element is not listed twice. Sets are usually named with capital letters.

The universal set $U$ is the set of everything we are talking about in a problem. Every other set in the problem lives inside $U$.

Symbol Meaning Example
$\in$ is an element of $3 \in A$
$\notin$ is not an element of $4 \notin A$
$\#A$ number of elements in $A$ $\#A = 5$
$\subset$ is a subset of $\{2, 3\} \subset A$
$\{\ \}$ the empty set (no elements) $\#\{\ \} = 0$

A set can also be described by a rule. For example, $B = \{x \in \mathbb{N} : 1 \le x \le 6\}$ means "$x$ is a natural number with $1 \le x \le 6$", so $B = \{1, 2, 3, 4, 5, 6\}$. Read the colon as "such that".

Practice★☆☆Not started
Using the sets from the universal set $U = \{a, b, c, d, e, f, g, h\}$, with $P = \{a, b, c, d\}$ and $Q = \{c, d, e\}$: a) Find $\#P$ and $\#Q$. b) Is…

Using the sets from the universal set $U = \{a, b, c, d, e, f, g, h\}$, with $P = \{a, b, c, d\}$ and $Q = \{c, d, e\}$:

  1. a) Find $\#P$ and $\#Q$.
  2. b) Is $\{c, d\} \subset P$? Is $e \in P$? Write your answers using correct notation.
  3. c) Draw a Venn diagram showing $P$ and $Q$ with all the elements placed.
Solve

Union, intersection, difference and complement

Four operations combine sets. Take $U = \{1, 2, \dots, 12\}$, $A = \{2, 3, 5, 7, 11\}$ (the primes) and $B = \{3, 6, 9, 12\}$ (the multiples of 3).

Operation Symbol Meaning Result
Union $A \cup B$ in $A$ or $B$ (or both) $\{2, 3, 5, 6, 7, 9, 11, 12\}$
Intersection $A \cap B$ in $A$ and $B$ $\{3\}$
Difference $A \setminus B$ in $A$ but not in $B$ $\{2, 5, 7, 11\}$
Complement $A'$ in $U$ but not in $A$ $\{1, 4, 6, 8, 9, 10, 12\}$

Why does $A \cup B$ list 3 only once? Because a set never repeats an element.

(Answer to the last step: $A \setminus B = \{2, 5, 7, 11\}$ and $B \setminus A = \{6, 9, 12\}$. They are different, so the order matters.)

Practice★☆☆Not started
Let $U = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}$, $A = \{2, 4, 6, 8, 10\}$ and $B = \{1, 2, 3, 4, 5\}$. List the elements of: a) $A \cup B$ b) $A \cap B$ c) $A \setminus B$…

Let $U = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}$, $A = \{2, 4, 6, 8, 10\}$ and $B = \{1, 2, 3, 4, 5\}$. List the elements of:

  1. a) $A \cup B$
  2. b) $A \cap B$
  3. c) $A \setminus B$
  4. d) $A'$
Solve

Venn diagrams with two sets

A Venn diagram draws $U$ as a rectangle and each set as a circle. Where circles overlap we have the intersection. Two overlapping circles split $U$ into four regions.

A Venn diagram with two overlapping circles A and B inside a rectangle U, with four regions labelled A only, both, B only and neither. U A B A only A and B (both) B only neither

To fill in a diagram from numbers, start in the middle (the intersection) and work outwards:

  1. Put the number in $A \cap B$ in the overlap.

  2. Subtract it from $\#A$ to get "A only", and from $\#B$ to get "B only".

  3. Put "neither" in $U$ outside both circles, found by subtracting the others from $\#U$.

This works because every element of $U$ lies in exactly one region, so the four numbers add up to $\#U$.

For the union, we count the overlap twice if we simply add, so we take it off once:

$$\#(A \cup B) = \#A + \#B - \#(A \cap B)$$

(Answer: $\frac{10}{40} = \frac{1}{4}$.) In general, for a Venn diagram with numbers,

$$P(\text{event}) = \frac{\text{number of elements in the event's region(s)}}{\#U}$$
Practice★☆☆Not started
In a class of 28 students, 15 play Gaelic football, 10 play camogie and 4 play both. a) Draw a Venn diagram showing this information. b) How many students play neither…

In a class of 28 students, 15 play Gaelic football, 10 play camogie and 4 play both.

  1. a) Draw a Venn diagram showing this information.
  2. b) How many students play neither sport?
Solve
Practice★★☆Not started
In a survey of 60 people in Limerick, 35 said they like tea, 28 like coffee and 9 like neither. a) Find how many like both tea and coffee. b) Draw a Venn diagram. c)…

In a survey of 60 people in Limerick, 35 said they like tea, 28 like coffee and 9 like neither.

  1. a) Find how many like both tea and coffee.
  2. b) Draw a Venn diagram.
  3. c) Find the probability that a person chosen at random likes tea only.
Solve
Practice★★☆Not started
Given $\#U = 40$, $\#A = 18$, $\#B = 22$ and $\#(A \cap B) = 7$: a) Find $\#(A \cup B)$. b) Find $\#(A \cup B)'$. c) Find $\#(A \setminus B)$ and $\#(B \setminus A)$.

Given $\#U = 40$, $\#A = 18$, $\#B = 22$ and $\#(A \cap B) = 7$:

  1. a) Find $\#(A \cup B)$.
  2. b) Find $\#(A \cup B)'$.
  3. c) Find $\#(A \setminus B)$ and $\#(B \setminus A)$.
Solve

Venn diagrams with three sets

Three overlapping circles give eight regions: three "only" regions, three regions where exactly two circles overlap, the centre where all three overlap, and the outside.

Always fill in the centre $A \cap B \cap C$ first. Then do the regions where exactly two sets overlap, subtracting the centre. Then the "only" regions. Finally find the outside from $\#U$.

(Answer: $5 + 4 + 3 = 12$.)

When a three-set problem gives a rule for each set (for example "multiples of 3"), list the elements of each set first. Then place each element of $U$ one at a time, starting with those that belong to the most sets, and cross each one off as you go. Every element of $U$ must appear exactly once.

Practice★★☆Not started
$U = \{x \in \mathbb{N} : 1 \le x \le 20\}$, $A$ is the set of multiples of 3, $B$ is the set of even numbers and $C$ is the set of prime numbers. a) List the elements…

$U = \{x \in \mathbb{N} : 1 \le x \le 20\}$, $A$ is the set of multiples of 3, $B$ is the set of even numbers and $C$ is the set of prime numbers.

  1. a) List the elements of $A$, $B$ and $C$.
  2. b) Draw a three-set Venn diagram and place every element of $U$.
  3. c) List $(A \cup B) \cap C'$.
Solve
Practice★★★Not started
In a group of 100 students, 45 study French, 40 study German and 35 study Spanish. 15 study French and German, 12 study German and Spanish, 10 study French and Spanish,…

In a group of 100 students, 45 study French, 40 study German and 35 study Spanish. 15 study French and German, 12 study German and Spanish, 10 study French and Spanish, and 5 study all three.

  1. a) Draw a three-set Venn diagram showing the number in each region.
  2. b) How many study none of the three languages?
  3. c) A student is chosen at random. Find the probability that they study exactly one language.
Solve

Problems with unknowns

Sometimes a region contains an unknown. Write each region as an expression in $x$. The regions must add up to $\#U$, which gives an equation to solve.

(Answer: $\#(A \cup B) = 35$, and $P = \frac{20}{45} = \frac{4}{9}$.)

Practice★★★Not started
$\#U = 50$, $\#A = 3x$, $\#B = 2x + 4$, $\#(A \cap B) = x$ and $\#(A \cup B)' = 10$. a) Write an expression for $\#(A \cup B)$ in terms of $x$. b) Form and solve an…

$\#U = 50$, $\#A = 3x$, $\#B = 2x + 4$, $\#(A \cap B) = x$ and $\#(A \cup B)' = 10$.

  1. a) Write an expression for $\#(A \cup B)$ in terms of $x$.
  2. b) Form and solve an equation to find $x$.
  3. c) Hence find $\#(A \setminus B)$ and $\#(B \setminus A)$.
Solve

Complements of unions and intersections

Two results connect complements with $\cup$ and $\cap$. They are true for all sets $A$ and $B$:

$$(A \cup B)' = A' \cap B' \qquad (A \cap B)' = A' \cup B'$$

Why? Number the four regions of the Venn diagram.

Two-set Venn diagram with regions numbered 1 (A only), 2 (both), 3 (B only) and 4 (neither). U A B 1 2 3 4
  • $A \cup B$ is regions 1, 2, 3, so $(A \cup B)'$ is region 4. And $A'$ is regions 3, 4 while $B'$ is regions 1, 4, so $A' \cap B'$ is also region 4. ✓

  • $A \cap B$ is region 2, so $(A \cap B)'$ is regions 1, 3, 4. $A' \cup B'$ is regions 3, 4 together with 1, 4, which is again regions 1, 3, 4. ✓

Practice★★★Not started
For any sets $A$ and $B$ in a universal set $U$: a) Shade on Venn diagrams the sets $(A \cup B)'$ and $A' \cap B'$, and describe what you observe. b) Verify that…

For any sets $A$ and $B$ in a universal set $U$:

  1. a) Shade on Venn diagrams the sets $(A \cup B)'$ and $A' \cap B'$, and describe what you observe.
  2. b) Verify that $(A \cap B)' = A' \cup B'$ for $U = \{1, \dots, 12\}$, $A = \{1, 2, 3, 4, 5, 6\}$ and $B = \{4, 5, 6, 7, 8, 9\}$.
  3. c) Explain why verifying with one example does not prove the result in general.
Solve

Summary

  • A set is written $\{\dots\}$. Use $\in$ for an element, $\subset$ for a subset and $\#A$ for the number of elements.

  • $A \cup B$ is "or", $A \cap B$ is "and", $A \setminus B$ is "in $A$ not $B$", $A'$ is "not in $A$".

  • Fill Venn diagrams from the middle outwards, and check that all regions add up to $\#U$.

  • $\#(A \cup B) = \#A + \#B - \#(A \cap B)$. With three sets, take care to subtract the centre.

  • Probability from a Venn diagram: number in the region $\div\ \#U$.

  • $(A \cup B)' = A' \cap B'$ and $(A \cap B)' = A' \cup B'$. An example verifies, but only an argument for all sets proves.

Back to the start: with 20 in the choir and 15 in the band out of 30, at least $20 + 15 - 30 = 5$ students must be in both.

See all the exercises in this section