There are 28 students in a class. 15 of them go to football, 12 go to swimming and 5 go to both. How many go to neither?
If you add 15 + 12, you get 27. It looks as if only one student goes to neither club. But that is wrong! Five students go to both clubs, so we counted them twice. This is where a picture invented in the 19th century by the English mathematician John Venn helps.
The rectangle stands for the universal set U — everything we are talking about (for example all the students in a class). In UK exams it is often labelled ξ.
Each set is a circle inside the rectangle.
The circles overlap. The overlap holds the elements that belong to both sets.
The four parts of the diagram
Two circles split the rectangle into four parts:
Part
Who is in it
Notation
1
only in A
A ∖ B
2
in A and in B
A ∩ B
3
only in B
B ∖ A
4
in neither A nor B
(A ∪ B)′
Every element of the universal set lies in exactly one of these four parts. That is the whole secret of Venn diagrams.
Operations in the diagram
Every operation can be shown by shading some of the parts:
Set
Shaded parts
A
1, 2
A ∩ B
2
A ∪ B
1, 2, 3
A ∖ B
1
A′
3, 4
(A ∪ B)′
4
(A ∩ B)′
1, 3, 4
How to shade a combined expression
With a combined expression, do not guess the shape. Go through all four parts and ask for each one whether it belongs to the set.
Worked example 1
Shade the set A′ ∩ B.
A′ ∩ B contains the elements that are not in A and are in B.
Part 1 (only A): it is in A → does not belong.
Part 2 (A and B): it is in A → does not belong.
Part 3 (only B): not in A and in B → belongs.
Part 4 (outside): not in B → does not belong.
Shade only part 3. A′ ∩ B is the same as B ∖ A.
The number of elements in a union
The number of elements of a set A is written n(A) (some books write |A|). For two sets:
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
Why minus? The elements of the intersection are counted in n(A) and in n(B), so twice. We therefore subtract them once.
Word problems step by step
Back to the problem from the beginning: 28 students, football 15, swimming 12, both 5.
Method: fill in the diagram from the middle.
The middle (both): 5 students.
Only football: 15 − 5 = 10. (Of the 15 footballers, 5 also swim.)
Only swimming: 12 − 5 = 7.
At least one club: 10 + 5 + 7 = 22. Using the formula gives the same: 15 + 12 − 5 = 22.
Neither club: 28 − 22 = 6 students.
💡 Check: all four numbers in the diagram must add up to the total. 10 + 5 + 7 + 6 = 28 ✓.
Worked example 2
40 families answered a survey. 18 families have a dog, 14 have a cat and 15 have neither a dog nor a cat. How many families have both a dog and a cat?
At least one pet: 40 − 15 = 25 families. This is n(A ∪ B).
By the formula 25 = 18 + 14 − n(A ∩ B).
n(A ∩ B) = 18 + 14 − 25 = 7 families.
Check: only a dog 18 − 7 = 11, only a cat 14 − 7 = 7, both 7, neither 15. Total 11 + 7 + 7 + 15 = 40 ✓.
Common mistakes
Adding without subtracting the overlap: 15 + 12 is not the number of students in the clubs, because the overlap is counted twice.
Reading “15 go to football” as “only football”: the 15 includes those who also swim.
Forgetting the part outside the circles: not every element of U has to be in one of the sets.
Filling in from the outside: always start with the overlap, then “only A” and “only B”.
Summary
Rectangle = universal set U (or ξ), circles = sets.
Two circles make 4 parts: only A, A and B, only B, outside.
When shading, go through every part and decide whether it belongs to the set.
n(A ∪ B) = n(A) + n(B) − n(A ∩ B).
Word problems: fill in from the middle, then check the total.
Try it yourself
Which parts (1–4) do you shade for the set A ∪ B′?
n(A) = 20, n(B) = 13, n(A ∩ B) = 6. What is n(A ∪ B)?
There are 30 students in a class. 24 learn French, 11 learn Spanish and 8 learn both. How many students learn neither language?
35 students went on a school trip. 20 bought ice cream, 18 bought lemonade and 5 bought neither. How many students bought both?
Answers
Parts 1 and 2 (they are in A) and part 4 (it is not in B). So parts 1, 2, 4 — everything except “only B”.
n(A ∪ B) = 20 + 13 − 6 = 27.
At least one language: 24 + 11 − 8 = 27. Neither: 30 − 27 = 3 students.
At least one: 35 − 5 = 30. Both: 20 + 18 − 30 = 8 students.