Sets • Topic 3 of 3

Operations on Sets and Venn Diagrams

Four operations combine sets, all visualised cleanly with Venn diagrams (a rectangle for the universal set $U$, overlapping circles for the sets). Reading a Venn diagram is the fastest way to check any identity in this topic.

$$A \cup B = \{x : x \in A \text{ or } x \in B\} \qquad A \cap B = \{x : x \in A \text{ and } x \in B\}$$

Union $A \cup B$ collects everything in either set (the inclusive "or"). Intersection $A \cap B$ keeps only what is common to both. When $A \cap B = \varnothing$ the sets share nothing and are called disjoint (their circles do not overlap).

$$A - B = \{x : x \in A \text{ and } x \notin B\} \qquad A' = U - A = \{x : x \in U \text{ and } x \notin A\}$$

Difference $A - B$ keeps the part of $A$ outside $B$ (note $A - B \ne B - A$ in general). Complement $A'$ is everything in the universal set that is not in $A$; it is just the special difference $U - A$.

These operations obey algebraic laws that mirror ordinary arithmetic:

LawStatement
Commutative$A \cup B = B \cup A$,   $A \cap B = B \cap A$
Associative$(A \cup B) \cup C = A \cup (B \cup C)$
Distributive$A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$
Identity$A \cup \varnothing = A$,   $A \cap U = A$
Complement$A \cup A' = U$,   $A \cap A' = \varnothing$
De Morgan$(A \cup B)' = A' \cap B'$,   $(A \cap B)' = A' \cup B'$

A useful relation links difference and complement: $A - B = A \cap B'$. Also, if $A \subseteq B$ then $A \cup B = B$ and $A \cap B = A$.

Counting with the inclusion–exclusion formula: the size of a union is not simply $n(A) + n(B)$, because elements in both are counted twice. Subtract the overlap once:

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

For three sets the same logic gives:

$$n(A \cup B \cup C) = n(A)+n(B)+n(C) - n(A\cap B) - n(B\cap C) - n(A\cap C) + n(A\cap B\cap C)$$

Two corollaries solve most word problems. The number in at least one set is $n(A \cup B)$; the number in neither is $n(U) - n(A \cup B)$. The number who take exactly one of two sets is $n(A) + n(B) - 2\,n(A \cap B)$.

Deeper Insight — De Morgan and inclusion–exclusion are the two ideas worth real understanding: Most set-operation questions reduce to one of two things. First, De Morgan's laws capture how "not" interacts with "and"/"or": the complement of a union is the intersection of complements, and vice versa — the operation flips when negation passes through. This is not a quirk of sets; it is the same logic that governs negating compound statements ("not (rich and famous)" $=$ "not rich or not famous") and is reused directly in Probability and in digital logic. Second, the inclusion–exclusion formula exists for one reason: naive addition double-counts the overlap. Picture the Venn diagram and the correction term $-\,n(A\cap B)$ becomes self-evident — you are simply refusing to pay for the shared region twice. Almost every "how many students study at least one of …" word problem is this single formula in disguise, so understanding why the overlap is subtracted, rather than memorising the symbols, is what lets you extend it confidently to three sets and beyond.

Union and intersection shaded A ∪ B (union)AB A ∩ B (intersection)AB Difference and complement shaded A − B (difference)AB A' (complement)AU
1
Worked Example
Let $A = \{1,2,3,4,5\}$ and $B = \{2,4,6,8\}$. Find $A \cup B$, $A \cap B$ and $A - B$.
Solution
  1. $A \cup B$: everything in either $= \{1,2,3,4,5,6,8\}$.
  2. $A \cap B$: common elements $= \{2,4\}$.
  3. $A - B$: in $A$ but not $B = \{1,3,5\}$.

Answer: $A \cup B = \{1,2,3,4,5,6,8\}$, $A \cap B = \{2,4\}$, $A - B = \{1,3,5\}$.

2
Worked Example
In a class of $40$, $24$ play cricket, $18$ play football and $10$ play both. How many play at least one game?
Solution
  1. Use inclusion–exclusion: $n(C \cup F) = n(C) + n(F) - n(C \cap F)$.
  2. $= 24 + 18 - 10 = 32$.

Answer: $32$ students play at least one game (so $8$ play neither).

3
Worked Example
With $U = \{1,2,\dots,10\}$ and $A = \{2,4,6,8,10\}$, find $A'$.
Solution
  1. $A'$ is everything in $U$ but not in $A$.
  2. Remove the evens, leaving the odds.

Answer: $A' = \{1,3,5,7,9\}$.

4
Worked Example
Verify De Morgan's law $(A \cup B)' = A' \cap B'$ for $U=\{1,2,3,4,5\}$, $A=\{1,2\}$, $B=\{2,3\}$.
Solution
  1. $A \cup B = \{1,2,3\}$, so $(A \cup B)' = \{4,5\}$.
  2. $A' = \{3,4,5\}$, $B' = \{1,4,5\}$.
  3. $A' \cap B' = \{4,5\}$.
  4. Both sides equal $\{4,5\}$.

Answer: Verified: $(A \cup B)' = A' \cap B' = \{4,5\}$.

