# Prob. 6, Chap. 4 in Baby Rudin: A function defined on a compact domain is continuous if and only if its graph is compact, but in what metric space?

Here is Prob. 6, Chap. 4 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition:

If $f$ is defined on $E$, the graph of $f$ is the set of points $\left( x, f(x) \right)$, 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.

We can reformulate the above problem as follows:

Suppose $\left( X, d_X \right)$ and $\left( Y, d_Y \right)$ are metric spaces, $E$ is a compact set in the metric space $\left( X, d_X \right)$, and $f$ is a mapping of $E$ into $Y$. Then the graph of $f$ is a subset of $X \times Y$, and even of $E \times Y$ or $E \times f(E)$. Right? Now the conclusion is that $f$ is continuous if and only if the graph of $f$ is compact.

Is this reformulation correct?

If so, then with respect to what metric are we talking about the compactness of the graph? And, how to prove the result?

There is one more thing that I would like to add.

Can we just use the material covered up to this point in Baby Rudin to answer the question I've posed and to give the required proof?

• It is irrelevant: all those subspace topologies are the same. – Crostul Jan 26 '17 at 10:08
• In a metric space you have "compact = closed and bounded" so it is more intuitive : if the graph is not bounded or not closed then $f$ is not continuous. If $f$ is discontinuous around $a$ then its graph isn't closed around $(a,f(a))$ – reuns Jan 26 '17 at 10:11
• OOPs ! In general, a closed and bounded subset of a metric space is not compact ! Example: the closed unit ball in an infinite dimensional normed space is closed and bounded, but not compact ! – Fred Jan 26 '17 at 10:44
• @Crostul how do we know that all these subspace topologies are the same? Could you please post a detailed answer, including a proof of this as well as an answer to each of the other questions of mine? – Saaqib Mahmood Jan 26 '17 at 11:52