- Practice
- About 20 min
- 5 practice questions
De Morgan's laws and counting with n(A ∪ B)
State and verify De Morgan's laws for set difference and for complementation, and use the cardinality formulas for two and three sets to solve word problems.
If something looks wrong, please tell us.
By the end of this lesson you can
- State and verify De Morgan's laws for set difference and for complementation.
- Use n(A ∪ B) = n(A) + n(B) − n(A ∩ B) and related formulas.
- Solve two-set and three-set word problems with a Venn diagram.
The British mathematician Augustus De Morgan (1806 to 1871) described two pairs of laws that link union, intersection, difference and complement. They are used in logic and computer science as well as in mathematics. After them we turn to counting: how many people are in a group when some of them belong to two groups at once?
De Morgan's laws
| Laws for set difference (any sets A, B, C) | Laws for complementation (A, B subsets of U) |
|---|---|
| A − (B ∪ C) = (A − B) ∩ (A − C) | (A ∪ B)′ = A′ ∩ B′ |
| A − (B ∩ C) = (A − B) ∪ (A − C) | (A ∩ B)′ = A′ ∪ B′ |
The pattern is the same in both pairs: when you 'take away' or 'complement' a union, it becomes an intersection, and a union becomes an intersection the other way round. In words: 'not (in A or in B)' is the same as 'not in A and not in B'.
(A ∪ B)′ = A′ ∩ B′ and (A ∩ B)′ = A′ ∪ B′: the complement turns ∪ into ∩ and ∩ into ∪.
Worked example 1: verifying a complement law
Let U = {1, 2, 3, 4, 5, 6, 7, 8}, A = {1, 2, 3, 4} and B = {3, 4, 5, 6}. Verify (A ∪ B)′ = A′ ∩ B′. Left side: A ∪ B = {1, 2, 3, 4, 5, 6}, so (A ∪ B)′ = {7, 8}. Right side: A′ = {5, 6, 7, 8} and B′ = {1, 2, 7, 8}, so A′ ∩ B′ = {7, 8}. Both sides are {7, 8}.
Worked example 2: verifying a difference law
Let A = {1, 2, 3, 4, 5, 6}, B = {2, 4, 6, 8} and C = {3, 6, 9}. Verify A − (B ∩ C) = (A − B) ∪ (A − C). Left side: B ∩ C = {6}, so A − {6} = {1, 2, 3, 4, 5}. Right side: A − B = {1, 3, 5} and A − C = {1, 2, 4, 5}, so their union is {1, 2, 3, 4, 5}. Both sides agree.
Cardinality formulas
- n(A ∪ B) = n(A) + n(B) − n(A ∩ B). We subtract n(A ∩ B) because the common elements were counted twice.
- n(A − B) = n(A) − n(A ∩ B) and n(B − A) = n(B) − n(A ∩ B).
- n(A′) = n(U) − n(A), so n(U) = n(A) + n(A′).
- If A and B are disjoint, n(A ∪ B) = n(A) + n(B).
- For three sets: n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(B ∩ C) − n(A ∩ C) + n(A ∩ B ∩ C).
Solving a word problem with a Venn diagram
- Name the sets Let each group be a set, e.g. T = tea drinkers.
- Fill the centre first Write the number in all the sets.
- Work outwards Subtract to get 'exactly two' and then 'only one' regions.
- Add the regions Answer the question that was asked.
Worked example 3: a two-set problem (made-up data)
In a group of people, 70 drink tea, 50 drink coffee and 25 drink both, and everyone drinks at least one of them. Working: only tea = 70 − 25 = 45; only coffee = 50 − 25 = 25. Total = n(T ∪ C) = 70 + 50 − 25 = 95 people. Check: 45 + 25 + 25 = 95.
Worked example 4: a three-set problem (made-up data)
In a club of students, 40 like music (M), 35 like dance (D) and 30 like painting (P). 15 like M and D, 12 like D and P, 10 like M and P, and 6 like all three. Everyone likes at least one. Working: n(M ∪ D ∪ P) = 40 + 35 + 30 − 15 − 12 − 10 + 6 = 105 − 37 + 6 = 74 students. Regions: exactly M and D = 15 − 6 = 9; exactly D and P = 12 − 6 = 6; exactly M and P = 10 − 6 = 4. Only M = 40 − 9 − 4 − 6 = 21; only D = 35 − 9 − 6 − 6 = 14; only P = 30 − 6 − 4 − 6 = 14. Check: 21 + 14 + 14 + 9 + 6 + 4 + 6 = 74.
Key takeaways: De Morgan's laws swap ∪ and ∩ when you take a complement or a difference; n(A ∪ B) = n(A) + n(B) − n(A ∩ B) stops double counting; in three-set problems always fill the Venn diagram from the centre outwards and check that the regions add to the total.
Check your understanding
-
1. Which of these is one of De Morgan's laws?
- (A ∪ B)′ = A′ ∪ B′
- (A ∩ B)′ = A′ ∩ B′
- (A ∪ B)′ = A′ ∩ B′
- A − (B ∪ C) = (A − B) ∪ (A − C)
Show answer
Answer: C. The complement of a union is the intersection of the complements: (A ∪ B)′ = A′ ∩ B′. The others keep the wrong symbol; the correct difference law is A − (B ∪ C) = (A − B) ∩ (A − C).
-
2. If n(A) = 20, n(B) = 15 and n(A ∩ B) = 8, what is n(A ∪ B)?
- 35
- 43
- 27
- 23
Show answer
Answer: C. n(A ∪ B) = n(A) + n(B) − n(A ∩ B) = 20 + 15 − 8 = 27. Adding without subtracting gives 35, which counts the 8 common elements twice.
-
3. If n(U) = 50 and n(A) = 32, what is n(A′)?
- 18
- 82
- 32
- 50
Show answer
Answer: A. n(A′) = n(U) − n(A) = 50 − 32 = 18.
-
4. If n(A) = 30, n(A ∪ B) = 45 and n(A ∩ B) = 10, what is n(B)?
- 15
- 35
- 20
- 25
Show answer
Answer: D. From n(A ∪ B) = n(A) + n(B) − n(A ∩ B): 45 = 30 + n(B) − 10, so 45 = 20 + n(B), giving n(B) = 25. Check: 30 + 25 − 10 = 45.
-
5. In a made-up survey of 60 students, 35 play kabaddi, 30 play kho-kho and every student plays at least one. How many play both?
- 5
- 25
- 65
- 10
Show answer
Answer: A. n(K ∩ H) = n(K) + n(H) − n(K ∪ H) = 35 + 30 − 60 = 5. Check: only kabaddi 30, only kho-kho 25, both 5, total 60.
Sign in to keep track of the lessons you finish.