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 14 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: 2005-10-04 06:32:17

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

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

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

simplify wording

Preamble:

\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

\def\emptyset{\varnothing}
Content:

\PMlinkescapeword{between}
\PMlinkescapeword{order}

\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 that are contained in $A$, but 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\}.
\]

\section*{Properties}
\begin{enumerate}

\item If $A$ and $B$ are subsets of a set $X$, then
\begin{eqnarray*}
A\setminus B &=& A\cap B^\complement, \\
(A\setminus B)^\complement &=& A^\complement \cup B,
\end{eqnarray*}
where $\phantom{i}^\complement$ denotes complement in $X$.

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

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

\item If $A$ is a set, then
\begin{eqnarray*}
A\setminus\emptyset &=& A, \\
A\setminus A &=& \emptyset, \\
\emptyset\setminus A &=& \emptyset.
\end{eqnarray*}

\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, then $A-B$ is commonly used to denote the set
\[
A-B = \{ a-b \mid a\in A, b\in B\},
\]
which, in general, is not the same as the set difference of $A$ and $B$.
Therefore, to avoid confusion
it is best to avoid the notation $A-B$ for the set difference.