If
[math]A
[/math] and
[math]B
[/math] are
sets, then the
set difference [math]A
[/math] minus
[math]B
[/math] (written
[math]A \href{/cs2800/wiki/index.php/%5Csetminus}{\setminus} B
[/math]) is given by
[math]A \href{/cs2800/wiki/index.php/%5Csetminus}{\setminus} B \href{/cs2800/wiki/index.php/Definition}{:=} \{x \href{/cs2800/wiki/index.php/%5Cmid}{\mid} x \href{/cs2800/wiki/index.php/%5Cin}{\in} A \href{/cs2800/wiki/index.php/And}{\text{ and }} x \href{/cs2800/wiki/index.php/%5Cnotin}{\notin} B\}
[/math].
We use the symbol [math]\href{/cs2800/wiki/index.php/%5Csetminus}{\setminus}
[/math] instead of the normal [math]-
[/math] because occasionally we will want to use sets to represent number-like things, and we will want to define subtraction differently for those sets (in particular, we will do this in the section on Category:number theory).
This means that if you know [math]x \href{/cs2800/wiki/index.php/%5Cin}{\in} A \href{/cs2800/wiki/index.php/%5Csetminus}{\setminus} B
[/math], you can conclude 'both' that [math]x \href{/cs2800/wiki/index.php/%5Cin}{\in} A
[/math] 'and' [math]x \href{/cs2800/wiki/index.php/%5Cnotin}{\notin} B
[/math], and similarly you must prove both [math]x \href{/cs2800/wiki/index.php/%5Cin}{\in} A
[/math] and [math]x \href{/cs2800/wiki/index.php/%5Cnotin}{\notin} B
[/math] to prove [math]x \href{/cs2800/wiki/index.php/%5Cin}{\in} A \href{/cs2800/wiki/index.php/%5Csetminus}{\setminus} B
[/math].
In this Venn diagram, the set difference [math]A
[/math] minus [math]B
[/math] is shaded: