Definition:Set Difference

From ProofWiki
Jump to: navigation, search

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 = \left\{{x \in S: x \notin T}\right\}$
$S \setminus T = \left\{{x: x \in S \land x \notin T}\right\}$


Illustration by Venn Diagram

The difference $S \setminus T$ between the two sets $S$ and $T$ is illustrated in the following Venn diagram by the red area:

VennDiagramSetDifference.png


Example

Let $S$ and $T$ be sets such that:

$S = \left\{{1, 2, 3}\right\}$
$T = \left\{{2, 3, 4}\right\}$

Let $\setminus$ denote set difference.

Then:

$S \setminus T = \left\{{1}\right\}$

while:

$T \setminus S = \left\{{4}\right\}$


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

  • Results about Set Difference can be found here.


Sources