10 Connectedness and Compactness
The separation axioms describe how well a topology distinguishes points and closed sets. Connectedness and compactness concern something different: the global shape of a space.
A space is connected if it cannot be split into two disjoint open pieces. Compactness is subtler — it replaces finiteness by a topological condition that retains many of the same consequences. In metric spaces, compactness governs convergence, continuity, boundedness, and existence results, and the two properties together underlie most of classical analysis.
The intermediate value theorem expresses connectedness of intervals. The extreme value theorem and Heine–Borel express compactness of closed bounded subsets of Euclidean space. Both are consequences of general topological facts proved here.
10.1 Connected spaces
Definition 10.1 (Connected space) A topological space \(X\) is connected if the only subsets of \(X\) that are simultaneously open and closed are \(\varnothing\) and \(X\) itself.
Such subsets are clopen. Equivalently, \(X\) is connected if it admits no separation: a decomposition \(X = U \sqcup V\) into two nonempty disjoint open sets.
Proposition 10.1 (Equivalent formulations) For a topological space \(X\), the following are equivalent.
- \(X\) is connected.
- There do not exist nonempty disjoint open sets \(U, V\) with \(X = U \sqcup V\).
- There do not exist nonempty disjoint closed sets \(F, G\) with \(X = F \sqcup G\).
Proof.
\(\Rightarrow\) (b). If \(X = U \sqcup V\) with \(U,V\) nonempty and open, then \(U = X \setminus V\) is clopen and proper, contradicting connectedness.
\(\Rightarrow\) (c). If \(X = F \sqcup G\) with \(F, G\) nonempty and closed, then \(X \setminus F\) and \(X \setminus G\) are nonempty and open with \(X = (X \setminus F) \sqcup (X \setminus G)\).
\(\Rightarrow\) (a). If \(A \subset X\) is nonempty, proper, and clopen, then \(X = A \sqcup (X \setminus A)\) is a decomposition into two nonempty disjoint closed sets. \(\square\)
Example 10.1 (Examples)
The discrete two-point space \(\{0,1\}\) is disconnected: \(\{0\}\) and \(\{1\}\) form a separation.
The indiscrete topology on any set is connected: the only open sets are \(\varnothing\) and \(X\).
\(\mathbb{Q}\) is disconnected: for any irrational \(\alpha\), the sets \((-\infty,\alpha) \cap \mathbb{Q}\) and \((\alpha,\infty) \cap \mathbb{Q}\) are disjoint, open in \(\mathbb{Q}\), and partition \(\mathbb{Q}\).
Every interval in \(\mathbb{R}\) is connected — this is proved below.
The key structural fact is that connectedness is preserved by continuous maps.
Theorem 10.1 (Continuous images of connected spaces) Let \(f : X \to Y\) be continuous. If \(X\) is connected, then \(f(X)\) is connected.
Proof. Suppose for contradiction that \(f(X) = U \sqcup V\) with \(U\) and \(V\) nonempty and open in the subspace topology on \(f(X)\). Then \(f^{-1}(U)\) and \(f^{-1}(V)\) are open in \(X\) by continuity, they are disjoint and nonempty, and \(X = f^{-1}(U) \sqcup f^{-1}(V)\), contradicting connectedness of \(X\). \(\square\)
Theorem 10.2 (Connected subsets of \(\mathbb{R}\)) A subset \(A \subset \mathbb{R}\) is connected if and only if it is an interval.
Proof. Suppose \(A\) is connected. If \(x, y \in A\) with \(x < z < y\) and \(z \notin A\), then \[ A = ((-\infty, z) \cap A) \sqcup ((z, \infty) \cap A) \] is a separation, contradicting connectedness. So \(A\) is an interval (possibly degenerate or unbounded).
Conversely, let \(I\) be an interval and suppose \(I = U \sqcup V\) with \(U\) and \(V\) nonempty and open in the subspace topology. Choose \(u \in U\) and \(v \in V\) with \(u < v\). Set \[ c = \sup\{x \in [u,v] \cap I : x \in U\}. \] Since \(u \in U\) the set is nonempty, and \(c \leq v\). If \(c \in U\), then since \(U\) is open in \(I\) there exists \(\delta > 0\) with \((c, c+\delta) \cap I \subset U\), contradicting the definition of \(c\). If \(c \in V\), then since \(V\) is open in \(I\) there exists \(\delta > 0\) with \((c - \delta, c) \cap I \subset V\), so \(U\) contributes no points near \(c\) from below, contradicting \(c = \sup\). Neither case is possible, so \(I\) admits no separation and is connected. \(\square\)
Corollary 10.1 (Intermediate value theorem) Let \(f : [a,b] \to \mathbb{R}\) be continuous. If \(c\) lies strictly between \(f(a)\) and \(f(b)\), then \(f(x) = c\) for some \(x \in [a,b]\).
Proof. The interval \([a,b]\) is connected, so \(f([a,b])\) is connected in \(\mathbb{R}\) by the preceding theorem. Connected subsets of \(\mathbb{R}\) are intervals, so \(f([a,b])\) is an interval containing \(f(a)\) and \(f(b)\), hence every value between them. \(\square\)
The theorem is therefore a topological fact about intervals, not a property specific to calculus.
10.2 Path connectedness
Definition 10.2 (Path connectedness) A space \(X\) is path connected if for every \(x, y \in X\) there exists a continuous map \(\gamma : [0,1] \to X\) with \(\gamma(0) = x\) and \(\gamma(1) = y\).
Proposition 10.2 (Path connected implies connected) Every path connected space is connected.
Proof. Let \(X\) be path connected and suppose \(X = U \sqcup V\) is a separation. Fix \(u \in U\) and \(v \in V\) and let \(\gamma : [0,1] \to X\) be a path from \(u\) to \(v\). Then \(\gamma([0,1]) = (\gamma([0,1]) \cap U) \sqcup (\gamma([0,1]) \cap V)\) is a separation of \(\gamma([0,1])\). But \([0,1]\) is connected, so \(\gamma([0,1])\) is connected by the continuous image theorem — contradiction. \(\square\)
The converse fails. The topologist’s sine curve \[ S = \left\{\!\left(x, \sin\tfrac{1}{x}\right) : x > 0\right\} \cup \bigl(\{0\} \times [-1,1]\bigr) \subset \mathbb{R}^2 \] is connected but not path connected. The curve \(\{(x, \sin(1/x)) : x > 0\}\) is the continuous image of the connected set \((0, \infty)\), so it is connected. Its closure \(S\) is connected because any open set meeting \(S\) must meet the dense curve piece. However, no path can cross from \(\{x > 0\}\) into \(\{0\} \times [-1,1]\): any such path \(\gamma\) with \(\gamma(1) = (0, y_0)\) must pass through infinitely many oscillations as \(t \to 1\), and the resulting sequence of times at which \(\gamma\) passes through \(x\)-values \(1/(n\pi)\) accumulates at \(t = 1\) with oscillating \(y\)-values, preventing convergence to any single point in the vertical segment.
10.3 Compact spaces
Compactness is the topological replacement for finiteness. The definition is indirect but its consequences are concrete: local bounds become global, local continuity becomes uniform, and local information controls the entire space.
Definition 10.3 (Compact space) A topological space \(X\) is compact if every open cover admits a finite subcover: whenever \(\{U_\alpha\}_{\alpha \in \Lambda}\) satisfies \(X = \bigcup_\alpha U_\alpha\) with each \(U_\alpha\) open, there exist finitely many indices \(\alpha_1, \ldots, \alpha_n\) with \(X = U_{\alpha_1} \cup \cdots \cup U_{\alpha_n}\).
The cover \(\mathbb{R} = \bigcup_{n=1}^\infty (-n, n)\) has no finite subcover, so \(\mathbb{R}\) is not compact. The same cover restricted to any bounded set admits a finite subcover, suggesting that compactness in \(\mathbb{R}^n\) is related to being closed and bounded — as Heine–Borel confirms below.
Compact subsets of Hausdorff spaces are closed: this was proved in the separation axioms chapter, where it followed from the argument that any point outside the compact set can be separated from it by a finite intersection of open sets. We record it here for completeness.
Theorem 10.3 (Compact subsets of Hausdorff spaces are closed) Let \(X\) be Hausdorff and \(K \subset X\) compact. Then \(K\) is closed.
Proof. Let \(x \notin K\). For each \(k \in K\), the Hausdorff condition gives disjoint open sets \(U_k \ni x\) and \(V_k \ni k\). The collection \(\{V_k\}_{k \in K}\) covers \(K\). Compactness extracts a finite subcover \(V_{k_1}, \ldots, V_{k_n}\). Then \(U = U_{k_1} \cap \cdots \cap U_{k_n}\) is an open neighbourhood of \(x\) disjoint from every \(V_{k_j}\), hence disjoint from \(K\). So every point outside \(K\) has a neighbourhood missing \(K\), and \(X \setminus K\) is open. \(\square\)
The continuous image theorem for compactness has the same proof structure as for connectedness.
Theorem 10.4 (Continuous images of compact spaces) Let \(f : X \to Y\) be continuous. If \(X\) is compact, then \(f(X)\) is compact.
Proof. Let \(f(X) \subset \bigcup_\alpha U_\alpha\) be an open cover. Then \(X \subset \bigcup_\alpha f^{-1}(U_\alpha)\) is an open cover of \(X\). Compactness gives a finite subcover: \(X \subset f^{-1}(U_{\alpha_1}) \cup \cdots \cup f^{-1}(U_{\alpha_n})\). Applying \(f\) gives \(f(X) \subset U_{\alpha_1} \cup \cdots \cup U_{\alpha_n}\). \(\square\)
Theorem 10.5 (Extreme value theorem) Let \(K\) be compact and \(f : K \to \mathbb{R}\) continuous. Then \(f\) is bounded and attains its supremum and infimum.
Proof. \(f(K)\) is compact in \(\mathbb{R}\) by the preceding theorem. Compact subsets of \(\mathbb{R}\) are closed and bounded. A closed bounded subset of \(\mathbb{R}\) contains its supremum and infimum: if \(M = \sup f(K)\), then \(M\) is a limit point of \(f(K)\), and since \(f(K)\) is closed, \(M \in f(K)\). \(\square\)
The compactness hypothesis is necessary on both counts: \(f(x) = x\) on \((0,1)\) is bounded but does not attain its supremum; \(f(x) = x\) on \(\mathbb{R}\) is unbounded.
10.4 Compactness in metric spaces
In general topological spaces, compactness and sequential compactness can come apart. Metric spaces are considerably more rigid.
Definition 10.4 (Sequential compactness) A metric space \(X\) is sequentially compact if every sequence in \(X\) has a convergent subsequence.
Definition 10.5 (Total boundedness) A metric space \((X,d)\) is totally bounded if for every \(\varepsilon > 0\) there exist finitely many points \(x_1, \ldots, x_n \in X\) such that \(X \subset \bigcup_{k=1}^n B_\varepsilon(x_k)\).
Total boundedness is stronger than boundedness: it says the space can be approximated by finitely many points at every scale. A bounded set need not be totally bounded — the unit ball of \(\ell^2\) is bounded but not totally bounded, since an infinite orthonormal sequence has no convergent subsequence.
Theorem 10.6 (Compactness in metric spaces) For a metric space \((X,d)\), the following are equivalent.
- \(X\) is compact.
- \(X\) is sequentially compact.
- \(X\) is complete and totally bounded.
Proof. (a) \(\Rightarrow\) (b). Let \((x_n)\) be a sequence in compact \(X\). If the set \(\{x_n : n \in \mathbb{N}\}\) is finite, some value repeats infinitely often and a constant subsequence converges. Otherwise, \(A = \{x_n : n \in \mathbb{N}\}\) is infinite. We claim \(A\) has a limit point. If not, each \(a \in A\) has an open neighbourhood \(U_a\) with \(U_a \cap A = \{a\}\); together with \(X \setminus A\) these form an open cover of \(X\) with no finite subcover, contradicting compactness. So \(A\) has a limit point \(x\), meaning every neighbourhood of \(x\) contains infinitely many terms of \((x_n)\). Inductively choose \(n_1 < n_2 < \cdots\) so that \(x_{n_k} \in B_{1/k}(x)\); then \(x_{n_k} \to x\).
(b) \(\Rightarrow\) (c). Suppose \(X\) is sequentially compact.
Completeness. Let \((x_n)\) be Cauchy. By sequential compactness, some subsequence \(x_{n_k} \to x\). For \(n \geq N\), \(d(x_n, x) \leq d(x_n, x_{n_k}) + d(x_{n_k}, x)\), and both terms are small for large \(k\) and large \(n\) relative to \(k\). Hence \(x_n \to x\).
Total boundedness. Suppose \(X\) is not totally bounded. Then there exists \(\varepsilon > 0\) for which no finite \(\varepsilon\)-net exists. Construct a sequence inductively: pick \(x_1 \in X\) arbitrarily; given \(x_1, \ldots, x_n\), pick \(x_{n+1} \notin \bigcup_{k=1}^n B_\varepsilon(x_k)\), which is possible since finitely many balls do not cover \(X\). Then \(d(x_m, x_n) \geq \varepsilon\) for all \(m \neq n\), so \((x_n)\) has no convergent subsequence — contradicting sequential compactness.
(c) \(\Rightarrow\) (a). Suppose \(X\) is complete and totally bounded. Let \(\{U_\alpha\}\) be an open cover with no finite subcover. Since \(X\) is totally bounded, cover \(X\) by finitely many balls of radius \(1\); at least one, call it \(B^{(0)}\), cannot be covered by finitely many \(U_\alpha\). Repeat with radius \(1/2\): \(B^{(0)}\) is covered by finitely many balls of radius \(1/2\), at least one of which, \(B^{(1)}\), has no finite subcover. Continue, choosing \(B^{(n)}\) of radius \(1/2^n\) with no finite subcover, with \(B^{(n)} \supset B^{(n+1)} \cap X\).
Pick \(x_n \in B^{(n)}\). Then \((x_n)\) is Cauchy since \(\mathrm{diam}(B^{(n)}) \leq 2/2^n \to 0\). Completeness gives \(x_n \to x\). Then \(x \in U_\alpha\) for some \(\alpha\), and \(B_r(x) \subset U_\alpha\) for some \(r > 0\). For large \(n\), \(B^{(n)} \subset B_r(x) \subset U_\alpha\), so \(B^{(n)}\) is covered by a single \(U_\alpha\) — contradicting its choice. \(\square\)
Exercise. Let \(\Omega \subset \mathbb{R}\) be compact. Show that \(C(\Omega)\) equipped with the supremum norm \(\|f\|_\infty = \sup_{x\in\Omega}|f(x)|\) is complete, i.e. is a Banach space. Then explain why \(C(\Omega)\) is not compact as a metric space.
Completeness. Let \((f_n)\) be Cauchy in \((C(\Omega), \|\cdot\|_\infty)\). For each \(x \in \Omega\), \[ |f_n(x) - f_m(x)| \leq \|f_n - f_m\|_\infty \to 0, \] so \((f_n(x))\) is Cauchy in \(\mathbb{R}\) and we define \(f(x) := \lim_{n\to\infty} f_n(x)\). The convergence is uniform: given \(\varepsilon > 0\), choose \(N\) so that \(\|f_n - f_m\|_\infty < \varepsilon\) for \(m, n \geq N\); then for all \(x\), letting \(m\to\infty\) gives \(|f_n(x) - f(x)| \leq \varepsilon\). A uniform limit of continuous functions is continuous, so \(f \in C(\Omega)\).
Non-compactness. \(C(\Omega)\) is infinite-dimensional. The sequence \(f_n(x) = x^n\) on \(\Omega = [0,1]\) is bounded (\(\|f_n\|_\infty = 1\)) but \(\|f_{n_j} - f_{n_k}\|_\infty = 1\) for \(j \neq k\), so no subsequence is Cauchy. Equivalently, by the Riesz lemma the closed unit ball in an infinite-dimensional normed space is never compact.
Exercise. Let \(\Omega \subset \mathbb{R}\) be compact. Show that \[ E := \{f \in C(\Omega) : f(x) > 0 \text{ for all } x \in \Omega\} \] is open in \(C(\Omega)\) under the supremum norm.
Let \(f \in E\). Since \(f\) is continuous on the compact set \(\Omega\), it attains its minimum; set \(\varepsilon := \tfrac{1}{2}\min_{x \in \Omega} f(x) > 0\). For any \(g\) with \(\|g - f\|_\infty < \varepsilon\) and any \(x \in \Omega\), \[ g(x) > f(x) - \varepsilon \geq \min_{x\in\Omega} f(x) - \varepsilon = \varepsilon > 0, \] so \(B(f, \varepsilon) \subseteq E\). \(\square\)
Exercise. Is the set \(E\) above open or closed in \(L^1(\Omega)\) (with \(\Omega = [0,1]\))?
This question probes the relationship between the sup-norm and \(L^1\) topologies. Since \(\|f\|_1 \leq |\Omega|\,\|f\|_\infty\), every \(\|\cdot\|_\infty\)-ball contains an \(L^1\)-ball, so \(\mathscr{T}_{L^1} \subseteq \mathscr{T}_\infty\). The exercise shows this inclusion is strict: \(E\) is open in \(\mathscr{T}_\infty\) but neither open nor closed in \(\mathscr{T}_{L^1}\).
Heuristically, \(L^1\)-closeness permits wild pointwise behaviour on sets of small measure, whereas the sup-norm enforces a uniform band everywhere. On a compact \(\Omega\), the \(L^p\) spaces are nested: for \(p > q \geq 1\), Hölder’s inequality gives \(\|f\|_q \leq |\Omega|^{1/q - 1/p} \|f\|_p\), so \(L^p(\Omega) \subseteq L^q(\Omega)\). Whether \(L^p\) functions have classical regularity in the sense \(L^p \subseteq C^k\) requires additional structure — this is the content of Sobolev embedding theorems, central in PDE theory.
\(E\) is neither open nor closed in \(L^1([0,1])\).
Not open. Let \(f \in E\) and \(\varepsilon > 0\). Fix \(\xi \in (0,1)\) and let \(h_\delta(x) = \alpha(1 - |x-\xi|/\delta)^+\) be a piecewise-linear tent of height \(\alpha\) and support \(U_\delta(\xi)\). Then \(\|h_\delta\|_1 \leq 2\delta\alpha\). Set \(\alpha = f(\xi)+1\) and \(\delta < \varepsilon/(2\alpha)\). Then \(g := f - h_\delta\) satisfies \(\|f-g\|_1 < \varepsilon\) yet \(g(\xi) = f(\xi) - \alpha = -1 < 0\), so \(g \notin E\).
Not closed. The sequence \(f_n \equiv 1/n\) lies in \(E\) and converges to \(0\) in \(L^1\), but \(0 \notin E\). \(\square\)
10.5 Heine–Borel theorem
Theorem 10.7 (Heine–Borel) A subset \(K \subset \mathbb{R}^n\) is compact if and only if it is closed and bounded.
Proof. If \(K\) is compact, it is closed since \(\mathbb{R}^n\) is Hausdorff, and bounded since the cover \(\{B_m(0)\}_{m \geq 1}\) admits a finite subcover.
Conversely, suppose \(K\) is closed and bounded, hence \(K \subset [-M, M]^n\) for some \(M\). We show \([-M, M]^n\) is compact; then \(K\), being a closed subset of a compact space, is compact.
We show \([-M, M]\) is compact. Let \(\{U_\alpha\}\) be an open cover. Set \[ A = \{x \in [-M,M] : [{-M}, x] \text{ is covered by finitely many } U_\alpha\}. \] Then \(-M \in A\), and \(A\) is nonempty. Let \(c = \sup A \leq M\). Some \(U_\alpha\) contains \(c\), and hence contains \((c - \delta, c + \delta) \cap [-M,M]\) for some \(\delta > 0\). By definition of \(c\), the interval \([-M, c - \delta/2]\) is covered by finitely many \(U_\alpha\), so \([-M, c + \delta/2]\) is covered by finitely many \(U_\alpha\). Thus \(c + \delta/2 \in A\), contradicting \(c = \sup A\) unless \(c = M\). So \(c = M\), and \([-M, M]\) is compact.
Finite products of compact spaces are compact: if \(X\) and \(Y\) are compact, let \(\{W_\alpha\}\) cover \(X \times Y\). For each \(x \in X\), the slice \(\{x\} \times Y \cong Y\) is compact, so finitely many \(W_\alpha\) cover \(\{x\} \times Y\); their union contains a neighbourhood \(U_x \times Y\). The \(U_x\) cover \(X\); extract a finite subcover \(U_{x_1}, \ldots, U_{x_n}\); the corresponding finitely many \(W_\alpha\) cover \(X \times Y\). By induction, \([-M,M]^n\) is compact.
Finally, a closed subset of a compact space is compact: if \(F \subset X\) is closed and \(\{U_\alpha\}\) covers \(F\), then \(\{U_\alpha\} \cup \{X \setminus F\}\) covers \(X\); extract a finite subcover and discard \(X \setminus F\). \(\square\)
The theorem fails in infinite dimensions. In \(\ell^2\), the standard basis vectors \(e_n\) form a bounded sequence with \(\|e_m - e_n\|_2 = \sqrt{2}\) for \(m \neq n\), so no subsequence is Cauchy, and the unit ball is not compact.
The next two exercises make the infinite-dimensional failure concrete in \(\ell^\infty\) and \(\ell^1\), first by establishing that these spaces are complete Banach spaces, then by exhibiting an explicit sequence in the unit ball of \(\ell^\infty\) with no convergent subsequence.
Exercise. Prove that \(\ell^\infty\) and \(\ell^1\) are each complete.
\(\ell^\infty\) is complete.
Let \((x^{(n)})\) be Cauchy in \(\ell^\infty\), so \[ \|x^{(n)} - x^{(m)}\|_\infty = \sup_{k \geq 1} |x^{(n)}_k - x^{(m)}_k| \to 0 \quad \text{as } n, m \to \infty. \]
Pointwise limit. For each fixed \(k\), \(|x^{(n)}_k - x^{(m)}_k| \leq \|x^{(n)} - x^{(m)}\|_\infty\), so \((x^{(n)}_k)_n\) is Cauchy in \(\mathbb{R}\) and converges to some \(x_k\). Define \(x = (x_k)\).
\(x \in \ell^\infty\). Given \(\varepsilon > 0\), choose \(N\) so that \(\|x^{(n)} - x^{(m)}\|_\infty < \varepsilon\) for \(n, m \geq N\). For any \(k\), letting \(m \to \infty\) gives \(|x^{(N)}_k - x_k| \leq \varepsilon\), so \(|x_k| \leq \|x^{(N)}\|_\infty + \varepsilon < \infty\) uniformly in \(k\).
Convergence. The same estimate gives \(\sup_k |x^{(n)}_k - x_k| \leq \varepsilon\) for all \(n \geq N\), i.e. \(\|x^{(n)} - x\|_\infty \leq \varepsilon\). \(\square\)
\(\ell^1\) is complete.
Let \((x^{(n)})\) be Cauchy in \(\ell^1\), so \(\|x^{(n)} - x^{(m)}\|_1 = \sum_{k=1}^\infty |x^{(n)}_k - x^{(m)}_k| \to 0\).
Pointwise limit. Since \(|x^{(n)}_k - x^{(m)}_k| \leq \|x^{(n)} - x^{(m)}\|_1\), each coordinate is Cauchy and converges to some \(x_k\).
\(x \in \ell^1\). Fix \(\varepsilon > 0\) and choose \(N\) so that \(\|x^{(n)} - x^{(m)}\|_1 < \varepsilon\) for \(n, m \geq N\). For any finite \(K\), \[ \sum_{k=1}^K |x^{(n)}_k - x_k| = \lim_{m \to \infty} \sum_{k=1}^K |x^{(n)}_k - x^{(m)}_k| \leq \liminf_{m \to \infty} \|x^{(n)} - x^{(m)}\|_1 \leq \varepsilon. \] Letting \(K \to \infty\) gives \(\|x^{(n)} - x\|_1 \leq \varepsilon\) for \(n \geq N\). Since \(x^{(N)} \in \ell^1\) and \(\|x - x^{(N)}\|_1 \leq \varepsilon\), we get \(x \in \ell^1\), and convergence follows from the same bound. \(\square\)
Exercise. Let \(\mathbb{B}_\infty = \{x \in \ell^\infty : \|x\|_\infty \leq 1\}\) be the closed unit ball of \(\ell^\infty\).
Define \(x^{(n)} \in \ell^\infty\) by \(x^{(n)}_k = 1\) if \(k = n\) and \(0\) otherwise. Show that \(x^{(n)} \in \mathbb{B}_\infty\) and \(\|x^{(n)} - x^{(m)}\|_\infty = 1\) for all \(n \neq m\).
Conclude that \(\mathbb{B}_\infty\) is not (sequentially) compact.
(a) Clearly \(\|x^{(n)}\|_\infty = 1\), so \(x^{(n)} \in \mathbb{B}_\infty\). For \(n \neq m\), the \(n\)-th coordinate of \(x^{(n)} - x^{(m)}\) equals \(1\), so \(\|x^{(n)} - x^{(m)}\|_\infty \geq 1\); but also \(\|x^{(n)} - x^{(m)}\|_\infty \leq \|x^{(n)}\|_\infty + \|x^{(m)}\|_\infty = 2\), and in fact examining all coordinates shows \(\|x^{(n)} - x^{(m)}\|_\infty = 1\). \(\square\)
(b) Suppose some subsequence \((x^{(n_j)})\) converges to a limit \(y \in \ell^\infty\). For large \(j \neq j'\), \[ 1 = \|x^{(n_j)} - x^{(n_{j'})}\|_\infty \leq \|x^{(n_j)} - y\|_\infty + \|y - x^{(n_{j'})}\|_\infty \to 0, \] a contradiction. Hence no subsequence converges, and \(\mathbb{B}_\infty\) is not sequentially compact, hence not compact.
This contrasts sharply with finite-dimensional spaces, where Heine–Borel guarantees that every closed bounded set is compact. In infinite-dimensional Banach spaces, the closed unit ball is never compact — a fact that characterises infinite-dimensionality (Riesz’s theorem). \(\square\)
10.6 Compactness and continuity
Compactness converts pointwise conditions into global ones.
Theorem 10.8 (Uniform continuity on compact spaces) Let \((X,d)\) be compact and \((Y,\rho)\) a metric space. Every continuous function \(f : X \to Y\) is uniformly continuous.
Proof. Suppose \(f\) is not uniformly continuous. Then there exists \(\varepsilon > 0\) and sequences \((x_n), (y_n) \subset X\) with \(d(x_n, y_n) < 1/n\) but \(\rho(f(x_n), f(y_n)) \geq \varepsilon\). By sequential compactness, pass to a subsequence with \(x_{n_k} \to x\). Then \(d(x_{n_k}, y_{n_k}) < 1/n_k \to 0\) forces \(y_{n_k} \to x\) as well. Continuity of \(f\) gives \(\rho(f(x_{n_k}), f(y_{n_k})) \to 0\), contradicting \(\rho(f(x_n), f(y_n)) \geq \varepsilon\). \(\square\)
Theorem 10.9 (Compact-to-Hausdorff bijections are homeomorphisms) Let \(f : X \to Y\) be a continuous bijection, where \(X\) is compact and \(Y\) is Hausdorff. Then \(f\) is a homeomorphism.
Proof. It suffices to show \(f\) is a closed map. If \(F \subset X\) is closed, it is compact (closed subset of a compact space). Then \(f(F)\) is compact (continuous image of a compact set), hence closed in \(Y\) since \(Y\) is Hausdorff. So \(f\) sends closed sets to closed sets, which means \(f^{-1}\) is continuous. \(\square\)
This theorem removes the need to verify continuity of the inverse separately: once compactness and Hausdorffness are in hand, any continuous bijection is automatically a homeomorphism.
10.7 Compactness and finite intersection
There is an equivalent formulation of compactness in terms of closed sets, sometimes technically more convenient.
Definition 10.6 (Finite intersection property) A family \(\{F_\alpha\}\) of sets has the finite intersection property if every finite subcollection has nonempty intersection.
Theorem 10.10 (Compact spaces and the finite intersection property) \(X\) is compact if and only if every family of closed sets with the finite intersection property has nonempty total intersection.
Proof. Suppose \(X\) is compact and \(\{F_\alpha\}\) is a family of closed sets with empty intersection. Then \(\{X \setminus F_\alpha\}\) is an open cover of \(X\); compactness yields a finite subcover, so some finite intersection of the \(F_\alpha\) is empty.
Conversely, let \(\{U_\alpha\}\) be an open cover with no finite subcover. The closed sets \(F_\alpha = X \setminus U_\alpha\) then have the finite intersection property, so their total intersection is nonempty — but that intersection is \(\bigcap_\alpha (X \setminus U_\alpha) = X \setminus \bigcup_\alpha U_\alpha = \varnothing\), a contradiction. \(\square\)
Exercise. Show that if \(X\) is compact and \(f : X \to \mathbb{R}\) is continuous with \(f(x) > 0\) for all \(x \in X\), then \(\inf_X f > 0\).
\(f(X)\) is compact in \(\mathbb{R}\), hence closed and bounded. Set \(c = \inf f(X)\). Since \(f(X)\) is closed and \(c\) is a limit point of \(f(X)\), we have \(c \in f(X)\). Since \(f(x) > 0\) everywhere, \(c > 0\). \(\square\)
Exercise. Prove that a metric space is compact if and only if it is complete and totally bounded, without appealing to sequential compactness as an intermediate step.
The direction (c) \(\Rightarrow\) (a) was proved directly in the equivalence theorem above using the nested-ball argument: if no finite subcover exists, construct a Cauchy sequence whose limit is covered by a single set, contradiction. The direction (a) \(\Rightarrow\) (c): compactness implies total boundedness since \(\{B_\varepsilon(x) : x \in X\}\) is an open cover admitting a finite subcover; compactness implies completeness because any Cauchy sequence has a cluster point by (a) \(\Rightarrow\) (b), and a Cauchy sequence with a cluster point converges. \(\square\)