5
Worked Example
In a survey of $60$ people, $25$ read newspaper $H$, $26$ read $T$, $26$ read $I$, $9$ read both $H$ and $I$, $11$ read $H$ and $T$, $8$ read $T$ and $I$, and $3$ read all three. How many read at least one paper?
Solution
  1. Three-set inclusion–exclusion: $n(H\cup T\cup I) = n(H)+n(T)+n(I) - n(H\cap T) - n(T\cap I) - n(H\cap I) + n(H\cap T\cap I)$.
  2. $= 25 + 26 + 26 - 11 - 8 - 9 + 3$.
  3. $= 77 - 28 + 3 = 52$.

Answer: $52$ people read at least one newspaper.

6
Worked Example
If $n(A) = 20$, $n(B) = 28$ and $n(A \cup B) = 36$, find $n(A \cap B)$.
Solution
  1. Rearrange inclusion–exclusion: $n(A \cap B) = n(A) + n(B) - n(A \cup B)$.
  2. $= 20 + 28 - 36 = 12$.

Answer: $n(A \cap B) = 12$.

7
Worked Example
Verify the second De Morgan law $(A \cap B)' = A' \cup B'$ for $U=\{1,2,3,4,5,6\}$, $A=\{1,2,3,4\}$, $B=\{3,4,5\}$.
Solution
  1. $A \cap B = \{3,4\}$, so $(A \cap B)' = \{1,2,5,6\}$.
  2. $A' = \{5,6\}$, $B' = \{1,2,6\}$.
  3. $A' \cup B' = \{1,2,5,6\}$.
  4. Both sides match.

Answer: Verified: $(A \cap B)' = A' \cup B' = \{1,2,5,6\}$.

8
Worked Example
Verify the distributive law $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$ for $A=\{1,2,3,4\}$, $B=\{2,4,6\}$, $C=\{3,4,5\}$.
Solution
  1. LHS: $B \cup C = \{2,3,4,5,6\}$, so $A \cap (B \cup C) = \{2,3,4\}$.
  2. RHS: $A \cap B = \{2,4\}$ and $A \cap C = \{3,4\}$.
  3. $(A \cap B) \cup (A \cap C) = \{2,3,4\}$.
  4. LHS $=$ RHS.

Answer: Verified: both sides equal $\{2,3,4\}$.

9
Worked Example
In a group of $200$ students, $120$ like maths, $90$ like science and $50$ like both. Find how many like (a) at least one subject, (b) neither, (c) exactly one subject.
Solution
  1. (a) $n(M \cup S) = 120 + 90 - 50 = 160$.
  2. (b) Neither $= n(U) - n(M \cup S) = 200 - 160 = 40$.
  3. (c) Exactly one $= n(M) + n(S) - 2\,n(M \cap S) = 120 + 90 - 100 = 110$.

Answer: (a) $160$, (b) $40$, (c) $110$.

10
Worked Example
In a town, $40\%$ of families own a car, $60\%$ own a bike and $20\%$ own both. What percentage own neither?
Solution
  1. Work with percentages as set sizes out of $100$.
  2. $n(C \cup B) = 40 + 60 - 20 = 80$.
  3. Neither $= 100 - 80 = 20$.

Answer: $20\%$ of families own neither a car nor a bike.

Key Points

  • Union $\cup$ = "or" (everything in either); intersection $\cap$ = "and" (only common). Disjoint sets have $A \cap B = \varnothing$.
  • Difference $A - B$ keeps $A$ outside $B$, and $A - B = A \cap B'$; complement $A' = U - A$. Generally $A - B \ne B - A$.
  • Identity/complement laws: $A \cup \varnothing = A$, $A \cap U = A$, $A \cup A' = U$, $A \cap A' = \varnothing$.
  • If $A \subseteq B$ then $A \cup B = B$ and $A \cap B = A$.
  • De Morgan: $(A \cup B)' = A' \cap B'$ and $(A \cap B)' = A' \cup B'$ — negation flips the operation.
  • Two-set inclusion–exclusion: $n(A \cup B) = n(A) + n(B) - n(A \cap B)$; subtract the overlap so it is not double-counted.
  • Three-set version adds back the triple overlap: $n(A\cup B\cup C) = n(A)+n(B)+n(C) - n(A\cap B) - n(B\cap C) - n(A\cap C) + n(A\cap B\cap C)$.
  • Word-problem shortcuts: "neither" $= n(U) - n(A \cup B)$; "exactly one" $= n(A) + n(B) - 2\,n(A \cap B)$.
Tap an option to check your answer0 / 4
Q1.If $A=\{1,2\}$ and $B=\{2,3\}$, then $A\cup B=$
Explanation: Union collects all distinct elements.
Q2.For the same $A,B$, $A\cap B=$
Explanation: Intersection keeps common elements.
Q3.If $A=\{1,2,3\}$ and $B=\{2\}$, then $A-B=$
Explanation: $A-B$ removes from $A$ the elements of $B$.
Q4.By De Morgan's law, $(A\cup B)'=$
Explanation: $(A\cup B)'=A'\cap B'$.