# Prove that if $f$ is injective iff $f^{-1}(f(A)) = A$ for all subsets $A \subseteq X$.

Prove that $f$ is injective iff $f^{-1}(f(A)) = A$ for all subsets $A \subseteq X$.

Since this is an iff statement, I know we must prove two parts of this. I was able to prove, if $f^{-1}(f(A)) = A$ for all subsets $A \subseteq X$ then $f$ is injective (which is written below). What I was unable to do, is prove that if $f$ is injective, $f^{-1}(f(A)) = A$ for all subsets $A \subseteq X$.

We will prove this using the contrapositive. Suppose that $f$ is not injective. Then $\exists a \not = b$ such that $f(a) = f(b)$. Therefore we could state $\{a,b\} \subset f^{-1}(f(\{a\}))$. From this $A = f^{-1}(f(A))$ fails for $A = \{a\}$. This then shows that if $f^{-1}(f(A))= A$ for all subsets $A\subseteq X$, then $f$ is injective.

Next we will prove that if $f$ is injective iff $f^{-1}(f(A)) = A$ for all subsets $A \subseteq X$.

any suggestions for this part?

The proof you gave is good: if $f$ is not injective, then the equality $f^{-1}(f(A))=A$ fails for some subset $A$ of $X$.
For the converse, recall that $A\subseteq f^{-1}(f(A))$ in general. Suppose $f$ is injective and let $x\in f^{-1}(f(A))$; then $f(x)\in f(A)$, so $f(x)=f(a)$, for some $a\in A$. Then…