A Second Route to the Compact-Image Theorem
The previous tutorial stated that a continuous image of a compact set is compact and used it in examples, and proved that the image is totally bounded. Here we develop a different proof, directly from the open-cover definition of compactness. The central technique is to pull an open cover of the image back to the domain: continuity ensures that the resulting sets are open relative to the domain, and compactness supplies a finite subcover.
The theorem itself is not new here; the goal is to understand its open-cover proof and the role played by continuity. This proof is useful beyond the real line because the same argument applies whenever compactness is defined using open covers and continuity is expressed through open preimages.
Let \(K\subseteq\mathbb{R}\). A set \(V\subseteq K\) is open relative to \(K\) if there is an open set \(G\subseteq\mathbb{R}\) such that \(V=K\cap G\). Such a set may fail to be open in all of \(\mathbb{R}\). For example, \([0,1)\) is open relative to \([0,1]\), since \([0,1)=[0,1]\cap(-1,1)\).
Proof. First suppose \(f\) is continuous at every point of \(K\), and let \(U\subseteq\mathbb{R}\) be open. If \(f^{-1}(U)\) is empty, it is relatively open. Otherwise, take \(x\in f^{-1}(U)\). Since \(U\) is open and \(f(x)\in U\), there is an \(\varepsilon>0\) such that \((f(x)-\varepsilon,f(x)+\varepsilon)\subseteq U\). By continuity at \(x\), there is a \(\delta>0\) such that for \(y\in K\), \(|y-x|<\delta\) implies \(|f(y)-f(x)|<\varepsilon\). Therefore \[ K\cap(x-\delta,x+\delta)\subseteq f^{-1}(U). \] Every \(x\in f^{-1}(U)\) thus has a relative neighborhood contained in \(f^{-1}(U)\), so this preimage is open relative to \(K\).
Conversely, suppose every open subset of \(\mathbb{R}\) has a relatively open preimage under \(f\). Fix \(x\in K\) and \(\varepsilon>0\). The interval \(U=(f(x)-\varepsilon,f(x)+\varepsilon)\) is open, and \(x\in f^{-1}(U)\). Relative openness means there is an open set \(G\subseteq\mathbb{R}\) with \(f^{-1}(U)=K\cap G\). Because \(x\in G\), some \(\delta>0\) satisfies \((x-\delta,x+\delta)\subseteq G\). For any \(y\in K\) with \(|y-x|<\delta\), we have \(y\in K\cap G=f^{-1}(U)\), hence \(|f(y)-f(x)|<\varepsilon\). This proves continuity at \(x\), and \(x\) was arbitrary. \(\square\)
Pulling Back an Open Cover
Suppose \(\{U_\alpha:\alpha\in A\}\) is an open cover of \(f(K)\). This means each \(U_\alpha\) is open in \(\mathbb{R}\), and every value \(f(x)\), \(x\in K\), belongs to at least one \(U_\alpha\). For each index \(\alpha\), consider the inverse image \[ f^{-1}(U_\alpha)=\{x\in K:f(x)\in U_\alpha\}. \] By the lemma, each inverse image is open relative to \(K\). These sets cover \(K\): for any \(x\in K\), the value \(f(x)\) lies in some \(U_\alpha\), so \(x\in f^{-1}(U_\alpha)\).
Compactness is often stated for covers by open subsets of \(\mathbb{R}\), while these inverse images are only relatively open. This difference causes no problem. For each \(\alpha\), choose an open set \(G_\alpha\subseteq\mathbb{R}\) such that \[ f^{-1}(U_\alpha)=K\cap G_\alpha. \] Since the inverse images cover \(K\), the sets \(G_\alpha\) also cover \(K\). Compactness gives finitely many indices \(\alpha_1,\ldots,\alpha_m\) such that \(G_{\alpha_1},\ldots,G_{\alpha_m}\) cover \(K\). For \(x\in K\), membership in one of these ambient open sets means \(x\in K\cap G_{\alpha_i}=f^{-1}(U_{\alpha_i})\). Thus the corresponding inverse images still cover \(K\). This is the finite-subcover step that transfers the argument back to the image.
Proof. If \(K=\varnothing\), then \(f(K)=\varnothing\), which is compact. Now suppose \(K\neq\varnothing\), and let \(\{U_\alpha:\alpha\in A\}\) be any open cover of \(f(K)\). The inverse images \(f^{-1}(U_\alpha)\) are relatively open in \(K\) by the lemma, and they cover \(K\). Write \(f^{-1}(U_\alpha)=K\cap G_\alpha\) with \(G_\alpha\) open in \(\mathbb{R}\). The sets \(G_\alpha\) cover \(K\), so compactness gives indices \(\alpha_1,\ldots,\alpha_m\) for which \(G_{\alpha_1},\ldots,G_{\alpha_m}\) cover \(K\). Consequently, \(f^{-1}(U_{\alpha_1}),\ldots,f^{-1}(U_{\alpha_m})\) cover \(K\). If \(z\in f(K)\), write \(z=f(x)\) for some \(x\in K\). That \(x\) belongs to \(f^{-1}(U_{\alpha_i})\) for some \(i\), so \(z=f(x)\in U_{\alpha_i}\). The selected \(U_{\alpha_i}\) therefore cover \(f(K)\). Every open cover has a finite subcover, which proves compactness. \(\square\)
Worked Examples
Worked Example: An Affine Map on a Closed Interval
Let \(K=[1,2]\) and \(f(x)=3x-5\). The interval \(K\) is compact by the Heine–Borel Theorem, and \(f\) is continuous. At the endpoints, \(f(1)=-2\) and \(f(2)=1\). Since \(f\) is increasing, its values lie between these endpoint values; this can also be checked directly: \(1\leq x\leq2\) implies \(-2\leq3x-5\leq1\). Conversely, if \(-2\leq y\leq1\), set \(x=(y+5)/3\). Then \(1\leq x\leq2\) and \(f(x)=3((y+5)/3)-5=y\). Hence \(f(K)=[-2,1]\), which is compact. The open-cover proof applies to any open cover of this image, not just to a particular choice of intervals.
Worked Example: The Square-Root Map
Let \(K=[0,4]\) and \(f(x)=\sqrt{x}\). The domain is compact. For \(x,y\geq0\), assume first that \(x\geq y\). Then \[ |\sqrt{x}-\sqrt{y}|^2 =(\sqrt{x}-\sqrt{y})^2 \leq(\sqrt{x}-\sqrt{y})(\sqrt{x}+\sqrt{y}) =x-y =|x-y|. \] If \(y\geq x\), the same calculation with \(x\) and \(y\) exchanged gives the same inequality. Thus \(|\sqrt{x}-\sqrt{y}|\leq\sqrt{|x-y|}\), which proves continuity: given \(\varepsilon>0\), it suffices to take \(\delta=\varepsilon^2\).
For \(x\in[0,4]\), \(0\leq\sqrt{x}\leq2\). Conversely, if \(y\in[0,2]\), then \(x=y^2\in[0,4]\) and \(f(x)=\sqrt{y^2}=y\). Therefore \(f(K)=[0,2]\), a compact set. In the cover argument, each open set \(U_\alpha\) covering \([0,2]\) gives a relatively open set of inputs \(\{x\in[0,4]:\sqrt{x}\in U_\alpha\}\); compactness selects finitely many such sets that cover the whole domain.
Worked Example: A Function on a Finite Compact Domain
Take \(K=\{-2,0,3\}\) and \(f(x)=x^2+x\). Every finite subset of \(\mathbb{R}\) is compact, and this polynomial is continuous. Evaluating at each point gives \[ f(-2)=(-2)^2+(-2)=4-2=2,\qquad f(0)=0^2+0=0,\qquad f(3)=3^2+3=9+3=12. \] Hence \(f(K)=\{0,2,12\}\), which is compact. To see the finite-subcover mechanism directly, any open cover of these three output values has a member containing \(0\), a member containing \(2\), and a member containing \(12\). Those at most three members cover the image. The general proof uses continuity and compactness to obtain the same finite-cover conclusion even when the image has infinitely many points.
Worked Example: Why Compactness of the Domain Matters
Define \(f:(0,1)\to\mathbb{R}\) by \(f(x)=x\). The identity function is continuous, but its image is \((0,1)\), which is not compact because it is not closed in \(\mathbb{R}\). The compact-image theorem does not apply: \((0,1)\) is not a compact domain. In the open-cover perspective, the family \(U_n=(1/n,1)\), for integers \(n\geq2\), covers \((0,1)\), since for each \(x\in(0,1)\) there is an \(n\) with \(1/n<x\). No finite subfamily covers \((0,1)\): among finitely many such intervals, the smallest lower endpoint \(1/N\) is positive, leaving the points of \((0,1/N]\) uncovered. This illustrates exactly why compactness is needed to guarantee a finite subcover.
Why This Proof Is Useful
The sequential proof and the open-cover proof emphasize different features of the same theorem. The sequential argument follows a sequence of image values back to a sequence in the domain. The open-cover argument starts with a family of sets covering the image and takes inverse images. In both cases continuity connects the domain and image, while compactness supplies the finite or convergent structure needed to finish.
A common pitfall is to treat a relatively open subset of \(K\) as though it must be open in \(\mathbb{R}\). It need not be: \([0,1)\) is relatively open in \([0,1]\) but is not open in the real line. The proof handles this by writing each relative open set as \(K\cap G_\alpha\), where \(G_\alpha\) is ambient open, and applying compactness to the \(G_\alpha\). Another pitfall is to forget that the finite selection must still cover the image. The key check is that a point \(z\in f(K)\) has the form \(z=f(x)\); a selected inverse image containing \(x\) corresponds to a selected open set containing \(z\).
The theorem does not say that the image has to be an interval, nor does continuity alone guarantee a compact image. What it guarantees is preservation of compactness when both hypotheses hold. Earlier results, including the Heine–Borel Theorem, then let us recognize compact images in \(\mathbb{R}\) as closed and bounded.
Check Your Understanding
Use the open-preimage characterization and the finite-subcover proof to answer these questions.
- What does it mean for a subset of \(K\) to be open relative to \(K\)?
- Why is \(f^{-1}(U_\alpha)\) relatively open when \(U_\alpha\) is open and \(f\) is continuous?
- Why do the ambient open sets \(G_\alpha\), satisfying \(f^{-1}(U_\alpha)=K\cap G_\alpha\), cover \(K\)?
- How does a finite collection of inverse images covering \(K\) imply that the corresponding open sets cover \(f(K)\)?
- In the identity-map example on \((0,1)\), why can no finite subfamily of the stated cover cover the domain?