The following is question 6 from page 99 of Walter Rudin's Principles Of Mathematical Analysis. I'm having trouble understanding what the metric of the graph might be (which, as far as I can tell, is not defined in the text or the problem)...
If f is defined on E, the graph of f is the set of points $(x,f(x))$, for $x \in E$. In particular, if E is a set of real numbers, and f is real-valued, the graph of f is a subset of the plane.
Suppose E is compact, and prove that f is continuous on E if and only if its graph is compact.
I think I've been able to prove the forward result. Suppose that E is compact. Rudin proves a theorem in the text that states the image of a compact metric space under a continuous function is also compact. Therefore, we know that $f(E)$ is compact. Now suppose that $\lbrace G_\alpha \rbrace, \alpha \in A$ is an open cover of the graph, where $G_i = B_i \times C_i$ and $B_i \in E, C_i \in f(E)$. Then $\lbrace A_\alpha \rbrace$ and $\lbrace B_\alpha \rbrace$ are open covers for E and $f(E)$, respectively. Because these sets are compact, their open covers contain finite subcovers, $\lbrace A^\prime_\beta \rbrace$ and $\lbrace B^\prime_\gamma \rbrace$, respectively. Thus, the set of all combinations of $(A^\prime_\beta, B^\prime_\gamma)$ forms a finite open subcover of the graph, proving that the graph is compact.
Actually, I'm really confused at this point, because it's just occured to me while typing the above that I cannot assume that each set $G_i$ can be represented as a set $\lbrace (x,y) \mid x \in A_i, y\in B_i \rbrace$ for open sets $A_i \subseteq E$ and $B_i \subseteq f(E)$.
So at this point, I'm not sure what to do, since I am unable to figure out what the distance metric might be in the metric space containing the graph. Is there a convention for this sort of problem? Did Rudin want the reader to only consider real-valued functions for f?