Let $f:X\rightarrow Y$ be any map. The graph of f is the set $\Gamma_f=\{(x,f(x))| x\in X\}\subset X \times Y$.
Assume that Y is compact. Prove that if $\Gamma_f \subset X \times Y$ is closed then $f$ is continous.
I was able to prove the converse (where it was also given that Y is Hausdorff), but I'm having trouble proving this direction.