$\{(x,f(x)): x\in E\}$ is compact in $\mathbb R^2 \implies f:E\to\mathbb R$ is continuous

Let me expand the proof $3\Rightarrow 1$ with sequences.

Let $x_n \to x$. Then $(x_n,f(x_n))$ is a sequence in the compact set $G$, hence it has a converging subsequence. Since $(x_n)$ is already converging as a whole, this implies that $(f(x_n))$ has a converging subsequence. So we have $x_n \to x$ and $f(x_{n_k})\to y$. By compactness $(x,y) \in G$. This implies $y=f(x)$ by definition of $G$ (there is no $z\ne f(x)$ such that $(x,z)\in G$). Note that the limit $(x,f(x))$ is independent of the chosen subsequence.

If we repeat this argument with an arbitrary subsequence of $(x_n,f(x_n))$, we find that this subsequence has another subsequence converging to $(x,f(x))$. This implies that the whole sequence $(x_n,f(x_n))$ converges to $(x,f(x))$.

Here we have used the following convergence principle: Let $(a_n)$ be a sequence, $a$ a given point. If every subsequence of $(a_n)$ contains another subsequence converging to $a$, then the whole sequence converges to $a$.

This is a very useful principle and holds in much more general situations.


I will help you with your attempt for $[3 \implies 1].$ Your proof is quite interesting due to its versatility. You could use it to prove it for most topological spaces (the Hausdorff ones)!

Lemma: $ f^{-1}(S) = \phi_{1}(G_f \ \cap\ \phi_{2}^{-1}(S))$ for all set S.

Let $S$ be a set. We must prove two inclusions $ f^{-1}(S) \subset \phi_{1}(G_f \ \cap\ \phi_{2}^{-1}(S)) $ and $ \phi_{1}(G_f \ \cap\ \phi_{2}^{-1}(S)) \subset f^{-1}(S). $

  • $ f^{-1}(S) \subset \phi_{1}(G_f \ \cap\ \phi_{2}^{-1}(S)).$

Let $x \in E$ be such that $f(x) \in S,$ i.e., $x\in f^{-1}(S).$ Note that $(x,f(x))$ belongs to $G_f$ and $\phi_{2}(x,f(x))=f(x) \in S$ which yields $(x,f(x)) \in G_f \ \cap\ \phi_2^{-1}(S)$. Consequently, $x \in \phi_1 ( G_f \ \cap\ \phi_2^{-1}(S)).$

  • $ \phi_{1}(G_f \ \cap\ \phi_{2}^{-1}(S)) \subset f^{-1}(S) $

Let $x \in \phi_{1}(G_f \ \cap\ \phi_{2}^{-1}(S)),$ there must exist an $y \in G_f \ \cap\ \phi_{2}^{-1}(S)$ such that $\phi_1 (y) = x.$ Since $y \in G_f,$ there must exist $x'\in E$ such that $y = (x', f(x'))$ and, due to $y \in G_f \ \cap\ \phi_{2}^{-1}(S)$, $\phi_2(y)=\phi_{2}(x',f(x')) = f(x') \in S$. Hence, $x' \in f^{-1}(S),$ but, since $y = (x', f(x'))$, we have $ x' = \phi_1(x',f(x')) = \phi_1(y) = x $. Hence, $x \in f^{-1}(S). $

Proposition: $\{(x,f(x)): x\in E\}$ is compact in $\mathbb R^2 \implies f:E\to\mathbb R$ is continuous

Suppose $G_f = \{(x,f(x)): x\in E \}$ is compact. Define $\phi_1(x,y) = x, \phi_2(x,y) = y$ for all $x \in E$ and $y \in \mathbb{R}$. It's enough to show that inverse image (of $f$) of closed set is closed.

Suppose $S\subset\mathbb R$ is an arbitrary closed set in $\mathbb R$. We have that $$f^{-1}(S) = \{x\in E: f(x) \in S\}$$ and we can write $$f^{-1}(S) = \phi_1(G_f \cap \phi_2^{-1}(S)), $$ due the above lemma. Now, the continuity of $\phi_2$ implies that $\phi_2^{-1}(S)$ is closed. Since $\phi_2^{-1}(S)$ is closed and intersection of closed set with a compact is compact, $G_f \cap \phi_2^{-1}(S)$ is compact. Since $\phi_1$ is continuous, it maps compact set to compact set, which means $f^{-1}(S)$ is compact. Hence, the inverse image of closed set is always closed, as desired.