The Basic Inclusion-Exclusion for Two Sets
What you'll learn: You'll discover why combining two sets requires subtracting their overlap to avoid double-counting.
The Core Problem
When you try to count how many elements are in the union of two sets A and B, your first instinct might be to simply add their sizes: |A| + |B|. But there's a hidden trap—if A and B share any common elements, you've counted those elements twice!
The Inclusion-Exclusion Formula
The correct formula is:
|A ∪ B| = |A| + |B| - |A ∩ B|
Here's why: When you add |A| + |B|, every element in the intersection A ∩ B gets included once from set A and once from set B. Since those elements should only be counted once in the union, we subtract |A ∩ B| to compensate.
A Concrete Example
Suppose you're counting students:
- Set A: 30 students taking French
- Set B: 25 students taking Spanish
- A ∩ B: 10 students taking both languages
If you naively add 30 + 25 = 55, you've counted the 10 bilingual students twice. The correct count is:
|A ∪ B| = 30 + 25 - 10 = 45 students
Visualizing with Venn Diagrams
Draw two overlapping circles. The overlapping region appears in both circles, so when you sum the circle areas separately, that middle piece gets added twice. Subtracting it once corrects your count.
Why "Inclusion-Exclusion"?
We include all elements from both sets, then exclude the overlap we accidentally counted twice. This principle extends to more sets (which you'll see later), but for two sets, it's this beautifully simple correction.
Key Takeaway: The formula |A ∪ B| = |A| + |B| - |A ∩ B| corrects for double-counting by subtracting the overlap exactly once.