Set Operations

The relative complement (also: set difference) of $A$ in $B$, denoted by as $B - A$ or $B \setminus A$ (

$B \setminus A$
), is the set of elements in $B$ that are not in $A$: $B - A = \;$$\{ x \mid x \in B \,$$\text{ and } \,$$x \notin A \}$. Examples:


The symmetric difference of two sets $A$ and $B$, denoted by $A \triangle B$ (

$A \triangle B$
) is the set of elements in either $A$ or $B$, but not in both: $A \triangle B = \;$$(A - B) \cup (B - A)$. Examples: