A set difference (or relative complement) of sets AA and BB is the set

A∖B={x:x∈A and x∉B}.A\setminus B=\{x : x\in A \text{ and } x\notin B\}.
Remarks

Set difference can be expressed using and once an ambient universe UU is chosen: if B⊆UB\subseteq U, then A∖B=A∩BcA\setminus B = A\cap B^{c}.

Examples
  • {1,2,3}∖{2,4}={1,3}\{1,2,3\}\setminus\{2,4\}=\{1,3\}.
  • If A⊆BA\subseteq B, then A∖B=∅A\setminus B=\varnothing (see ).