Junior Cycle Maths

Number · Chapter 10

Sets and Venn diagrams

Clear notes, 9 worked examples and 8 questions to try.

01 · Understand the idea

The essentials

Key terms

Universal set
All elements under consideration, usually labelled U.
Complement
Elements in U that are not in the named set.
Cardinality
The number of elements in a finite set.
Empty set
A set with no elements.

Key ideas

  • A set is a collection of distinct elements. State the universal set before finding a complement.
  • A∪B\displaystyle A\cup B means in A or B or both. A∩B\displaystyle A\cap B means in both. A∖B\displaystyle A\setminus B means in A but not B.
  • Fill a Venn diagram from the most specific overlap outwards: the triple intersection first, then pair-only regions, then one-set-only regions.
  • For two sets, n(A∪B)=n(A)+n(B)−n(A∩B)\displaystyle n(A\cup B)=n(A)+n(B)-n(A\cap B). Subtract the union from the universal total to find neither.
  • Union and intersection are commutative and associative. These laws regroup sets; they do not change which elements belong.
  • A subset contains only elements of another set: A⊆B\displaystyle A\subseteq B. Distinguish an element belonging to a set, x∈A\displaystyle x\in A, from a set being a subset.
  • For three sets, n(A∪B∪C)=n(A)+n(B)+n(C)−n(A∩B)−n(A∩C)−n(B∩C)+n(A∩B∩C)\displaystyle n(A\cup B\cup C)=n(A)+n(B)+n(C)-n(A\cap B)-n(A\cap C)-n(B\cap C)+n(A\cap B\cap C).
Four separate regions: A only, both A and B, B only, and neither. Together they make the universal set.

03 · Follow the working

Worked examples

Read the question first. Cover the working and decide what you would do next.

New step-by-step examples

Two-set Venn diagrams
AB9564
The middle belongs to both sets. The 4 is outside both, but inside the universal set.

In a class of 24, 14 play A, 11 play B and 5 play both. How many play neither?

14−5=914-5=9

These play only A.

11−5=611-5=6

These play only B.

9+5+6=209+5+6=20

The union counts each person once.

Final answer24−20=424-20=4
Three sets and notation
ABC53
The 5 is in A and B only. The 3 in the centre is in all three sets.

A and B have 8 members in common. Of these, 3 also belong to C. Find the number in A and B but not C.

#(A∩B)=8\#(A\cap B)=8

The pair intersection includes the centre.

#(A∩B∩C)=3\#(A\cap B\cap C)=3

Subtract the triple intersection.

Final answer8−3=58-3=5
Does order matter in a set operation?

Use A = {1, 2}, B = {2, 3}, C = {2, 4}. Compare the two bracketings of intersection, and compare the two orders of set difference.

(A∩B)∩C={2}(A\cap B)\cap C=\{2\}

Intersect A and B first.

A∩(B∩C)={2}A\cap(B\cap C)=\{2\}

Intersect B and C first.

A∖B={1},B∖A={3}A\setminus B=\{1\},\quad B\setminus A=\{3\}

Keep only members of the first set that are not in the second.

Final answerIntersection matches; difference does not.\text{Intersection matches; difference does not.}
01Two-set Venn diagrams

In a group of 20\displaystyle 20 students,12\displaystyle , 12 play football,12\displaystyle , 12 play hockey, and 5\displaystyle 5 play both. How many play football only?

Two-set Venn diagram for 20 students. Football only: 7. Both: 5. Hockey only: 7. Neither: 1.

Why this method? Identify which region or operation the question asks for. Count each element or person only in the regions where they belong.

  1. Football total =\displaystyle = football only +\displaystyle + both.
    Why?The 12\displaystyle 12 football players already include the 5\displaystyle 5 who play both sports.
  2. 12=football only+5\displaystyle 12=\text{football only}+5
    Why?Put the given numbers into that relationship.
  3. football only=12−5=7\displaystyle \text{football only}=12-5=7
    Why?Subtract the overlap once to leave only the football-only region.

Think about it: Before moving on: why must the overlap be taken away from each circle total?

02Set notation: union, intersection and difference

A={3,5,6,7,11,12}\displaystyle A = \left\{3 , 5 , 6 , 7 , 11 , 12\right\} and B={2,4,5,7,8,11,12}\displaystyle B = \left\{2 , 4 , 5 , 7 , 8 , 11 , 12\right\}. How many elements are in A∪B\displaystyle A \cup B?

Venn diagram matching the sets in this question. A only: [3, 6]. Both: [5, 7, 11, 12]. B only: [2, 4, 8].

