# prove $X \setminus A=X \setminus B$ if and only if $A=B$

I'm sure I'm missing a small step somewhere, but I just don't know where. sorry, $$X$$ is a set. $$A$$ and $$B$$ are subsets of $$X$$

First assume $$A=B$$

Therefore: $$X \setminus A = X-B$$

Now assume $$X setminus A=X-B$$. I need to get $$A=B$$ from this assumption. I tried doing this:

Let $$x\in(X-A)$$; therefore $$x$$ is an element of $$X$$ but $$x$$ is NOT an element of $$A$$.

Let $$y\in(X-B)$$; therefore $$y$$ is an element of $$X$$ but $$y$$ is NOT an element of $$B$$.

Since $$x=y$$, conclude $$A=B$$.

Does this make sense?

• First: don't mix capital letters and lowercase letters. $x$ and $X$ will usually be taken to denote different things. Second: what kind of objects are you considering? Are these elements in a group? Are these matrices? Are these polynomials? Are these sets? (If they are sets, why did you mark it as [abstract-algebra] and not as [elementary-set-theory])? What? Third: what does "$xE(X-A)$" mean? – Arturo Magidin Jan 13 '12 at 3:34
• I think you are talking about sets. In that case, "$x$ is an element of $A$" can be written in $\LaTeX$ like so: $x\in A$, which will produce $x\in A$. – Arturo Magidin Jan 13 '12 at 3:38
• Hang on, if they're sets, then this isn't even true, because A or B could have elements that aren't in X. But the wording of the question certainly makes them sound like sets. Original Poster, please clarify! – user22805 Jan 13 '12 at 3:41

I think You are talking about sets.

The implication $A=B$ implies $X-A = X-B$ is of course true, since $A=B$.

The other implication is only true if $A$ and $B$ are both subsets of $X$.

1. Assume $A\subseteq X$ and $B\subseteq X$, and that $X-A=X-B$. To prove that $A=B$, prove double inclusion. Show that if $a\in A$ then $a\in B$, and that if $b\in B$ then $b\in A$.

So let $a\in A$; you need to show that $a\in B$; since $a\in A$, then $a\notin X-A$; therefore, since $X-A=X-B$, you have $a\notin X-B$. Now use the fact that $B\subseteq X$ and conclude that...

Proceed in a similar way to show that if $b\in B$ then $b\in A$.

2. If $A$ and $B$ are not assumed to be subsets of $X$, then the implication is false: take $X=\{1,2\}$ $A=\{1,3\}$, and $B=\{1,4\}$. Then $X-A = \{2\} = X-B$, but $A\neq B$.

3. What you write does not, unfortunately, make sense. It is true that if $x\in X-A$ then $x\in X$ and $x\notin A$. And it is true that if $y\in X-B$, then $y\in X$ and $y\notin B$. However, nowhere did you say that $x$ and $y$ were the same element, so you cannot say "since $x=y$". Now, you can say: if $x\in X-A=X-B$, then $x\in X$ and $x\notin A$ and $x\notin B$. However, this does not, in any way, imply that $A=B$: you simply found an element that is in neither set. How does that show that $A$ and $B$ are equal? $\frac{1}{2}$ is not in the set of even integers, and it is not in the set of odd integers, but this does not mean that the even integers and the odd integers are equal as sets.

$A = B$ $\quad$iff$\quad$ $x\in A \iff x\in B$ $\quad$iff$\quad$ $x\notin A \iff x\notin B$ $\quad$iff$\quad$ $x\in X\setminus A \iff x\in X\setminus B$ $\quad$iff$\quad$ $X\setminus A= X\setminus B$.

(There's an implicit "for all $x\in X$" everywhere.)