[Math] How to prove that the inverse image of the image of a set is a subset of the set.

functionsproof-writing

What I need to prove is the following:

Let $f:X\to Y$ and $A\subset X$. Prove that $f^{-1}(f(A))=A$ for all $A$ if and only if $f$ is injective.

So, I realize that I have to prove both directions of this statement, namely:

$$(i) \text{ } f^{-1}(f(A))=A, \forall A \subset X \implies f \text{ is injective}$$

$$ \text {and} $$

$$(ii) \text{ } f \text{ is injective} \implies f^{-1}(f(A))=A, \forall A \subset X$$

I believe that I've accomplished $(i)$ using a contrapositive proof. However, I'm stuck on part of $(ii)$ now. My plan is to assume that $f$ is injective, and that that implies that $A \subset f^{-1}(f(A))$ and $f^{-1}(f(A)) \subset A$. Below is my proof that $A \subset f^{-1}(f(A))$:

$$ \text{Let } a \in A. \text{This means that } \exists b \in f(A) \text{ such that } f(a) = b. \text{This means that } a \in f^{-1}(f(A)) \text { and therefore } A \subset f^{-1}(f(A)) \text{, as desired.} $$

Proving that $f^{-1}(f(A)) \subset A$ however is giving me difficulty. Here's my start:

$$\text{Let } p \in f^{-1}(f(A)). \text{This means that } p \in X \text{ such that }f(p) \in f(A).$$

Then I don't know where to go from there. In fact, now that I writing this out, it all seems kind of sloppy and incoherent. So, yeah, any help would be appreciated here. Thanks!

Best Answer

To prove $(ii)$, suppose $f$ is injective. Let $A$ be a subset of $X$. For all $x\in A$, $f(x) \in f(A)$, i.e., $x\in f^{-1}(f(A))$. Thus $A \subseteq f^{-1}(f(A))$. On the other hand, if $x \in f^{-1}(f(A))$, then $f(x) \in f(A)$, so $f(x) = f(a)$ for some $a\in A$. Since $f$ is injective, $x = a$. Therefore $x \in A$. Since $x$ was arbitrary, $f^{-1}(f(A)) \subseteq A$. The two containments give $f^{-1}(f(A)) = A$. As $A$ was arbitrary, $(ii)$ follows.