Why this method? Identify which region or operation the question asks for. Count each element or person only in the regions where they belong.

  1. A∪B={2,3,4,5,6,7,8,11,12}\displaystyle A \cup B = \left\{2 , 3 , 4 , 5 , 6 , 7 , 8 , 11 , 12\right\}
    Why?A∪B\displaystyle A \cup B contains every element in A or in B, each listed once
  2. 9\displaystyle 9 elements
    Why?Count the elements

Think about it: Before moving on: why is an element that is in both sets listed only once in A∪B\displaystyle A \cup B?

03Complement and universal set

The universal set is U={1,2}\displaystyle U = \left\{1 , 2\right\} …,12}\displaystyle , 12 \}. A={2,6,8,12}\displaystyle A = \left\{2 , 6 , 8 , 12\right\}. How many elements are in A′, the complement of A?

Universal set U = {1, …, 12} drawn as a rectangle, with A = {2, 6, 8, 12} as a circle inside it. The complement A′ is the part of U outside the circle, with 8 elements.

Why this method? Identify which region or operation the question asks for. Count each element or person only in the regions where they belong.

  1. A′ ={1,3,4,5,7,9,10,11}\displaystyle = \left\{1 , 3 , 4 , 5 , 7 , 9 , 10 , 11\right\}
    Why?The complement is the elements of U that are not in A
  2. 12−4=8\displaystyle 12 - 4 = 8
    Why?Count the elements of A′

Think about it: Before moving on: why is A′ found by taking A away from U rather than by adding A to U?

04Cardinal number and the null set

Hannah writes the set A={2,2,9,12}\displaystyle A = \left\{2 , 2 , 9 , 12\right\}. What is n(A), the number of elements in A?

Why this method? Identify which region or operation the question asks for. Count each element or person only in the regions where they belong.

  1. Different elements:{2,9,12}\displaystyle : \left\{2 , 9 , 12\right\}
    Why?Each element of a set is counted once, even if it is written more than once
  2. n(A)=3\displaystyle n \left(A\right) = 3
    Why?Count the different elements

Think about it: Before moving on: why is the null set not the same as the set {0}\displaystyle \left\{0\right\}?

05Union of three sets

In a school,14\displaystyle , 14 students take Art,17\displaystyle , 17 take Music and 13\displaystyle 13 take Drama. 4\displaystyle 4 take Art and Music,7\displaystyle , 7 take Music and Drama, and 3\displaystyle 3 take Art and Drama. 1\displaystyle 1 student takes all three. How many students take at least one of the three subjects? The pairwise counts include those who are in all three sets.

Why this method? Identify which region or operation the question asks for. Count each element or person only in the regions where they belong.

  1. 14+17+13=44\displaystyle 14 + 17 + 13 = 44
    Why?Add the three set totals
  2. 44−(4+7+3)=30\displaystyle 44 - \left(4 + 7 + 3\right) = 30
    Why?Take off each pairwise overlap once
  3. 30+1=31\displaystyle 30 + 1 = 31
    Why?Add back the triple overlap, which was taken off three times and must be counted once

Think about it: Before moving on: why is the triple overlap added back, and why is it added only once?

06None of three sets

In a survey of students, the universal set contains 71\displaystyle 71 people. Set A has 21,\displaystyle 21 , set B has 30,\displaystyle 30 , and set C has 38\displaystyle 38. There are 3\displaystyle 3 in A and B,9\displaystyle B , 9 in A and C, and 9\displaystyle 9 in B and C. Each pairwise count includes everyone in all three sets. There are 3\displaystyle 3 in all three sets. How many people are in none of A, B or C?

Why this method? Identify which region or operation the question asks for. Count each element or person only in the regions where they belong.

  1. 21+30+38−(3+9+9)+3=71\displaystyle 21 + 30 + 38 - \left(3 + 9 + 9\right) + 3 = 71
    Why?Count the union: add set totals, subtract inclusive pair counts, add back the triple
  2. 71−71=0\displaystyle 71 - 71 = 0
    Why?Take the complement in the stated universal set
  3. A only 12\displaystyle 12; B only 21\displaystyle 21; C only 23\displaystyle 23; A and B only 0\displaystyle 0; A and C only 6\displaystyle 6; B and C only 6\displaystyle 6; all three 3\displaystyle 3; none 0\displaystyle 0. Total 71\displaystyle 71.
    Why?Check all eight disjoint regions total the universal set

Think about it: Why must the universal-set total be known, and why is the triple intersection added back before finding the complement?

07None of three sets — another example

