02 // Visual Math & Finance Solvers|A ∪ B| = |A| + |B| − |A ∩ B|, |(A ∪ B)'| = |U| − |A ∪ B|
Visual Venn Diagram & Inclusion-Exclusion Set Calculator
For finite sets $A, B \subseteq U$, the Principle of Inclusion-Exclusion states that $|A \cup B| = |A| + |B| - |A \cap B|$, partitioning the universe into four disjoint regions: $A \setminus B$, $A \cap B$, $B \setminus A$, and $(A \cup B)^c$.
|A ∪ B| = |A| + |B| − |A ∩ B|, |(A ∪ B)'| = |U| − |A ∪ B|Inputs & Parameters (4)
5±1200
5±1200
0±1150
50±5500
Union |A ∪ B|
105
70% of Universe |U| = 150
Intersection |A ∩ B|
25
Jaccard Index J = 23.8%
Conditional P(A | B)
41.67%
25 / 60 | P(B|A) = 35.7%
Symmetric Diff |A Δ B|
80
Only A: 45, Only B: 35, Exterior: 45
20-Row Comparison Table
Compare across:
| # | Set |A| Cardinality | Union |A ∪ B| | P(A | B) | Symm Diff |A Δ B| |
|---|---|---|---|---|
| 01 | 5 | 60 | 8.33% | 55 |
| 02 | 15 | 60 | 25% | 45 |
| 03 | 26 | 61 | 41.67% | 36 |
| 04 | 36 | 71 | 41.67% | 46 |
| 05 | 46 | 81 | 41.67% | 56 |
| 06 | 56 | 91 | 41.67% | 66 |
| 07 | 67 | 102 | 41.67% | 77 |
| 08 | 77 | 112 | 41.67% | 87 |
| 09 | 87 | 122 | 41.67% | 97 |
| 10 | 97 | 132 | 41.67% | 107 |
| 11 | 108 | 143 | 41.67% | 118 |
| 12 | 118 | 153 | 41.67% | 128 |
| 13 | 128 | 163 | 41.67% | 138 |
| 14 | 138 | 173 | 41.67% | 148 |
| 15 | 149 | 184 | 41.67% | 159 |
| 16 | 159 | 194 | 41.67% | 169 |
| 17 | 169 | 204 | 41.67% | 179 |
| 18 | 179 | 214 | 41.67% | 189 |
| 19 | 190 | 225 | 41.67% | 200 |
| 20 | 200 | 235 | 41.67% | 210 |
Was this tool helpful?
Key Analytical Takeaways
- 01Adding $|A| + |B|$ double-counts the central lens $|A \cap B|$, which is why Inclusion-Exclusion subtracts $|A \cap B|$ once.
- 02The circle separation distance on the canvas updates dynamically in proportion to the Jaccard Similarity Index $J(A,B) = \frac{|A \cap B|}{|A \cup B|}$.
- 03De Morgan's Law guarantees that the exterior complement $|(A \cup B)^c| = |A^c \cap B^c| = |U| - |A \cup B|$.
Frequently Asked Questions
What happens if |A ∩ B| is set larger than |A| or |B|?+
Because an intersection cannot exceed the smaller of the two sets, it is mathematically clamped to min(|A|, |B|), representing one set being a complete subset of the other.
What is the Symmetric Difference (A Δ B) of two sets?+
It is the set of elements belonging to exactly one of the two sets (either A-only or B-only, excluding the overlap): |A Δ B| = |A| + |B| − 2|A ∩ B|.
What is De Morgan's Law on a two-set Venn diagram?+
De Morgan's Laws state that the complement of the union equals the intersection of complements, (A ∪ B)' = A' ∩ B', visually corresponding to the outer region outside both circles.