Two operations that trip up almost every student in a sets chapter: set difference A - B and symmetric difference A \triangle B. The names rhyme, the symbols are one character apart, and both "remove the overlap" in some sense. A side-by-side picture settles the difference in a glance — one shades a single crescent, the other shades two.
The two definitions
In words: A - B keeps what is in A but not B; A \triangle B keeps what is in exactly one of the two sets, regardless of which one. The second operation is completely symmetric in A and B; the first prefers A.
Why "symmetric": swap A and B in A \triangle B and nothing changes, because "exactly one of the two" does not care which is first. Swap them in A - B and you get a different set, B - A.
The side-by-side picture
Drag the slider to move the right circle B across the rectangle. Two Venn diagrams appear — left shows A - B shaded, right shows A \triangle B shaded. The shaded regions are plainly different whenever the two circles overlap.
The picture shows the structural fact cleanly: A \triangle B is the union of two set differences.
If you shade only the first term, you get the left diagram. Add the second term and you get the right.
A numerical example
Take A = \{1, 2, 3, 4\} and B = \{3, 4, 5, 6\}.
| Operation | Result |
|---|---|
| A - B | \{1, 2\} |
| B - A | \{5, 6\} |
| A \triangle B | \{1, 2, 5, 6\} |
The symmetric difference has twice the elements of A - B, because it collects both the "A-only" and "B-only" pieces. If you ran the same problem with A = B, then A - B = \varnothing and A \triangle B = \varnothing would agree — but that is a coincidence of the equal-sets case, not a general rule.
Cardinality formulas
Both operations have clean counting rules.
Notice the factor of 2 in the second formula. That is the signature of symmetric difference — you subtract the overlap twice because it appears in both |A| and |B| and must be removed from both crescents.
Why twice: each overlap element gets counted once in |A| and once in |B|. Neither appearance belongs to A \triangle B, so you remove both. Inclusion-exclusion only removes the overlap once because the union includes it; symmetric difference excludes it.
Commutativity — the other big divider
Set difference is not commutative: A - B \neq B - A in general. Drag the slider far enough and you could swap the circle labels, and the left diagram would shade the right crescent instead — a completely different set.
Symmetric difference is commutative: swapping A and B in A \triangle B leaves the shaded region unchanged (both crescents, regardless of which one you call A - B). This symmetry is not a detail — it is the whole reason the operation deserves its own name.
When are they equal?
Only in two special cases.
- Disjoint sets. If A \cap B = \varnothing, then B - A is empty, so A \triangle B = A - B \cup \varnothing = A - B = A. The slider shows this: push the circles fully apart and both diagrams shade the same region (the whole of A).
- B \subseteq A. If every element of B is already in A, then again B - A = \varnothing and the two operations agree, both equal to A - B.
In all other cases the two operations give different sets, and the size gap is |B - A|.
A worked JEE-style problem
$A = \{x \in \mathbb{N} : x \le 8\}$ and $B = \{x \in \mathbb{N} : 4 \le x \le 10\}$. Find $A - B$, $A \triangle B$, and their cardinalities.
Step 1. Roster the two sets.
Step 2. Find A - B: keep elements of A not in B.
Why: walk through A and drop any element that also appears in B. Elements 4 through 8 appear in B, leaving \{1, 2, 3\}.
Step 3. Find B - A.
Step 4. Union the two to get A \triangle B.
Cardinality check. |A| + |B| - 2|A \cap B| = 8 + 7 - 2 \cdot 5 = 5. Match.
Result. A - B = \{1, 2, 3\} (three elements) and A \triangle B = \{1, 2, 3, 9, 10\} (five elements). The difference is the two extra elements from B - A that the symmetric difference captures but set difference does not.
The two answers differ by exactly |B - A| = 2 elements — which is what the side-by-side Venn picture predicts.
Why the confusion persists
The English vocabulary betrays both operations. "Set difference" suggests subtraction — but subtraction of numbers is not commutative, so students correctly infer that A - B and B - A differ. "Symmetric difference" sounds like "the thing that makes it symmetric" — which it does, but at the cost of adding back the other crescent, not by merely reversing directions.
The picture dissolves both confusions. Whenever a question asks for "everything in A but not B," you want one crescent — A - B. Whenever it asks for "everything that is in exactly one set" or "the disagreement between the two," you want both crescents — A \triangle B.
Related: Set Operations · Symmetric Difference · A − B vs A ∩ B′ · Animated Venn Diagrams