Prove $f(x) \in f(A) \implies x \in A$ if $f$ is injective and $b \in B \implies f^{-1}(b) \in f^{-1}(B)$ if $f$ is surjective Let $f: X \to Y$ a function. Let $A \subseteq X, \ B \subseteq Y.$
Prove $f(x) \in f(A) \implies x \in A$ if $f$ is injective and $b \in B \implies f^{-1}(b) \in f^{-1}(B)$ if $f$ is surjective.
Proof:


*

*Suppose $x_1 \in A, \ x_2 \in X - A$ s.t. $x_1 \ne x_2$. By definition of $f$ we have $f(x_1), f(x_2) \in f(A)$ and since $f$ is injective $f(x_1) \ne f(x_2).$ This shows(?) every element in $f(A)$ has a preimage in $A$?

*Suppose $f$ is surjective. Then for any $b \in B$, there's $x \in X$. Since $f^{-1}(B) \subseteq X$, every element in $B$ must have a preimage in $f^{-1}(B).$
Does the proof above make sense? If not, what can I change to fix it? Is there a better way? Thanks.

Assume that $f(x) \in f(A)$. By definition there exists an $a\in A$ such that $f(x)=f(a)$. If $f$ is injective, we conclude that $x=a$ and thus $x\in A$.
For the second statement, assume that $b\in B$ and assume that $f$ is bijective (otherwise $f^{-1}$ is not defined). Note that $f(f^{-1}(b))=b\in B$. It follows that $f^{-1}(b)\in f^{-1}(B)$.
