Assume: $A = \{1,2,3\},$ $B = \{2,3,4\}$
Is $A - B = \{1\}$, or is it $\{1\}$ plus the piece of $\{4\}$ that you 'owe', assuming in Venn Diagram you are subtracting a piece of $B$ from $A$ itself that do not contain the element '4'. (Is it fair to visualise sets in Venn Diagrams?)
Or do we just equate the minus($-$) sign to the complement() function.
$\endgroup$ 13 Answers
$\begingroup$The symbols $-$ and $\setminus$ typically denote the same thing, namely relative complement (a.k.a. set difference): $$A - B = A \setminus B = \{ x \mid x \in A \text{ and } x \not \in B \}$$ The other operation you mention is symmetric difference, often denoted $A \triangle B$, which is defined by $$A \triangle B = (A \setminus B) \cup (B \setminus A)$$ or equivalently $A \triangle B = (A \cup B) \setminus (A \cap B)$; it is the set of objects which are elements exactly one of $A$ or $B$.
In your case, you have $\{ 1, 2, 3 \} \setminus \{ 2, 3, 4 \} = \{ 1 \}$ and $\{ 1, 2, 3 \} \triangle \{ 2, 3, 4 \} = \{ 1, 4 \}$.
$\endgroup$ $\begingroup$$A-B$ is alternative notation for $A \setminus B$. They both mean the elements that are in $A$ but not in $B$.
$\endgroup$ $\begingroup$I'm sorry.
I truly am.
Usually[1], the symbol $A - B$ means $A\setminus B= \{x\in A| x\not \in B\}= A\cap B^c$.
(In your example $\{1,2,3\}-\{2,3,4\} =\{1\}$.)
Except sometimes it means $A- B = \{a-b|a\in A; b \in B\}$ (where is assumed $A$ and $B$ are sets of numbers.)
(In which case $\{1,2,3\}-\{2,3,4\} =\{-3,-2,-1,0,1\}$.)
Which one does your text mean? Well, you can tell in context if it is well-written.
Again. Accept my deepest condolences and sympathy.
====
[1] By "usually" I mean, that when you do see it, it usually means this. Fortunately you won't see it that often as most texts recognize its ambiguity and use $A\setminus B$ instead.
But, unfortunately, one does sometimes sees it. Really, I can't tell you how sorry I am about this.
$\endgroup$