Hello I am taking a Discrete Mathematics course and having some trouble with this question about sets:

Under what conditions is $A- B = B- A$

Diagram: $A- B$

Diagram: $B- A$

Maybe I'm understanding incorrectly, but how can A-B and B-A be equal if they contain elements that are not in each other?


If $\color{blue}{A-B=B-A}$

$A\subset B$: $$A\subset (A-B)\cup B=(B-A)\cup B=(B\cap A')\cup B=B$$ similar way shows $B\subset A$ so $\color{blue}{A=B}$.

contrary is trivial.


If $x\in A-B$, then $x\in A$ but $x\not\in B$. Similarly, if $x\in B-A$, then $x\in B$ but $x\not\in A$; so if $x\in A-B$ and $x\in B-A$, we conclude that $x\in A$ and $x\not\in A$, a contradiction! Hence there exists no such $x$, so $A-B=\emptyset$, so $A\subseteq B$, and similarly $B-A=\emptyset$, so $B\subseteq A$, and therefore $A=B$.


Suppose $B - A = A -B$.

Claim: $A = B$.

If not, this means there either an $x \in A$ such that $x \notin B$ (and then $x \in A - B$, but $x \notin B - A$, so $A- B \neq B-A$, contradiction), or there is an $x \in B$ with $x \notin A$ (and then $x \in B - A$, while $x \notin A - B$, so $A - B \neq B- A$, contradiction again).

So $A = B$ and $A - B = B- A = \emptyset$.