A Reliable Structure for Compactness Proofs
Compactness arguments often require more than recognizing a theorem: the main work is identifying the right formulation and using its hypotheses in the right order. The Heine–Borel Theorem is an efficient first check for subsets of \(\mathbb{R}\): compactness is equivalent to being closed and bounded. If the claim concerns an open cover, however, the definition of compactness may be the most direct route. If it concerns the behavior of sequences, the Sequential Characterization of Compactness in \(\mathbb{R}\) may simplify the proof.
The previous tutorial used counterexamples to show what can fail when a compactness hypothesis is absent. Here we turn to proof construction. We will use the Heine–Borel Theorem, the Sequential Characterization of Compactness in \(\mathbb{R}\), the theorem that compact sets are sequentially compact, and the fact that continuous images of compact sets are compact. These results are already established; the goal is to apply them to new conclusions.
A useful proof habit is to write down the quantifiers before trying to choose points. For example, uniform continuity requires one \(\delta\) that works for every pair of points in the domain. Ordinary continuity permits a different \(\delta\) at each point. Compactness will let us pass from this point-by-point information to one global choice.
Uniform Continuity on a Compact Set
The distinction from continuity is important. Continuity at a point \(x\) controls \(f(y)\) when \(y\) is close to that particular \(x\). Uniform continuity controls the change in \(f\) for every pair of sufficiently close inputs at once. On a compact domain, continuity is enough to guarantee this stronger property.
Proof. If \(K\) is empty, the definition of uniform continuity is satisfied vacuously, so suppose \(K\) is nonempty. We argue by contradiction. Suppose \(f\) is not uniformly continuous. Then there is some \(\varepsilon_0>0\) such that for every \(\delta>0\), there are \(x,y\in K\) satisfying \(|x-y|<\delta\) and \(|f(x)-f(y)|\geq\varepsilon_0\).
For each positive integer \(n\), use \(\delta=1/n\) to choose \(x_n,y_n\in K\) such that \[ |x_n-y_n|<\frac{1}{n} \quad\text{and}\quad |f(x_n)-f(y_n)|\geq\varepsilon_0. \] Since \(K\) is compact, the Compact Sets Are Sequentially Compact Theorem gives a subsequence \((x_{n_k})\) converging to some \(x\in K\). The paired points approach the same limit, because \[ |y_{n_k}-x| \leq |y_{n_k}-x_{n_k}|+|x_{n_k}-x| <\frac{1}{n_k}+|x_{n_k}-x|. \] Both terms on the right tend to \(0\), so \(y_{n_k}\to x\) as well.
Continuity of \(f\) at \(x\) now gives \(f(x_{n_k})\to f(x)\) and \(f(y_{n_k})\to f(x)\). Therefore \[ |f(x_{n_k})-f(y_{n_k})| \leq |f(x_{n_k})-f(x)|+|f(y_{n_k})-f(x)| \longrightarrow 0. \] This contradicts \(|f(x_{n_k})-f(y_{n_k})|\geq\varepsilon_0\) for every \(k\). The contradiction shows that \(f\) is uniformly continuous. \(\square\)
The key move is to pair the two sequences. Compactness gives a convergent subsequence of one sequence, and the condition \(|x_n-y_n|<1/n\) forces the corresponding points of the other sequence to converge to the same limit. Continuity can then be applied at one point to both sequences, contradicting their supposedly persistent separation in function values.
Worked Example: A Uniform Estimate for the Square Function
Let \(f(x)=x^2\) on \(K=[-2,3]\). The function is continuous and \(K\) is compact, so the theorem guarantees uniform continuity. We can also find an explicit choice of \(\delta\).
For \(x,y\in[-2,3]\), \[ |f(x)-f(y)|=|x^2-y^2|=|x-y||x+y|. \] Since \(-4\leq x+y\leq6\), we have \(|x+y|\leq6\), and hence \[ |f(x)-f(y)|\leq6|x-y|. \] Given \(\varepsilon>0\), choose \(\delta=\varepsilon/6\). If \(x,y\in K\) and \(|x-y|<\delta\), then \[ |f(x)-f(y)|\leq6|x-y|<6\delta=\varepsilon. \] Thus the function is uniformly continuous, with a single \(\delta\) that works throughout the interval.
The compactness theorem guarantees existence of a suitable \(\delta\), while the estimate supplies one directly. The direct estimate is useful when available, but it is not required for the general theorem.
Worked Example: Uniform Continuity of the Square Root
Consider \(f(x)=\sqrt{x}\) on \([0,9]\). For \(x\geq y\geq0\), both sides of the following inequality are nonnegative, and \[ (\sqrt{x}-\sqrt{y})^2=x+y-2\sqrt{xy}\leq x-y. \] Indeed, the inequality is equivalent to \(y\leq\sqrt{xy}\), which follows from \(y^2\leq xy\). Taking nonnegative square roots gives \[ |\sqrt{x}-\sqrt{y}|\leq\sqrt{|x-y|}. \] If \(y\geq x\), the same inequality follows by interchanging \(x\) and \(y\).
Given \(\varepsilon>0\), choose \(\delta=\varepsilon^2\). Whenever \(x,y\in[0,9]\) and \(|x-y|<\delta\), the estimate yields \[ |\sqrt{x}-\sqrt{y}|\leq\sqrt{|x-y|}<\sqrt{\delta}=\varepsilon. \] Thus the square-root function is uniformly continuous, including near \(0\), where a derivative-based estimate would need special care.
Compactness and Continuity of an Inverse
A second useful compactness argument concerns one-to-one continuous functions. A continuous injection from a compact set into \(\mathbb{R}\) has a continuous inverse on its image. Compactness matters because it ensures that images of closed subsets of the domain remain closed in the image, which is precisely the property needed to establish continuity of the inverse.
Proof. If \(K\) is empty, the assertion is immediate. Otherwise, set \(Y=f(K)\) and let \(A\) be any subset closed in \(K\). By the definition of relative closedness, there is a closed set \(F\subseteq\mathbb{R}\) such that \(A=K\cap F\). The Heine–Borel Theorem implies that \(K\) is closed in \(\mathbb{R}\), so \(A\) is closed in \(\mathbb{R}\). Since \(A\subseteq K\) and \(K\) is compact, the theorem that closed subsets of compact sets are compact shows that \(A\) is compact.
By the Continuous Images of Compact Sets Theorem, \(f(A)\) is compact in \(\mathbb{R}\), and compact subsets of \(\mathbb{R}\) are closed. Because \(f\) is injective, its inverse on \(Y\) is well-defined, and \[ (f^{-1})^{-1}(A)=\{y\in Y:f^{-1}(y)\in A\}=f(A). \] Thus the inverse image under \(f^{-1}\) of every set closed in \(K\) is closed in \(Y\). The closed-set criterion for continuity, equivalently the open-preimage criterion from the Continuity and Open Preimages Lemma, now shows that \(f^{-1}:Y\to K\) is continuous. \(\square\)
The proof uses the compactness of the domain twice: first to make each closed subset \(A\) compact, and then to make its image \(f(A)\) compact and therefore closed. Injectivity has a different role: it ensures that the inverse exists as a function and gives the displayed identity. Neither condition is incidental.
Worked Example: The Inverse of the Cubing Function
Define \(f:[-1,1]\to\mathbb{R}\) by \(f(x)=x^3\). The interval \([-1,1]\) is compact, and \(f\) is continuous. It is injective because \(x<y\) implies \(x^3<y^3\). Its image is \([-1,1]\): if \(x\in[-1,1]\), then \(x^3\in[-1,1]\), and every \(y\in[-1,1]\) is the image of \(x=\sqrt[3]{y}\in[-1,1]\).
The theorem therefore guarantees that the inverse \(f^{-1}:[-1,1]\to[-1,1]\), given by \(f^{-1}(y)=\sqrt[3]{y}\), is continuous. This conclusion follows from compactness and injectivity together; the inverse does not need a separate continuity proof at \(0\) or at the endpoints.
Choosing a Route and Checking the Details
These arguments illustrate two different ways compactness turns local information into a global conclusion. In the uniform-continuity proof, a sequence detects failure of a single global \(\delta\). Compactness then produces a convergent subsequence, and continuity at its limit rules out that failure. In the inverse-continuity proof, closed subsets are carried to closed subsets of the image because compactness preserves the needed closedness through continuous images.
For a finite selection, start with an open cover. For a limit or uniform estimate, consider a sequence. For a subset of the real line, check the Heine–Borel conditions.
Failure of uniform continuity gives one fixed positive \(\varepsilon_0\) and, for every \(n\), a pair of points less than \(1/n\) apart whose function values differ by at least \(\varepsilon_0\).
For the sequence argument, extract a convergent subsequence with limit in the domain. For the inverse argument, verify that each relevant subset is closed in the compact domain before applying compactness.
Use continuity at the resulting limit to obtain a contradiction, or use closed preimages to establish continuity of the inverse.
A frequent gap in a uniform-continuity proof is to say only that continuity supplies a \(\delta\). Pointwise continuity supplies a \(\delta\) for each fixed point; it does not by itself provide one \(\delta\) for all pairs in the domain. The compactness argument is what justifies the global conclusion. Another common gap is to extract a convergent subsequence without checking that its limit belongs to the domain. Sequential compactness supplies both the subsequence and an in-set limit, which is essential for applying continuity.
In inverse-function arguments, distinguish between being closed in \(K\) and being closed in \(\mathbb{R}\). The proof above checks this step: because \(K\) is closed in \(\mathbb{R}\), a relatively closed subset \(A\) of \(K\) is also closed in \(\mathbb{R}\). Once this is established, the compact-image argument can be applied without assuming the conclusion.
Check Your Understanding
Use the definitions and proofs in this tutorial to answer the following questions.
- In the proof of uniform continuity, why do the paired points \(y_{n_k}\) converge to the same limit as \(x_{n_k}\)?
- Which quantifiers in the definition of uniform continuity differ from those in continuity at a single point?
- For \(f(x)=x^2\) on \([-2,3]\), why does \(|x+y|\leq6\) give the choice \(\delta=\varepsilon/6\)?
- In the inverse-continuity proof, why must a relatively closed subset of \(K\) also be closed in \(\mathbb{R}\)?
- Where are compactness and injectivity each used in proving that a continuous injection has a continuous inverse?