The relative complement of in is like the complement of , but relative to .
Given two subsets and of a given ambient set , the relative complement of in is the set
That is, consists of those elements of that are not elements of .
Note that the relative complement of in the ambient set is simply the complement of ; sometimes this is called the absolute complement. Conversely, is the intersection of and .
In material set theory, all sets are subsets of the proper class of all sets (or all small things, if we might have atoms). In this case, there is no absolute complement (except as another proper class), but we can still form the relative complement:
Given a lattice and two elements and of , a relative complement of in in an element such that:
The term Boolean ring is sometimes used for something like a Boolean algebra in which there may be no top element (and therefore no complements) but still relative complements; compare the notions of ring vs algebra at sigma-algebra.
This includes the previous examples; the power set of is a Boolean algebra, while the class of all sets is (in this sense) a Boolean ring.