The graph of $f$ is $G(f) = \{(x,f(x)) : x\in X\} \subseteq X\times Y$
$X$ and $Y$ are metric spaces.
a) Suppose $f$ is continuous and prove that $G(f)$ is a closed set.
b) Suppose that $G(f)$ is compact and prove that $f$ is continous
For a), the definition of a closed set that comes to my mind is a set that contains all its limit points (or was it accumulation points?), is there another equivalent definition that may b more helpful to prove a)? Is it possible to prove this directly? Because at first glance the only way I could imagine to prove this is by contradiction or contrapositive.
I imagine that the proof of b) will be immediately derived from a).