What is a set? Roster and set-builder form
A set is a well-defined collection of different objects. Well-defined means everyone can say clearly if an object is in it or not. 'Vowels of English' is a set. 'Tall students' is not, because 'tall' is not clear.
The objects are called elements. We write 3 ∈ A (3 belongs to A) and 5 ∉ A (5 does not belong to A).
Two ways to write a set
- Roster form: list the elements inside braces, with commas. A = {2, 4, 6, 8}. Order does not matter. Repeats are written once.
- Set-builder form: give the rule. A = {x : x is an even natural number, x ≤ 8}. Read ':' as 'such that'.
In step 1 of the 3D, the blue ring shows A. The readout below gives both forms.
Types of sets: empty, finite, infinite, equal
- Empty set (null set) ∅ or { }: no element at all. Example: {x : x is a natural number and x < 1}.
- Singleton: exactly one element, like {0}. Note {0} is not empty.
- Finite set: you can count all elements and the counting ends. n(A) is the number of elements.
- Infinite set: counting never ends, like the set of natural numbers.
- Equal sets: exactly the same elements. {1, 2, 3} = {3, 1, 2, 2}.
- Equivalent sets: same number of elements, n(A) = n(B), even if elements differ.
Subsets, power set and intervals
B is a subset of A (B ⊂ A) if every element of B is also in A. In step 2 of the 3D, the red ring sits fully inside the blue ring.
- Every set is a subset of itself. ∅ is a subset of every set.
- If B ⊂ A and B ≠ A, B is a proper subset.
- The power set P(A) is the set of all subsets. If n(A) = n, then n(P(A)) = 2ⁿ.
- Number sets: N ⊂ Z ⊂ Q ⊂ R, and T (irrationals) ⊂ R.
Intervals: subsets of R
For real numbers a < b:
- Open interval (a, b) = {x : a < x < b}. End points not included.
- Closed interval [a, b] = {x : a ≤ x ≤ b}. End points included.
- Half-open [a, b) = {x : a ≤ x < b} and (a, b] = {x : a < x ≤ b}.
On a number line, a filled dot means 'included', an empty dot means 'not included'. Length of each interval is b − a.
Universal set and Venn diagrams
The universal set U holds every element we are talking about in a question. It is drawn as a rectangle. Each set inside it is drawn as a circle or oval. This picture is a Venn diagram.
The 3D board is U = {1, …, 8}. The rings are A and B. A ball's place tells you which sets it belongs to: inside only A, inside only B, in the overlap, or outside both.
Operations: union, intersection, difference, complement
- Union A ∪ B = {x : x ∈ A or x ∈ B}. Step 3.
- Intersection A ∩ B = {x : x ∈ A and x ∈ B}. Step 4. If A ∩ B = ∅, A and B are disjoint.
- Difference A − B = {x : x ∈ A and x ∉ B}. Step 5. Note A − B ≠ B − A in general.
- Complement A′ = U − A = {x ∈ U : x ∉ A}.
Properties
- Commutative: A ∪ B = B ∪ A, A ∩ B = B ∩ A.
- Associative: (A ∪ B) ∪ C = A ∪ (B ∪ C); same for ∩.
- Identity: A ∪ ∅ = A, A ∩ U = A. Idempotent: A ∪ A = A, A ∩ A = A.
- Distributive: A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C); A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).
- Complement laws: A ∪ A′ = U, A ∩ A′ = ∅, (A′)′ = A, U′ = ∅, ∅′ = U.
- De Morgan's laws: (A ∪ B)′ = A′ ∩ B′ and (A ∩ B)′ = A′ ∪ B′.
- Counting: n(A ∪ B) = n(A) + n(B) − n(A ∩ B).
Try it
At home: take 10 small papers numbered 1 to 10 (this is U). Draw two big circles on a sheet: A = 'even', B = 'more than 6'. Place each paper where it belongs. Now count A ∪ B and A ∩ B and check n(A ∪ B) = n(A) + n(B) − n(A ∩ B).
In the 3D (last step): first predict which balls will rise for A′, then tap A′ and check. Try B = ∅: what are A ∪ ∅ and A ∩ ∅?
Key formulas and definitions
- n(P(A)) = 2ⁿ when n(A) = n
- n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
- A − B = A ∩ B′
- A′ = U − A, A ∪ A′ = U, A ∩ A′ = ∅
- (A ∪ B)′ = A′ ∩ B′, (A ∩ B)′ = A′ ∪ B′
- (a, b) = {x : a < x < b}, [a, b] = {x : a ≤ x ≤ b}
Worked examples
1. Write A = {x : x is a prime number less than 12} in roster form.
Primes below 12 are 2, 3, 5, 7, 11. So A = {2, 3, 5, 7, 11}.
2. Write B = {1, 4, 9, 16, 25} in set-builder form.
Each element is a square: 1², 2², …, 5². So B = {x : x = n², n ∈ N, 1 ≤ n ≤ 5}.
3. Which are empty, finite or infinite? (i) {x ∈ N : 2 < x < 3} (ii) {x : x is a letter of 'MATHS'} (iii) {x : x is a multiple of 5}.
(i) No natural number lies between 2 and 3, so it is empty. (ii) {M, A, T, H, S}: finite, 5 elements. (iii) 5, 10, 15, … never ends: infinite.
4. Write all subsets of A = {a, b, c}. How many are there?
∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}. That is 8 = 2³ subsets. Proper subsets: 7.
5. Write {x : −2 < x ≤ 5, x ∈ R} as an interval and find its length.
−2 is not included, 5 is included, so it is (−2, 5]. Length = 5 − (−2) = 7.
6. U = {1, 2, …, 8}, A = {2, 4, 6, 8}, B = {3, 6}. Find A ∪ B, A ∩ B, A − B, B − A, A′.
A ∪ B = {2, 3, 4, 6, 8}. A ∩ B = {6}. A − B = {2, 4, 8}. B − A = {3}. A′ = {1, 3, 5, 7}. (Steps 3, 4, 5 of the 3D.)
7. For the sets above, check De Morgan's law (A ∪ B)′ = A′ ∩ B′.
(A ∪ B)′ = U − {2, 3, 4, 6, 8} = {1, 5, 7}. A′ = {1, 3, 5, 7}, B′ = {1, 2, 4, 5, 7, 8}. A′ ∩ B′ = {1, 5, 7}. Both sides match.
8. In a class of 50, 30 like tea, 25 like coffee and 12 like both. How many like at least one? How many like neither?
n(T ∪ C) = 30 + 25 − 12 = 43. Neither = 50 − 43 = 7.
Common mistakes
- Writing repeated elements, like {1, 1, 2}. In a set each element is written only once: {1, 2}.
- Thinking {0} or {∅} is the empty set. {0} has one element (zero); {∅} has one element (the empty set). Only ∅ = { } is empty.
- Mixing ∈ and ⊂. Use ∈ for an element (2 ∈ A) and ⊂ for a set ({2} ⊂ A).
- Taking A − B = B − A. A − B keeps A's own part; B − A keeps B's own part. Check with step 5.