<?xml version="1.0" encoding="UTF-8"?>

<record version="29" id="913">
 <title>set difference</title>
 <name>SetDifference</name>
 <created>2001-11-16 19:51:43</created>
 <modified>2008-09-17 14:51:14</modified>
 <type>Definition</type>
 <creator id="2760" name="yark"/>
 <author id="2760" name="yark"/>
 <author id="89" name="quadrate"/>
 <author id="1858" name="matte"/>
 <classification>
	<category scheme="msc" code="03E20"/>
 </classification>
 <synonyms>
	<synonym concept="set difference" alias="difference between sets"/>
	<synonym concept="set difference" alias="difference"/>
 </synonyms>
 <related>
	<object name="SymmetricDifference"/>
	<object name="InverseImageCommutesWithSetOperations"/>
	<object name="Difference2"/>
 </related>
 <keywords>
	<term>set</term>
 </keywords>
 <preamble>\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{xypic}

\def\emptyset{\varnothing}</preamble>
 <content>\PMlinkescapeword{between}
\PMlinkescapeword{operation}
\PMlinkescapeword{order}
\PMlinkescapeword{properties}

\section*{Definition}
Let $A$ and $B$ be sets.
The \emph{set difference} (or simply \emph{difference})
between $A$ and $B$ (in that order)
is the set of all elements of $A$ that are not in $B$.
This set is denoted by $A\setminus B$ or $A-B$
(or occasionally $A\sim B$).   % e.g., in GTM 3
So we have
\[
  A\setminus B = \{ x\in A \mid x \notin B\}.
\]

\begin{center}
\begin{tabular}{c}
\includegraphics[scale=1]{venn.eps} \\
{\rm Venn diagram showing $A\setminus B$ in blue}
\end{tabular}
\end{center}

\section*{Properties}

Here are some properties of the set difference operation:

\begin{enumerate}

\item If $A$ is a set, then
\[
  A\setminus\emptyset = A
\]
and
\[
  A\setminus A = \emptyset = \emptyset\setminus A.
\]

\item If $A$ and $B$ are sets, then
\[
  B\setminus(A\cap B) = B\setminus A.
\]

\item If $A$ and $B$ are subsets of a set $X$, then
\[
  A\setminus B = A\cap B^\complement
\]
and
\[
  (A\setminus B)^\complement = A^\complement \cup B,
\]
where $^\complement$ denotes complement in $X$.

\item If $A$, $B$, $C$ and $D$ are sets, then 
\[
  (A\setminus B)\cap (C\setminus D) = (A\cap C)\setminus (B\cup D).
\]

\end{enumerate}

\section*{Remark}
As noted above, the set difference is sometimes written as $A-B$. 
However, if $A$ and $B$ are sets in a vector space
(or, more generally, a \PMlinkname{module}{Module}),
then $A-B$ is commonly used to denote the set
\[
  A-B = \{ a-b \mid a\in A, b\in B\}
\]
rather than the set difference.</content>
</record>
