Operations and families · Definition
Relative complement
Before you start you need to know
The relative complement describes what remains of A once the elements of B are removed.
Definition
The relative complement of \(B\) in \(A\) is the set \(A \setminus B\) of elements of \(A\) that do not belong to \(B\).
Since \(A \setminus B = \{x \in A : x \notin B\}\), the set is always contained in \(A\): \(A \setminus B \subseteq A\). If \(B \subseteq A\), the sets \(B\) and \(A \setminus B\) are disjoint and their union is \(A\), so \(|A| = |B| + |A \setminus B|\) when \(A\) is finite. If \(B\) is not contained in \(A\), the difference is still defined and equals \(A \setminus (A \cap B)\).
Worked example: let \(A = \{1,2,3,4,5,6\}\) and \(B = \{2,4,6\}\). Then \(A \setminus B = \{1,3,5\}\). Order matters: \(B \setminus A = \varnothing\), while \(A \setminus B = \{1,3,5\}\).
Typical mistake: writing \(A \setminus B = B \setminus A\) as if the operation were symmetric. Set difference is not commutative; the symmetric difference \(A \,\triangle\, B\) is. Another error is forgetting that \(A \setminus B\) keeps only elements of \(A\), even when \(B\) has elements outside \(A\).
Think about it
Is \(A \setminus B\) always equal to \(B \setminus A\)?
No. With \(A=\{1,2\}\) and \(B=\{2,3\}\), \(A \setminus B=\{1\}\) and \(B \setminus A=\{3\}\).
Exercises 10
- What does \(x \in A \setminus B\) mean?
- If \(A = \{a,b,c\}\) and \(B = \{b\}\), what is \(A \setminus B\)?
- What is \(A \setminus A\)?
- What relation does \(A \setminus B\) satisfy with \(A\)?
- Let \(A = \{1,\ldots,10\}\) and \(B = \{2,4,6,8,10,12\}\). What is \(A \setminus B\)?
- Which statement is true for any sets \(A\) and \(B\)?
- How many elements does \(\{2,4\} \setminus A\) have, if \(A = \{1,2,3,4\}\)?
- If \(A \setminus B = \varnothing\), what can be concluded?
- Let \(A = \{1,\ldots,20\}\), \(B_1 = A \setminus \{x : x \text{ is even}\}\) and \(B_2 = A \setminus B_1\). What is \(B_2\)?
- Let \(A = \{1,\ldots,8\}\) and \(B = \{x \in A : x > 5\}\). What is \(|A \setminus B|\)?
References
- Herbert B. Enderton, Elements of Set Theory, 1st edition, Academic Press, 1977.
- Thomas Jech, Set Theory (The Third Millennium Edition), 3rd millennium edition, Springer, 2003.