| Version 25 |
Version 24 |
| \PMlinkescapeword{between} |
\PMlinkescapeword{between} |
| \PMlinkescapeword{operation} |
\PMlinkescapeword{operation} |
| \PMlinkescapeword{order} |
\PMlinkescapeword{order} |
| \PMlinkescapeword{properties} |
\PMlinkescapeword{properties} |
|
|
| \section*{Definition} |
\section*{Definition} |
| Let $A$ and $B$ be sets. |
Let $A$ and $B$ be sets. |
| The \emph{set difference} (or simply \emph{difference}) |
The \emph{set difference} (or simply \emph{difference}) |
| between $A$ and $B$ (in that order) |
between $A$ and $B$ (in that order) |
| is the set of all elements of $A$ that are not in $B$. |
is the set of all elements of $A$ that are not in $B$. |
| This set is denoted by $A\setminus B$, or $A-B$. |
This set is denoted by $A\setminus B$, or $A-B$. |
| So we have |
So we have |
| \[ |
\[ |
| A\setminus B = \{ x\in A \mid x \notin B\}. |
A\setminus B = \{ x\in A \mid x \notin B\}. |
| \] |
\] |
|
|
| \begin{center} |
\begin{center} |
| \begin{tabular}{c} |
\begin{tabular}{c} |
| \includegraphics[scale=1]{venn.eps} \\ |
\includegraphics[scale=1]{venn.eps} \\ |
|
{\rm Venn diagram showing $A\setminus B$ in blue}
|
{\tiny Venn diagram showing $A\setminus B$ in blue}
|
| \end{tabular} |
\end{tabular} |
| \end{center} |
\end{center} |
|
|
| \section*{Properties} |
\section*{Properties} |
|
|
| Here are some properties of the set difference operation: |
Here are some properties of the set difference operation: |
|
|
| \begin{enumerate} |
\begin{enumerate} |
|
|
| \item If $A$ is a set, then |
\item If $A$ is a set, then |
| \[ |
\[ |
| A\setminus\emptyset = A |
A\setminus\emptyset = A |
| \] |
\] |
| and |
and |
| \[ |
\[ |
| A\setminus A = \emptyset = \emptyset\setminus A. |
A\setminus A = \emptyset = \emptyset\setminus A. |
| \] |
\] |
|
|
| \item If $A$ and $B$ are sets, then |
\item If $A$ and $B$ are sets, then |
| \[ |
\[ |
| B\setminus(A\cap B) = B\setminus A. |
B\setminus(A\cap B) = B\setminus A. |
| \] |
\] |
|
|
| \item If $A$ and $B$ are subsets of a set $X$, then |
\item If $A$ and $B$ are subsets of a set $X$, then |
| \[ |
\[ |
| A\setminus B = A\cap B^\complement |
A\setminus B = A\cap B^\complement |
| \] |
\] |
| and |
and |
| \[ |
\[ |
| (A\setminus B)^\complement = A^\complement \cup B, |
(A\setminus B)^\complement = A^\complement \cup B, |
| \] |
\] |
| where $^\complement$ denotes complement in $X$. |
where $^\complement$ denotes complement in $X$. |
|
|
| \item If $A$, $B$, $C$ and $D$ are sets, then |
\item If $A$, $B$, $C$ and $D$ are sets, then |
| \[ |
\[ |
| (A\setminus B)\cap (C\setminus D) = (A\cap C)\setminus (B\cup D). |
(A\setminus B)\cap (C\setminus D) = (A\cap C)\setminus (B\cup D). |
| \] |
\] |
|
|
| \end{enumerate} |
\end{enumerate} |
|
|
| \section*{Remark} |
\section*{Remark} |
| As noted above, the set difference is sometimes written as $A-B$. |
As noted above, the set difference is sometimes written as $A-B$. |
| However, if $A$ and $B$ are |
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 |
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\}, |
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$. |
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, |
Using the notation $A-B$ for set difference can therefore cause confusion, |
| and so is probably best avoided. |
and so is probably best avoided. |