prove that $f:X\rightarrow Y$ is surjective if and only if $f(f^{-1}(C))=C$

I need help with proving this:

$f:X\rightarrow Y$ is surjective if and only if $f(f^{-1}(C))=C$

$C\subseteq Y$

Thanks.


Solution 1:

Proving that $f(f^{-1}(C)) \subset C$ is trival(not only when $f$ is surjective).

Let us take $y \in C$ and $f$ is onto there is $x \in f^{-1}(C)$ such that $f(x)=y$ so $y \in f(f^{-1}(C)$ so $C \subset f(f^{-1}(C))$ and $C=f(f^{-1}(C))$.