Definition:Set Difference

Definition
The (set) difference between two sets $S$ and $T$ is written $S \setminus T$, and means the set that consists of the elements of $S$ which are not elements of $T$:
 * $x \in S \setminus T \iff x \in S \land x \notin T$

It can also be defined as:
 * $S \setminus T = \set {x \in S: x \notin T}$
 * $S \setminus T = \set {x: x \in S \land x \notin T}$

Also known as
Some sources refer to $S \setminus T$ as the difference set (as opposed to set difference).

$S \setminus T$ can be voiced:
 * $S$ slash $T$
 * $S$ cut down by $T$.

Another frequently seen notation for $S \setminus T$ is $S - T$. Both notations may be encountered on this website, but $\setminus$ is preferred.

Some sources use $S \sim T$.

Some authors call $S \setminus T$ the relative difference between $S$ and $T$.

Some authors call $S \setminus T$ the (relative) complement of $T$ in $S$, but the standard definition for the latter concept requires that $T \subseteq S$.

Also see

 * Definition:Set Union
 * Definition:Set Intersection
 * Definition:Symmetric Difference


 * Definition:Class Difference, the same concept in the context of class theory