In a survey of students, the universal set contains 69\displaystyle 69 people. Set A has 26,\displaystyle 26 , set B has 26,\displaystyle 26 , and set C has 30\displaystyle 30. There are 4\displaystyle 4 in A and B,8\displaystyle B , 8 in A and C, and 7\displaystyle 7 in B and C. Each pairwise count includes everyone in all three sets. There are 3\displaystyle 3 in all three sets. How many people are in none of A, B or C?

Why this method? Identify which region or operation the question asks for. Count each element or person only in the regions where they belong.

  1. 26+26+30−(4+8+7)+3=66\displaystyle 26 + 26 + 30 - \left(4 + 8 + 7\right) + 3 = 66
    Why?Count the union: add set totals, subtract inclusive pair counts, add back the triple
  2. 69−66=3\displaystyle 69 - 66 = 3
    Why?Take the complement in the stated universal set
  3. A only 17\displaystyle 17; B only 18\displaystyle 18; C only 18\displaystyle 18; A and B only 1\displaystyle 1; A and C only 5\displaystyle 5; B and C only 4\displaystyle 4; all three 3\displaystyle 3; none 3\displaystyle 3. Total 69\displaystyle 69.
    Why?Check all eight disjoint regions total the universal set
08Commutative set operations

A={a,b,g},B={a,d,f,g}\displaystyle A = \left\{a , b , g\right\} , B = \left\{a , d , f , g\right\}. Is A∪B\displaystyle A \cup B the same as B∪A\displaystyle B \cup A?

Why this method? Identify which region or operation the question asks for. Count each element or person only in the regions where they belong.

  1. A∪B={a,b,d,f,g}\displaystyle A \cup B = \left\{a , b , d , f , g\right\}
    Why?Work out A∪B\displaystyle A \cup B
  2. B∪A={a,b,d,f,g}\displaystyle B \cup A = \left\{a , b , d , f , g\right\}
    Why?Work out B∪A\displaystyle B \cup A
  3. They are the same, so the operation is commutative for these sets.
    Why?Compare the two results

Think about it: Before moving on: which of union, intersection and difference give the same answer when the sets are swapped, and why?

09Associative set operations

A={a,e,f,h},B={c,f,g,h},C={e,f}\displaystyle A = \left\{a , e , f , h\right\} , B = \left\{c , f , g , h\right\} , C = \left\{e , f\right\}. Is (A∪B)∪C\displaystyle \left(A \cup B\right) \cup C the same as A∪(B∪C)\displaystyle A \cup \left(B \cup C\right)?

Why this method? Identify which region or operation the question asks for. Count each element or person only in the regions where they belong.

  1. (A∪B)∪C={a,c,e,f,g,h}\displaystyle \left(A \cup B\right) \cup C = \left\{a , c , e , f , g , h\right\}
    Why?Work out A∪B\displaystyle A \cup B first, then ∪C\displaystyle \cup C
  2. A∪(B∪C)={a,c,e,f,g,h}\displaystyle A \cup \left(B \cup C\right) = \left\{a , c , e , f , g , h\right\}
    Why?Work out B∪C\displaystyle B \cup C first, then A∪\displaystyle A \cup
  3. They are the same, so the operation is associative for these sets.
    Why?Compare the two results

Think about it: Before moving on: which operations let you move the brackets without changing the answer, and what does that mean for the order you do the work in?

Common mistake

Counting the overlap twice when finding how many are in A or B. If n(A)=12\displaystyle n(A)=12, n(B)=10\displaystyle n(B)=10 and n(A∩B)=4\displaystyle n(A\cap B)=4, the total is 12+10−4=18\displaystyle 12+10-4=18, not 22\displaystyle 22.

Exam technique

Check that all disjoint regions add to the universal total.

Show your method, use units where appropriate and check whether the question asks for an exact or rounded answer.

04 · Try it yourself

Self-check questions

Work on paper first, then open the answer. These are practice questions, not submitted homework.

Question 1

In a group of 15\displaystyle 15 students,9\displaystyle , 9 play football,8\displaystyle , 8 play hockey, and 4\displaystyle 4 play both. How many play neither sport?

Two-set Venn diagram for 15 students. Football only: 5. Both: 4. Hockey only: 4. Neither: 2.
Show answer & check
2\displaystyle 2

Compare your result with the answer. If it differs, revisit a worked example and check each step.

Question 2

A={1,2,3,4}\displaystyle A = \left\{1 , 2 , 3 , 4\right\} and B={3,4,5}\displaystyle B = \left\{3 , 4 , 5\right\}. How many elements are in A∪B\displaystyle A \cup B?

Venn diagram matching the sets in this question. A only: [1, 2]. Both: [3, 4]. B only: [5].
Show answer & check
5\displaystyle 5

