Sets
Union, intersection and difference
Compute A ∪ B, A ∩ B and A – B, and identify disjoint sets.
A Venn diagram draws the universal set U as a rectangle and each set as a circle inside it. Circles overlap when the sets share elements and stay apart when they share none.
Take A = {1, 3, 5, 7, 9} and B = {3, 6, 9}:
- Union A ∪ B = {x : x ∈ A or x ∈ B}: everything in either set, common elements written once. A ∪ B = {1, 3, 5, 6, 7, 9}.
- Intersection A ∩ B = {x : x ∈ A and x ∈ B}: only the common elements. A ∩ B = {3, 9}.
- Difference A – B = {x : x ∈ A and x ∉ B}: A with B's elements removed ('only A'). A – B = {1, 5, 7}, but B – A = {6}, so usually A – B ≠ B – A.
- The symmetric difference (A – B) ∪ (B – A) = {1, 5, 6, 7}: elements in exactly one of the two.
If A ∩ B = φ, the sets are disjoint: {1, 2} and {5, 8} share nothing, so their circles do not touch.
Laws that make working easier:
- Idempotent: A ∪ A = A, A ∩ A = A. Identity: A ∪ φ = A, A ∩ U = A.
- Commutative and associative: order and grouping do not matter for ∪, nor for ∩.
- Distributive, like a(b + c) = ab + ac: A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C), and A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).
- If A ⊂ B, then A ∪ B = B (the bigger one), A ∩ B = A (the smaller one), and A – B = φ.
Counting: n(A ∪ B) = n(A) + n(B) – n(A ∩ B). The common elements are counted once in n(A) and again in n(B), so they are taken away once. Also n(A – B) = n(A) – n(A ∩ B).
Example: of 300 people, 180 drink tea and 150 coffee, and everyone drinks at least one. Note that '180 drink tea' includes those who also drink coffee. Then 300 = 180 + 150 – n(both), so 30 drink both; 150 drink only tea and 120 only coffee.
For sets of 4 and 7 elements, A ∩ B can have from 0 (nothing shared) to 4 (the small set inside the big one) elements, and A ∪ B from 7 to 11.
Practise this lesson
Questions that get harder as you improve, a Tutor that helps without giving the answer away, and progress you can see. Free for every learner.
No account, no email address. Opens the real product.