PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Viewing Version 24 of 'set difference'
[ view 'set difference' | back to history ]

Title of object: set difference
Canonical Name: SetDifference
Type: Definition

Created on: 2001-11-16 19:51:43
Modified on: 2008-03-25 13:11:25

Creator: yark
Modifier: yark
Author: quadrate
Author: matte
Author: yark

Classification: msc:03E20
Keywords: set
Synonyms: set difference=difference between sets
set difference=difference

Revision comment (for changes between this and next version):

larger caption

Preamble:

\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{xypic}

\def\emptyset{\varnothing}
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$.
So we have
\[
A\setminus B = \{ x\in A \mid x \notin B\}.
\]

\begin{center}
\begin{tabular}{c}
\includegraphics[scale=1]{venn.eps} \\
{\tiny 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 module), then $A-B$ is commonly used to denote the set
\[
A-B = \{ a-b \mid a\in A, b\in B\},
\]
which is not usually the same as the set difference of $A$ and $B$.
Using the notation $A-B$ for set difference can therefore cause confusion,
and so is probably best avoided.