Definition 10 (Relative complement). X ∖ Y = {x : x ∈ X and x ∉ Y}, the complement of Y in X.
15Relative complements
Given two sets X and Y, the complement of Y in X is the set containing those objects which belong to X but not to Y. We write it X ∖ Y, and read it aloud as “X minus Y”.1 So the inclusion criterion for X ∖ Y is x ∈ X and x ∉ Y, where ‘x ∉ Y’ abbreviates ‘it is not the case that x ∈ Y’:
Notice that the order matters here, in a way that it did not for union and intersection.
For example, {7, 8, 9} ∖ {8, 9, 10} = {7}, whereas {8, 9, 10} ∖ {7, 8, 9} = {10}. In Figure 13, X ∖ Y is the shaded region: the part of X lying outside Y.
Taking a relative complement, like taking an intersection, only ever makes a set smaller.
Proposition 27 (a relative complement is a subset). For any sets X and Y, X ∖ Y ⊂ X.
If x ∈ X ∖ Y then x ∈ X and x ∉ Y. In particular, x ∈ X.
Proposition 28 (subtracting the empty set). For any set X, X ∖ ∅ = X.
Exercise 11. Prove Proposition 28 (subtracting the empty set).
Proposition 29 (subtracting a set from itself). For any set X, X ∖ X = ∅.
Exercise 12. Prove Proposition 29 (subtracting a set from itself).
- Many books instead call this the difference of X and Y, or the set difference, and some write it X - Y. It is all the same operation. ↩