Properties of injective functions

Hi.

**problem:**

Show that if $\displaystyle f:A\rightarrow B$ is injective and $\displaystyle E\subseteq A$, then $\displaystyle f^{-1}(f(E))=E$.

I worked with this for a while but was unable to come up with a good answer.

After a bit of searching, I fould an article on planetmath which answers this question, but I do not understand it completely.

Here's what it says:

Theorem. Suppose $\displaystyle f:A\rightarrow B$ is an injection. Then, for all $\displaystyle C\subseteq A$, it is the case that $\displaystyle f^{-1}(f(C))=C$.

Proof. It follows from the definition of $\displaystyle f^{-1}$ that $\displaystyle C\subseteq f^{-1}(f(C))$, whether or not $\displaystyle f$ happens to be injective.

Hence, all that need to be shown is that $\displaystyle f^{-1}(f(C))\subseteq C$.

Assume the contrary. Then there would exist $\displaystyle x\in f^{-1}(f(C))$ such that $\displaystyle x\notin C$.

By definition $\displaystyle x\in f^{-1}(f(C))$ means $\displaystyle f(x)\in f(C)$, so there exists $\displaystyle y\in A$ such that $\displaystyle f(x)=f(y)$.

Since $\displaystyle f$ is injective, one would have $\displaystyle x=y$, which is impossible **because $\displaystyle y$ is supposed to belong to $\displaystyle C$** but $\displaystyle x$ is not supposed to belong to $\displaystyle C$.

I do not see why $\displaystyle y$ is supposed to belong to $\displaystyle C$. What am I missing here?

Thanks!