# Prove that a graph of a continuous function on a compact set is compact

I'm referencing the book, Advanced Calculus, 3rd ed., by Creighton Buck. I feel like the proof is fallacious, but want to confirm my suspicion. I'll state one direction of the proof first, and then call out the particular point where I feel it is fallacious.

Let $f$ be a function defined on a compact set $D$ in $n$ space and taking values in $m$ space, and let $G$ be its graph. Then $f$ is continuous on $D$ if and only if $G$ is compact.

Let the graph of $f$ be $$G = \{\text{all } P = (p,q) \text{ where } q = f(p), \text{ and } p \in D\}$$ Assume that $G$ is compact. We want to show that $f$ must be continuous. Suppose that this were false. Then there would be some point $p_0$ in $D$, and a sequence $\{p_n\}$ in $D$ with $p_n \rightarrow p_0$, and an $\epsilon > 0$ such that $|f(p_n) - f(p_0)| > \epsilon$ for all $n$. Put $q_n = f(p_n)$ and consider the points $P_n = (p_n, q_n)$ in $G$, for $n = 1, 2, ...$. Note that $p_n \rightarrow p_0 \in D$, but that $|q_n - f(p_0)| > \epsilon$. Because $G$ is compact, the sequence $\{P_n\}$ must have a subsequence $\{P_{n_k}\}$ that converges to some point $(p, q)$ in $G$. Accordingly, $\lim_{n \rightarrow \infty}p_{n_k} = p$ and $\lim_{n \rightarrow \infty}q_{n_k} = q$. However, since $\{p_{n_k}\}$ is a subsequence of $\{p_n\}$, which itself converges to $p_0$, we have $p = p_0$. Because the point $(p, q)$ in in $G$, which is the graph of $f$, $q = f(p) = f(p_0)$. However, $\lim_{n \rightarrow \infty}q_{n_k} = f(p_0)$ and $|q_n - f(p_0)| > \epsilon$ are not both possible. We thus conclude that $f$ is continuous on $D$.

I take issue with this statement in the proof:

If $f$ were not continuous, then there would be some point $p_0$ in $D$, and a sequence $\{p_n\}$ in $D$ with $p_n \rightarrow p_0$, and an $\epsilon > 0$ such that $|f(p_n) - f(p_0)| > \epsilon$ for all $n$.

Buck is using the convergence preserving property of continuous functions, which states that a function $f$ is continuous if and only if for any sequence $p_n \rightarrow p$, then $f(p_n) \rightarrow f(p_0)$. Why does this inequality hold true for all $n$?

I feel like this should say:

If $f$ were not continuous, then there would be some point $p_0$ in $D$, and a sequence $\{p_n\}$ in $D$ with $p_n \rightarrow p_0$, and an $\epsilon > 0$ such that for any $N$, $\exists n > N$ such that $|f(p_n) - f(p_0)| > \epsilon$.

With this correction, however, I'm not able to continue with his line of reasoning to arrive at the proof.

• The statement in the proof is correct. Your "corrected" statement actually implies the original: just remove the first $N$ elements of the sequence and then you have that $|f(p_n) - f(p_0)|>\epsilon$ for all $n$. – Trevor Norton Jul 1 '18 at 17:51
• Not sure if this is true. What I'm saying is that there exists some $n > N$ such that $|f(p_n) - f(p_0)| > \epsilon$, not that all $p_n$ for $n > N$ has this property. However, I suppose such a sequence of $p_n$ can be constructed in such a way, as Jose points out, since we can keep a sequence of $N_1, N_2, ...$ with $N_{k+1} > N_k$, with a corresponding sequence of $p_{n_1}, p_{n_2}, ...$ such that $|f(p_{n_k}) - f(p_0)| > \epsilon$. This would then be a sequence with this property for each element in the sequence. – ison Jul 1 '18 at 18:18
• Yes you are right. I wasn't reading closely enough. – Trevor Norton Jul 1 '18 at 18:20

Asserting that $f$ is not continuous at $p_0$ means that$$(\exists\varepsilon>0)(\forall\delta>0)(\exists p\in D):\|p-p_0\|<\delta\wedge\bigl\|f(p)-f(p_0)\bigr\|\geqslant\varepsilon.$$So, take such a $\varepsilon>0$ and take $\varepsilon'\in(0,\varepsilon)$. Let $n$ be a natural number. Then there's a $p_n\in D$ such that $\|p_n-p_0\|<\frac1n$ and $\bigl\|f(p_n)-f(p_0)\bigr\|\geqslant\varepsilon>\varepsilon'$. So, $\lim_{n\to\infty}p_n=p_0$ and$$(\forall n\in\mathbb{N}):\bigl\|f(p_n)-f(p_0)\bigr\|>\varepsilon'.$$
I think it is easier to show directly. Suppose $x_k \in D \to x$, we want to show that $f(x_k) \to f(x)$.
A useful result is that if a sequence $\alpha _k$ is bounded and there is an $\alpha$ such that every subsequence contains a further subsequence that converges to $\alpha$, then $\alpha_k \to \alpha$.
Suppose $(x_k ,f(x_k)) \in G$ and $x_k \to x$. Since $G$ is compact, the sequence $f(x_k)$ is bounded. Let $f(x_{k_n})$ be a subsequence. By compactness there is a further subsequence that converges to some value $\phi$. Since $G$ is closed, we have $(x,\phi)\in G$ and so $\phi=f(x)$. By the previous result, we have $f(x_k) \to f(x)$.