next up previous contents
Next: Symmetric difference Up: Operations with sets Previous: Complementary set   Contents

Difference

Definition 3.2.25   Let $ A$ and $ B$ be two sets. The difference $ A \setminus B$ is the set of elements of $ A$ which do not belong to $ B$, namely

$\displaystyle A \setminus B = \{ x \in A \; \vert \; x \notin B \}$    

If $ A$ and $ B$ are two subsets of the same set $ E$, we have:

$\displaystyle A \setminus B = A \cap B^C.$    

Figure 13: Difference
\begin{figure}
\centering
\mbox{\epsfig{file=Difference.eps,height=3.2cm}}
\end{figure}

For example, take $ A=\{ 1,3,4,5,7,9 \}$ and $ B= \{ 1,2,4,6,7,8
\}$. Then $ A \setminus B = \{ 5,9 \}$. Note that this operation has nothing in common with substraction of numbers.

Proposition 3.2.26   For any set $ A$, the following properties hold:
  1. $ A \setminus A = \emptyset$;
  2. $ A \setminus \emptyset = A$.

Remark 3.2.27   If $ A$ and $ B$ be two subsets of the same set $ E$, then we have:

$\displaystyle A \setminus B = A \cap \Bar{B}.$    

Remark 3.2.28   For the difference of sets, neither the commutative law nor the associative law hold. Figures [*] and [*] give a counter-example to the associative law.

Figure 14: A counter-example to the associative law: first part.
\begin{figure}
\centering\mbox{\epsfig{file=DiffNonAssoc-1.eps,height=3cm}}
\end{figure}

Figure 15: A counter-example to the associative law: second part.
\begin{figure}
\centering\mbox{\epsfig{file=DiffNonAssoc-2.eps,height=3cm}}
\end{figure}

Here is another example: let $ E$ be the set of all integers $ x$ such that $ \lvert x\rvert \leq 10$. Let $ A=\{ x \in E ; \; -1 \leq x \leq 6 \}$, $ B=\{ -5,-4,-2,0,1,2,3,4,5 \}$ and $ C=\{ -9,-4,-2,0,2,4,6,8 \}$. Then we have:

$\displaystyle A \setminus B$ $\displaystyle = \{ -1,6 \}$    
$\displaystyle (A \setminus B ) \setminus C$ $\displaystyle =
 \{-1\}$    
$\displaystyle B \setminus C$ $\displaystyle = \{ -5, 1, 3,5 \}$    
$\displaystyle A \setminus ( B \setminus
 C)$ $\displaystyle = \{ -1, 0,2,4,6 \}.$    


next up previous contents
Next: Symmetric difference Up: Operations with sets Previous: Complementary set   Contents
root 2002-06-10