Show that f is a continuous function if and only if for every closed set C in Y, $f^{-1}(C)$ is closed in X. Suppose X and Y are topological spaces with topology $T^x$  and $T^y$
Let $f: X \to Y$ be a function. 
Show that $f$ is a continuous function if and only if for every closed set $C$ in $Y$, $f^{-1}(C)$ is closed in $X$.
I know that $f$ is continuous function if and only if for every open set $O$ in $Y$, $f^{-1}(O)$ is open in $X$. 
How do I show for every open set $O$ in $Y$, $f^{-1}(O)$ is open in $X$ if and only if for every closed set $C$ in $Y$, $f^{-1}(C)$ is closed in $X$.

HINT: If $C$ is closed then $C = Y - O$ for an open set $O$. What is $f^{-1}(Y-O)$? That proves that the inverse of a closed set is closed. Now use the same idea to show the converse statement.
