# If $f$ is 1-1, prove that $f(A\setminus B) = f(A)\setminus f(B)$

I'm having a tough time with this one. Here's the background:

Let $X$ and $Y$ be sets, let $f:X\rightarrow Y$ and let $A,B\subseteq X$. For this proof, we also assume that $f$ is 1-1.

I've already proven $f(A\setminus B)\supseteq f(A)\setminus f(B)$, but where should I start to prove the other way around?

To show that $f(A\setminus B) \subset f(A) \setminus f(B)$, show that each element of the first lies in $f(A)$, but not in $f(B)$. You need injectivity for this.
Take an arbitrary element, $x\in F(A-B)$. Then $\exists y\in A:y\notin B$and $f(y)=x$. Thus, $x\in F(A)$. But since F is injective, y is the only preimage, and since $y \notin B$, $x \notin F(B)$
Choose $y \in f(A \setminus B)$ then there exists $x \in A \setminus B$ such that $y = f(x)$. Observe that $f(x) \in f(A)$ since $A \setminus B \subseteq A$. Now why is $y \notin f(B)$? If it were, say $y \in f(B)$ then $y = f(x')$ for some $x' \in B$. But then we have $f(x) = y = f(x')$ and by injectivity we have $x = x'$. This means that $x' \notin B$, a contradiction. Conclude that $y \notin f(B)$ and hence $y \in f(A) \setminus f(B)$.
• "Since $A \setminus B \subseteq B$" this can't be right; what if $B = \emptyset$? I think you mean $A \setminus B \subseteq A$. – goblin Sep 25 '14 at 5:51
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}