Read this lesson as text

Three-Set Formula

Combinatorics · Axiom Academy

Understanding the inclusion-exclusion principle for three sets First, we add up the sizes of all three individual sets: |A| + |B| + |C|. This gives us every element, but elements in overlapping regions get counted multiple times. 2. Subtract Pairwise Intersections Now we subtract the sizes of each pair's intersection: - |A ∩ B| - |A ∩ C| - |B ∩ C|. This corrects for double-counting in the two-set overlaps. 3. Add Back the Triple Intersection Finally, we add back the triple intersection: + |A ∩ B ∩ C|. This restores the correct count for elements in all three sets. 4. The Alternating Sign Pattern The inclusion-exclusion formula follows a beautiful pattern: add single sets (+), subtract pairs (-), add triples (+), and so on. This pattern extends to any number of sets!

This is the written version of the interactive lesson above. See the full Combinatorics course.