What is the difference between $\cap$ and $\setminus$ symbols for operations on sets?
What is the difference between the symbols $\cap$ and $\setminus$?
-
6This is easy to just go and look up. If you have found a definition but are struggling with it, then say so and we can help. We're not your own personal Google. – 2012-07-01
4 Answers
Their definition is different:
$A\cap B=\{x\mid x\in A\text{ and } x\in B\}$, we take all the elements which appear both in $A$ and in $B$, but not just in one of them.
$A\setminus B=\{x\mid x\in A\text{ and } x\notin B\}$, we take only the part of $A$ which is not a part of $B$.
Amongst the different properties, the intersection ($\cap$) is commutative and associative while difference ($\setminus$) is not. Namely it is generally true that:
$$A\cap B=B\cap A\\ A\setminus B\neq B\setminus A$$
and similarly: $$A\cap (B\cap C) = (A\cap B)\cap C\\ A\setminus(B\setminus C)\neq (A\setminus B)\setminus C$$
Here is the Wikipedia article on $\cup$, the Wikipedia article on $\cap$, and the Wikipedia article on $\setminus$.
Given two sets $A$ and $B$, the sets $A\cup B$, $A\cap B$, and $A\setminus B$ are defined as $$A\cup B=\{x\mid x\in A\;\text{ or }\;x\in B\}$$ $$A\cap B=\{x\mid x\in A\;\text{ and }\;x\in B\}$$ $$A\setminus B=\{x\mid x\in A\;\text{ and }x\notin B\}$$ For example, if $A=\{1,2,3,4\}$ and $B=\{3,4,5,6\}$, then $$A\cup B=\{1,2,3,4,5,6\},$$ $$A\cap B=\{3,4\},$$ $$A\setminus B=\{1,2\}.$$
(Answer to the edited question):
$\cap$ is for set intersection and $\backslash$ is for set difference. I'm sure you can look up the wikipedia entries for them. Here is a more descriptive example:
Suppose $A$ is the set of families with pet cats, and $B$ is the set of families with pet dogs. $A \cap B$ will consist of families with at least one cat AND at least one dog. $A \backslash B$ will consist of families with at least one cat but NO dogs.
We have:
$$A\cap B = \{x|x\in A \land x\in B\}$$ $$A\setminus B = \{x|x\in A \land x\not\in B\}$$
from here we can say:
$$A\cap B=A\setminus B^c=B\setminus A^c$$ $$A\cap B^c=A\setminus B=B^c\setminus A^c$$
where:
$$B^c=\{x|x\not\in B\}$$