Sets and Set Notation
Theory
A set is a collection of distinct objects called elements. This Year 11 Mathematics Advanced page covers set notation: listing elements, the number of elements \(|A|\), the empty set, subsets, the universal set and complements, together with union, intersection and the counting rule \(|A\cup B|=|A|+|B|-|A\cap B|\).
A set is a collection of distinct objects, called its elements, listed inside braces: \(A=\{2,4,6\}\). Order does not matter and each element is listed once, so \(\{2,4,6\}=\{6,2,4\}\). \(4\in A\) means "\(4\) is an element of \(A\)" and \(5\notin A\) means "\(5\) is not an element of \(A\)". A set with a clear pattern can be shortened with dots: \(\{3,6,9,\ldots,30\}\).
The number of elements in a finite set \(A\) is written \(|A|\). Some books write \(n(A)\); it means the same thing. The empty set \(\varnothing\) has no elements, so \(|\varnothing|=0\).
The universal set \(U\) contains every element being considered. The complement of \(A\), written \(A'\), is the set of elements of \(U\) that are not in \(A\).
\(A\) is a subset of \(B\), written \(A\subseteq B\), when every element of \(A\) is also an element of \(B\). If, as well, \(B\) has at least one element that is not in \(A\), then \(A\) is a proper subset of \(B\), written \(A\subset B\). Every set is a subset of itself, and \(\varnothing\) is a subset of every set.
The intersection \(A\cap B\) is the set of elements in \(A\) and in \(B\). The union \(A\cup B\) is the set of elements in \(A\) or in \(B\) (or in both), each listed once. If \(A\cap B=\varnothing\), the sets have no elements in common and are called disjoint.
Words translate directly into notation: "and" (both conditions) gives \(\cap\), "or" gives \(\cup\) and "not" gives a complement \('\). For example, "in \(A\) but not in \(B\)" is \(A\cap B'\), and "in neither \(A\) nor \(B\)" is \((A\cup B)'\).
Counting elements in a complement and in a union:
De Morgan's laws link complements, unions and intersections. Check them by listing both sides:
| Words | Notation |
|---|---|
| in \(A\) and in \(B\) | \(A\cap B\) |
| in \(A\) or \(B\) (or both) | \(A\cup B\) |
| not in \(A\) | \(A'\) |
| in \(A\) but not in \(B\) | \(A\cap B'\) |
| in neither \(A\) nor \(B\) | \((A\cup B)'\) or \(A'\cap B'\) |
How to answer a set question
- List each set in braces, working out the pattern carefully (factors in pairs, multiples up to the last one in \(U\), repeated letters once).
- Translate the words into \(\cap\), \(\cup\) and \('\).
- Build the set: for \(\cap\) keep the common elements; for \(\cup\) combine both lists and write each element once; for a complement remove the set's elements from \(U\).
- Count with the rules: \(|A'|=|U|-|A|\) and \(|A\cup B|=|A|+|B|-|A\cap B|\). If the number in neither set is given, find \(|A\cup B|\) first.
- Solve for an unknown size by letting it be a pronumeral (for example \(|B|=b\)), substituting into the union rule and solving the equation.
Listing every subset
- Sort the subsets by size: no elements, one element, two elements, and so on, up to the whole set.
- Include \(\varnothing\) and the set itself. For \(\{p,q\}\) the subsets are \(\varnothing,\ \{p\},\ \{q\},\ \{p,q\}\): four subsets.
(i) List \(A\) and state \(|A|\).
(ii) List \(A'\) and find \(|A'|\).
(iii) \(B=\{2,6,18\}\). Is \(B\subseteq A\)? Is \(B\subset A\)?
(i) Factors come in pairs: \(1\times 18\), \(2\times 9\), \(3\times 6\).
| \(A\) | \(=\) | \(\{1,2,3,6,9,18\}\) |
| \(\therefore |A|\) | \(=\) | \(\mathbf{6}\) |
(ii) \(A'\) holds the elements of \(U\) that are not factors of \(18\):
| \(A'\) | \(=\) | \(\{4,5,7,8,10,11,\) |
| \(\) | \(\) | \(\phantom{\{}12,13,14,15,16,17\}\) |
| \(|A'|\) | \(=\) | \(|U|-|A|\) |
| \(\) | \(=\) | \(18-6\) |
| \(\) | \(=\) | \(\mathbf{12}\) |
(iii) \(2\), \(6\) and \(18\) are all in \(A\), so \(B\subseteq A\). Also \(1\in A\) but \(1\notin B\), so \(B\) is a proper subset: \(B\subset A\). Both are true.
(i) List \(A\cap B\).
(ii) List \(A\cup B\).
(iii) List \(A\cap B'\).
(iv) By listing elements, show that \((A\cup B)'=A'\cap B'\).
List both sets first:
| \(A\) | \(=\) | \(\{1,2,3,4,6,12\}\) |
| \(B\) | \(=\) | \(\{1,3,5,7,9,11\}\) |
(i) Elements in \(A\) and in \(B\): \(A\cap B=\{1,3\}\)
(ii) Elements in \(A\) or in \(B\), each listed once: \(A\cup B=\{1,2,3,4,5,6,7,9,11,12\}\)
(iii) Factors of \(12\) that are not odd. Remove \(1\) and \(3\) from \(A\): \(A\cap B'=\{2,4,6,12\}\)
(iv) Left-hand side: \((A\cup B)'=\{8,10\}\).
Right-hand side: \(A'=\{5,7,8,9,10,11\}\) and \(B'=\{2,4,6,8,10,12\}\), so \(A'\cap B'=\{8,10\}\).
| \(\therefore (A\cup B)'\) | \(=\) | \(A'\cap B'=\{8,10\}\) |
Let \(|B|=b\), so \(|C|=2b\). Find the union from the number who own neither:
| \(|C\cup B|\) | \(=\) | \(45-12\) |
| \(\) | \(=\) | \(33\) |
| \(|C\cup B|\) | \(=\) | \(|C|+|B|-|C\cap B|\) |
| \(33\) | \(=\) | \(2b+b-6\) |
| \(3b\) | \(=\) | \(39\) |
| \(b\) | \(=\) | \(13\) |
| \(\therefore |C|\) | \(=\) | \(2\times 13\) |
| \(\) | \(=\) | \(\mathbf{26}\) |
\(26\) people own a car. Check: car only \(20\), both \(6\), bike only \(7\), neither \(12\), and \(20+6+7+12=45\).
Least: \(|A\cup B|\) cannot be more than \(|U|=40\).
| \(|A\cap B|\) | \(=\) | \(|A|+|B|-|A\cup B|\) |
| \(\) | \(\ge\) | \(25+22-40\) |
| \(\) | \(=\) | \(7\) |
This happens when \(A\cup B=U\). For example, with \(U=\{1,\ldots,40\}\), \(A=\{1,\ldots,25\}\) and \(B=\{19,\ldots,40\}\), \(A\cap B=\{19,\ldots,25\}\) has \(7\) elements.
Greatest: \(A\cap B\) is a subset of \(B\), so \(|A\cap B|\le|B|=22\). This happens when \(B\subseteq A\).
\(\therefore\) the least value is \(\mathbf{7}\) and the greatest value is \(\mathbf{22}\).
Common pitfalls
Frequently asked questions
What does |A| mean in set notation?
|A| is the number of elements in the set A. For example, if A is the set 2, 4, 6, 8 then |A| = 4. Some books write n(A) instead; it means the same thing.
What is the difference between union and intersection?
The intersection of A and B contains the elements in both A and B. The union contains the elements in A or B or both, each listed once. Intersection uses the symbol that looks like an upside-down U, union uses the U-shaped symbol.
What is the complement of a set?
The complement of A, written A dash, is everything in the universal set that is not in A. Its size is the size of the universal set minus the size of A.
What is the difference between a subset and a proper subset?
A is a subset of B if every element of A is also in B. It is a proper subset if, as well, B has at least one element that A does not have. Every set is a subset of itself, but not a proper subset of itself.
How do you find the number of elements in A union B?
Add the number of elements in A and in B, then subtract the number in the intersection, because those elements were counted twice. If the sets are disjoint, just add.
Is the empty set a subset of every set?
Yes. The empty set has no elements, so it has no element that fails to be in the other set. When you list all the subsets of a set, include both the empty set and the set itself.