Graph of continuous function from compact space is compact.

I know this question seems to have been asked hundreds of times, but I don't really see how any of the existing answers address my concern, so I'm hoping that maybe someone here might be able to clarify. Exercise 6, chapter 4 Rudin's "Principles of Mathematical Analysis"

Suppose E is compact, and prove that f is continuous on E if and only if its graph is compact.

So, if I suppose that $f|X\rightarrow Y$, then the graph of $f$ is $G_f=\{x,f(x)|x\in X\}$. This in turn is a subset of $X\times Y$- no problem. However, in order to reason on whether $G_f$ is compact, don't I need to assume some topology on $X\times Y$? Don't I necessarily sacrifice generality by making such an assumption?

So first, am I correct in thinking that assuming a topology on $X\times Y$ constitutes a loss of generality, and second, is there a way to approach this problem without making such an assumption (i.e., using the case of a general topology, rather than a specific one such as the product topology).


Solution 1:

I'll assume $f: X \to Y$, $X$ Hausdorff. Then the graph of $f$ is compact iff $X$ is continuous.

$X \times Y$ has the product topology. This is quite safe to assume in general; only if explicitly mentioned otherwise products get the product topology.

We must assume $X$ is Hausdorff (so if it's metrisable, as often the case in Rudin, you're OK), as otherwise counterexamples exist: e.g. $X$ the integers in the cofinite topology, $Y = \{0,1\}$ (discrete), $f(2n) = 0, f(2n+1) = 1$, which has compact graph but is not continuous.

If $X$ is compact, the its graph is too, as the image of $X$ under the (continuous!) map $x \to (x, f(x))$ from $X$ into $X \times Y$ (where $Y$ is the codomain). This does not yet need Hausdorffness of $X$.

If $G_f = \{ (x, f(x)): x \in X \}$ is compact, let $K$ be closed in $Y$. Let $p$ be the restriction of the projection onto the first coordinate from $G_f$ onto $E$, so $p((x, f(x)) = x$ for all $x \in X$. This is a continuous and closed map (as $X$ is Hausdorff). Also $X \times K \subset X \times Y$ is closed in the product topology, so $(X \times K) \cap G_f$ is closed in $G_f$, and $f^{-1}[K] = p[(X \times K) \cap G_f ]$ is thus closed in $E$. As $K$ was arbitrary, $f$ is continuous.