# What is the difference between the symbols $\cap$ and $\setminus$?

What is the difference between $\cap$ and $\setminus$ symbols during operations on sets?

Edit: I'm sorry, I mean $\cap$, not $\cup$. Was edited.

-
This 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. –  Ben Millwood Jul 1 '12 at 15:25

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\}.$$

-

$\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.