Venn diagrams and operations on sets
To compute with sets, we need operations , ways of combining two sets to make a new one. The three core operations are union, intersection and difference. Each has a clean Venn-diagram picture and obeys algebraic laws that mirror the laws of arithmetic.
Definitions
Let A and B be subsets of a universal set U.
- Union: A∪B={x:x∈A or x∈B}.
- Intersection: A∩B={x:x∈A and x∈B}.
- Difference: A−B=A∖B={x:x∈A and x∈/B}.
- Symmetric difference: A△B=(A−B)∪(B−A)=(A∪B)−(A∩B).
Two sets are disjoint if A∩B=∅.
Venn diagrams
A Venn diagram draws the universal set U as a rectangle and each set inside it as a region (usually a circle). The picture shows which elements lie in which set.
- A∪B: the entire shaded region of either circle.
- A∩B: the overlap.
- A−B: the part of A outside B.
- B−A: the part of B outside A.
A Venn diagram never proves a set identity (the picture might miss a case), but it is a powerful guide , if a claimed identity fails on the picture, it is wrong; if it holds on the picture, you should try to prove it algebraically.
The algebra of sets
For all sets A,B,C⊆U:
Commutative: A∪B=B∪A, A∩B=B∩A.
Associative: (A∪B)∪C=A∪(B∪C), (A∩B)∩C=A∩(B∩C).
Identity: A∪∅=A, A∩U=A.
Domination: A∪U=U, A∩∅=∅.
Idempotent: A∪A=A, A∩A=A.
Distributive:
A∪(B∩C)=(A∪B)∩(A∪C),
A∩(B∪C)=(A∩B)∪(A∩C).
Absorption: A∪(A∩B)=A, A∩(A∪B)=A.
Each law can be proved by the double-inclusion method. Let us prove one in detail.
Proof of distributivity: A∩(B∪C)=(A∩B)∪(A∩C)
(⊆) Let x∈A∩(B∪C). Then x∈A and x∈B∪C. So x∈B or x∈C.
- If x∈B: combined with x∈A, we get x∈A∩B, hence x∈(A∩B)∪(A∩C).
- If x∈C: similarly x∈A∩C⊆(A∩B)∪(A∩C).
Either way, x∈(A∩B)∪(A∩C).
(⊇) Let x∈(A∩B)∪(A∩C). Then x∈A∩B or x∈A∩C.
- If x∈A∩B: x∈A and x∈B⊆B∪C, so x∈A∩(B∪C).
- If x∈A∩C: x∈A and x∈C⊆B∪C, so x∈A∩(B∪C).
Either way x∈A∩(B∪C). By antisymmetry, equality holds. \qed
Disjoint sets
If A∩B=∅, then ∣A∪B∣=∣A∣+∣B∣. Disjoint unions are easy to count. When the intersection is non-empty, we must subtract the overlap , leading to the inclusion–exclusion formula in a later subtopic.
Worked examples
Example 1. Let A={1,2,3,4} and B={3,4,5,6}. Find A∪B, A∩B, A−B, B−A, A△B.
A∪B={1,2,3,4,5,6}, A∩B={3,4}, A−B={1,2}, B−A={5,6}, A△B={1,2,5,6}.
Example 2. Verify the distributive law for A={1,2}, B={2,3}, C={1,3}.
LHS: B∪C={1,2,3}, so A∩(B∪C)={1,2}. RHS: A∩B={2}, A∩C={1}, so (A∩B)∪(A∩C)={1,2}. They match.
Example 3. Prove A∪(A∩B)=A.
Clearly A⊆A∪(A∩B) (every set is a subset of itself unioned with anything). For the reverse, take x∈A∪(A∩B). Then x∈A or x∈A∩B. In the first case x∈A; in the second, x∈A∩B⊆A. Either way x∈A. \qed
Example 4. If A⊆B, show A∪B=B and A∩B=A.
For the first, A⊆B gives A∪B⊆B (since both A and B are subsets of B). Also B⊆A∪B trivially. So A∪B=B. For the second, A∩B⊆A always, and if x∈A then x∈B too (since A⊆B), so x∈A∩B. Hence A⊆A∩B and equality holds.
Example 5 (harder). Prove A△B=(A∪B)−(A∩B).
Take x∈A△B=(A−B)∪(B−A). Then x is in exactly one of A,B, so x∈A∪B but x∈/A∩B. Hence x∈(A∪B)−(A∩B).
Conversely, if x∈(A∪B)−(A∩B), then x∈A or x∈B, but not both. So x is in exactly one of A,B, i.e. x∈(A−B)∪(B−A)=A△B. \qed
Try it yourself
- Let A={a,b,c,d}, B={c,d,e,f}. Find A∪B, A∩B, A−B, B−A.
- Show A−B=A∩B′ where B′ is the complement in some U containing both.
- Verify A∪(B∩C)=(A∪B)∩(A∪C) for A={1,2}, B={2,3}, C={3,4}.
- Prove (A−B)∩B=∅.
- Draw Venn diagrams for A∩B∩C and A∪B∪C.
- Prove (A∪B)−C=(A−C)∪(B−C).
- If A⊆B, prove A−C⊆B−C.
- Find A△A and A△∅.
- Prove A−(A−B)=A∩B.
- Show A∩(B−A)=∅.
- Find sets A,B such that A−B=B−A. What does this force?
- Prove the absorption law A∩(A∪B)=A.
Pitfalls / Tricks
- A−B keeps only what is in A but not in B. Order matters: A−B=B−A in general.
- "or" in A∪B is inclusive: x can be in A, in B, or in both. Set-theoretic "or" is never exclusive.
- Venn diagrams help intuition but are not proofs. Always confirm an identity by the double-inclusion argument.
- Insight. Set operations mirror logic: ∪ is "or", ∩ is "and", − is "and not", ′ is "not". Every law of sets is a law of logic in disguise.