Sets and Mathematical Proofs: A Primer

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 XY, and read it aloud as “X minus Y”.1 So the inclusion criterion for XY is xX and xY, where ‘xY’ abbreviates ‘it is not the case that xY’:

Definition 10 (Relative complement). XY = {x : xX and xY}, the complement of Y in X.

XY
Figure 13. The relative complement XY.

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, XY 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, XYX.

If xXY then xX and xY. In particular, xX.

Proposition 28 (subtracting the empty set). For any set X, X ∖ ∅ = X.

Proposition 29 (subtracting a set from itself). For any set X, XX = ∅.

  1. 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.