Given $f : X \to Y$, then $f^{-1}(f(X)) = X$ I have to prove the following:

If $f : X \to Y$, then $f^{-1}(f(X)) = X$.

I know that I need to show that each side of the equation is a subset of another. I have proven that $f^{-1}(f(X)) \subseteq X$. however, I don't know how to start the proof for $X \subseteq f^{-1}(f(X))$. Can anyone give me a hint?
 A: So... after some input in comments it seems you are considering a function $f:X\to Y$ and that your aim is to show that $X=f^{-1}(f(X))$. You say you already know that $f^{-1}(f(X))\subseteq X$, hence you are interested in the other inclusion $X\subseteq f^{-1}(f(X))$. Let us prove the more general statement that, for every $Z\subseteq X$, one has $Z\subseteq f^{-1}(f(Z))$. Here we go.
Let $z\in Z$. One wants to show that $z\in f^{-1}(f(Z))$. 
By definition, $f^{-1}(f(Z))=\{x\in X\mid\exists y\in f(Z),\,f(x)=y\}$, so one wants to exhibit some $y\in Y$ such that $y\in f(Z)$ and $f(z)=y$, right? Well, consider $y=f(z)$... Then $y\in f(Z)$ by construction (because $z\in Z$) and $f(z)=y$ hence $z$ fits the definition of $f^{-1}(f(Z))$, that is, $z\in f^{-1}(f(Z))$.
This proves that $Z\subseteq f^{-1}(f(Z))$ for every $Z\subseteq X$, in particular $X\subseteq f^{-1}(f(X))$ hence you are done.
Note that, as mentioned by others, in general for $Z\subset X$, the other inclusion $f^{-1}(f(Z))\subseteq Z$ may be false (and actually, it is false for some $Z\subset X$ as soon as $f$ is not injective).
A: If you write $f: X \longrightarrow Y$, then your claim is true by definition. I don't know how you have proved $f^{-1}(f(X)) \subseteq X$, but I would said that, if you have a map $f: X \longrightarrow Y$, then, for any $B\subseteq Y$, by definition
$$
f^{-1}(B) = \left\{ x \in X \mid f(x) \in B \right\} \ .
$$
Hence, by definition, for every $B$, $f^{-1} (B) \subseteq X$. Right?
Also by definition, if you put $B = f(X)$ in the previous formula, you get
$$
f^{-1}(f(X)) = \left\{ x \in X \mid f(x) \in f(X) \right\} \ .
$$
But, since it is always true, for every $x \in X$, that $f(x) \in f(X)$, it follows that
$$
f^{-1}(f(X)) = X \ .
$$