Compare your result with the answer. If it differs, revisit a worked example and check each step.

Question 3

The universal set is U={1,2}\displaystyle U = \left\{1 , 2\right\} …,12}\displaystyle , 12 \}. A={1,3,5,7,9}\displaystyle A = \left\{1 , 3 , 5 , 7 , 9\right\}. How many elements are in A′, the complement of A?

Universal set U = {1, …, 12} drawn as a rectangle, with A = {1, 3, 5, 7, 9} as a circle inside it. The complement A′ is the part of U outside the circle, with 7 elements.
Show answer & check
7\displaystyle 7

Compare your result with the answer. If it differs, revisit a worked example and check each step.

Question 4

The set B={4,4,6,9,9,9}\displaystyle B = \left\{4 , 4 , 6 , 9 , 9 , 9\right\}. What is n(B)?

Show answer & check
3\displaystyle 3

Compare your result with the answer. If it differs, revisit a worked example and check each step.

Question 5

In a club,20\displaystyle , 20 members play A,18\displaystyle A , 18 play B and 15\displaystyle 15 play C. 6\displaystyle 6 play A and B,4\displaystyle B , 4 play B and C, and 3\displaystyle 3 play A and C. 2\displaystyle 2 play all three. How many members play at least one of the three sports? The pairwise counts include those who are in all three sets.

  1. 66\displaystyle 66
  2. 40\displaystyle 40
  3. 53\displaystyle 53
  4. 42\displaystyle 42
Show answer & check
42\displaystyle 42

Correct:20+18+15−(6+4+3)+2=42\displaystyle : 20 + 18 + 15 - \left(6 + 4 + 3\right) + 2 = 42.

Question 6

In a survey of students, the universal set contains 73\displaystyle 73 people. Set A has 27,\displaystyle 27 , set B has 19,\displaystyle 19 , and set C has 20\displaystyle 20. There are 2\displaystyle 2 in A and B,3\displaystyle B , 3 in A and C, and 6\displaystyle 6 in B and C. Each pairwise count includes everyone in all three sets. There are 2\displaystyle 2 in all three sets. How many people are in none of A, B or C?

  1. 18\displaystyle 18
  2. 22\displaystyle 22
  3. 57\displaystyle 57
  4. 16\displaystyle 16
Show answer & check
16\displaystyle 16

Correct.

Question 7

A={1,2,3,4},B={3,4,5}\displaystyle A = \left\{1 , 2 , 3 , 4\right\} , B = \left\{3 , 4 , 5\right\}. Is A ∖ B the same as B ∖ A?

  1. Yes: the common elements cancel out
  2. Yes: the two results have different sizes
  3. Yes: the order of the sets never matters
  4. No: A ∖ B={1,2}\displaystyle B = \left\{1 , 2\right\} but B ∖ A={5}\displaystyle A = \left\{5\right\}
Show answer & check
No: A ∖ B={1,2}\displaystyle B = \left\{1 , 2\right\} but B ∖ A={5}\displaystyle A = \left\{5\right\}

Correct: A ∖ B={1,2}\displaystyle B = \left\{1 , 2\right\} and B ∖ A={5},\displaystyle A = \left\{5\right\} , so the difference is not commutative.

Question 8

A={1,2,3},B={2,3,4},C={3,5}\displaystyle A = \left\{1 , 2 , 3\right\} , B = \left\{2 , 3 , 4\right\} , C = \left\{3 , 5\right\}. Is (A ∖ B) ∖ C the same as A ∖ (B ∖ C)?

  1. Yes: the brackets can be ignored
  2. No: (A ∖ B) ∖ C={1}\displaystyle C = \left\{1\right\} but A ∖ (B ∖ C)={1,3}\displaystyle C ) = \left\{1 , 3\right\}
  3. Yes: the brackets never change the answer
  4. Yes: the answer depends on which set is first
Show answer & check
No: (A ∖ B) ∖ C={1}\displaystyle C = \left\{1\right\} but A ∖ (B ∖ C)={1,3}\displaystyle C ) = \left\{1 , 3\right\}

Correct: A ∖ B={1},\displaystyle B = \left\{1\right\} , so (A ∖ B) ∖ C={1}\displaystyle C = \left\{1\right\}; B ∖ C={2,4},\displaystyle C = \left\{2 , 4\right\} , so A ∖ (B ∖ C)={1,3}\displaystyle C ) = \left\{1 , 3\right\}.

Watch an explanation

Videos for this chapter

Choose one explanation, pause to work an example, then return to the notes. All Maths videos →

Classroom resources

Open slides & animated PowerPoint →
Open full-size image ↗
Enlarged maths diagram