Tutorials › Topology (Undergraduate) › Compact Neighborhoods And Local Compactness

Local Compactness and Compactifications · Tutorial 539 of 799

Compact Neighborhoods And Local Compactness

Learn how compact neighborhoods characterize local compactness in Hausdorff spaces, and how the criteria behave in familiar examples.

Advanced 10 min read

What You'll Learn

  • Define compact neighborhoods and local compactness.
  • Prove equivalent local compactness criteria for Hausdorff spaces.
  • Derive a compact-neighborhood shrinking condition inside any open set.
  • Test local compactness in Euclidean spaces and discrete spaces.
  • Show why the rationals are not locally compact.
  • Identify where the Hausdorff hypothesis is needed.

Local Information from Compact Sets

Compactness is a property of an entire space or of a subset, while local compactness asks whether compactness can be found near each point. The distinction is useful: a space may be noncompact overall but still have compact neighborhoods around all its points. In Hausdorff spaces, several natural ways of expressing this local condition are equivalent.

Recall that a space is compact if every open cover has a finite subcover. A neighborhood here means an open set containing the point; when a compact set contains an open neighborhood, we will call it a compact neighborhood. A compact set need not itself be open.

Definition: A topological space \(X\) is locally compact if every point \(x\in X\) has a compact neighborhood: there is a compact set \(K\subseteq X\) and an open set \(U\) such that \(x\in U\subseteq K\). This definition makes the neighborhood requirement explicit.

Another common formulation asks for an open neighborhood whose closure is compact. The closure \(\overline{U}\) is the smallest closed set containing \(U\). In a Hausdorff space, compact sets are closed, and that fact connects these two formulations. We first establish the compactness facts needed for the equivalence.

Compact Neighborhood Criteria in Hausdorff Spaces

Lemma: A compact subset \(K\) of a Hausdorff space \(X\) is closed in \(X\).

Proof. Let \(z\in X\setminus K\). For each \(y\in K\), the Hausdorff property gives disjoint open sets \(U_y\) and \(V_y\) with \(z\in U_y\) and \(y\in V_y\). The sets \(V_y\) cover \(K\), so compactness gives \(y_1,\ldots,y_n\in K\) such that \(K\subseteq V_{y_1}\cup\cdots\cup V_{y_n}\). The open set \(U_{y_1}\cap\cdots\cap U_{y_n}\) contains \(z\) and is disjoint from \(K\): it is disjoint from each \(V_{y_i}\), and those sets cover \(K\). Thus every point outside \(K\) has an open neighborhood outside \(K\), so \(X\setminus K\) is open and \(K\) is closed. If \(K=\varnothing\), it is closed directly. \(\square\)

Theorem (Compact-neighborhood criteria): For a Hausdorff space \(X\), the following conditions are equivalent:
(1) Every point has a compact neighborhood.
(2) Every point has an open neighborhood \(U\) for which \(\overline{U}\) is compact.
(3) For every \(x\in X\) and every open set \(O\) containing \(x\), there is an open set \(V\) such that \(x\in V\subseteq\overline{V}\subseteq O\) and \(\overline{V}\) is compact.

Proof. Assume (1), and fix \(x\in X\). Choose a compact set \(K\) and an open set \(U\) with \(x\in U\subseteq K\). The lemma makes \(K\) closed. Since \(U\subseteq K\), its closure satisfies \(\overline{U}\subseteq K\). The set \(\overline{U}\) is closed in \(X\), hence closed in \(K\), so it is compact as a closed subset of a compact space. Thus (2) holds.

Assume (2), and fix \(x\in X\) and an open \(O\) containing \(x\). Choose open \(U\) with \(x\in U\) and compact \(K=\overline{U}\). We show that \(x\) has an open neighborhood whose closure lies in \(O\) and is compact.

In the compact Hausdorff subspace \(K\), the set \(F=K\setminus(O\cap U)\) is closed and therefore compact. If \(F\) is empty, take \(W=K\), which is open in \(K\). Otherwise, for each \(y\in F\), use the Hausdorff property in \(K\) to choose disjoint open sets \(G_y,H_y\) with \(x\in G_y\) and \(y\in H_y\). Compactness of \(F\) gives a finite subcover \(H_{y_1},\ldots,H_{y_m}\) of \(F\). Set \(W=G_{y_1}\cap\cdots\cap G_{y_m}\). Then \(W\) is open in \(K\), contains \(x\), and is disjoint from \(H_{y_1}\cup\cdots\cup H_{y_m}\). Consequently \(\overline{W}^{\,K}\subseteq K\setminus(H_{y_1}\cup\cdots\cup H_{y_m})\subseteq O\cap U\), where \(\overline{W}^{\,K}\) denotes closure in \(K\).

Write \(W=G\cap K\) for an open set \(G\) in \(X\), as permitted by the subspace topology, and let \(V=G\cap U\). Then \(V\) is open in \(X\), contains \(x\), and is contained in \(W\). Since \(K\) is closed in \(X\), \(\overline{V}\subseteq K\); within \(K\), \(\overline{V}\subseteq\overline{W}^{\,K}\subseteq O\cap U\). Thus \(\overline{V}\subseteq O\). It is a closed subset of compact \(K\), hence compact. This proves (3).

Finally, (3) implies (2) by taking \(O=X\); then \(V\) is an open neighborhood with compact closure. And (2) implies (1), since the compact set \(\overline{U}\) contains the open neighborhood \(U\). All three conditions hold vacuously when \(X=\varnothing\). \(\square\)

The shrinking condition (3) is stronger in appearance than merely finding some compact neighborhood: it lets us keep the compact neighborhood inside any prescribed open set around the point. The Hausdorff hypothesis entered through the fact that compact subsets are closed and through separation inside the compact set.

Worked Tests

Worked Example: Euclidean Space

Show that \(\mathbb{R}^n\), with its Euclidean topology, is locally compact. Here \(n\geq 1\), and \(x\in\mathbb{R}^n\) is arbitrary.

Take the open ball \(U=B(x,1)\) and the closed ball \(K=\{y\in\mathbb{R}^n:\|y-x\|\leq 1\}\). The triangle inequality shows that \(K\) is bounded: \(\|y\|\leq\|x\|+1\) for every \(y\in K\). The distance function \(y\mapsto\|y-x\|\) is continuous, so \(K\) is closed. By the Heine–Borel theorem, a closed and bounded subset of \(\mathbb{R}^n\) is compact. Also \(x\in U\subseteq K\). Thus \(K\) is a compact neighborhood of \(x\), as required.

Check: this works for each \(x\), and the radius \(1\) is positive, so the open ball really is a neighborhood. The argument proves local compactness, not compactness of all of \(\mathbb{R}^n\).

Worked Example: The Rationals

Show that \(\mathbb{Q}\), with the subspace topology inherited from \(\mathbb{R}\), is not locally compact.

Suppose instead that some \(q\in\mathbb{Q}\) had a compact neighborhood \(K\subseteq\mathbb{Q}\). Then \(K\) contains a relative open neighborhood \(U\) of \(q\). By the definition of the subspace topology, there is an open set \(G\subseteq\mathbb{R}\) with \(U=G\cap\mathbb{Q}\). Since \(q\in G\), some \(\varepsilon>0\) satisfies \((q-\varepsilon,q+\varepsilon)\subseteq G\). Hence \(\mathbb{Q}\cap(q-\varepsilon,q+\varepsilon)\subseteq K\).

The inclusion map from \(\mathbb{Q}\) into \(\mathbb{R}\) is continuous, so it sends compact sets to compact sets: an open cover of the image pulls back to an open cover of the compact domain, and a finite subcover pulls forward. Therefore \(K\), viewed as a subset of \(\mathbb{R}\), is compact and is closed in \(\mathbb{R}\) by the lemma. It contains every rational in \((q-\varepsilon,q+\varepsilon)\), a set dense in that real interval. Since \(K\) is closed, it must contain \((q-\varepsilon,q+\varepsilon)\). This is impossible because \(K\subseteq\mathbb{Q}\) and every nonempty real interval contains irrational numbers. Thus no \(q\) has a compact neighborhood, and \(\mathbb{Q}\) is not locally compact.

Check: the contradiction applies to any proposed \(q\) and any \(\varepsilon>0\), so it rules out local compactness at every rational, not just at one point.

Worked Example: A Discrete Space

Let \(X\) be any set with the discrete topology, in which every subset is open. For any \(x\in X\), the singleton \(\{x\}\) is open and compact. Indeed, any open cover of \(\{x\}\) has a member containing \(x\), and that one member is a finite subcover. Thus \(\{x\}\) is a compact neighborhood and \(X\) is locally compact.

If \(X=\varnothing\), the condition “every point has a compact neighborhood” is vacuously true. If \(X\) is nonempty, the singleton argument applies point by point, whether or not \(X\) itself is compact.

Check: in the discrete topology \(\overline{\{x\}}=\{x\}\), since the singleton is closed as well as open. So this example also satisfies the open-neighborhood-with-compact-closure criterion directly.

Why the Hausdorff Hypothesis Matters

The theorem uses Hausdorffness to ensure compact sets are closed. Without it, a compact neighborhood need not yield an open neighborhood with compact closure. Here is an explicit example.

Let \(Y\) be an infinite set, let \(x\notin Y\), and put \(X=\{x\}\cup Y\). Give \(X\) the topology consisting of \(\varnothing\) and all sets of the form \(\{x\}\cup A\), where \(A\subseteq Y\). These sets form a topology: arbitrary unions and finite intersections of nonempty sets of this form again have this form. The singleton \(\{x\}\) is open and compact, so it is a compact neighborhood of \(x\).

However, every nonempty open set contains \(x\). Therefore every open neighborhood \(U\) of \(x\) has closure \(X\): for any \(y\in Y\), every open neighborhood of \(y\) also contains \(x\), and so intersects \(U\). The space \(X\) is not compact, because the open cover \(\{\{x,y\}:y\in Y\}\) has no finite subcover: a finite collection covers only finitely many points of the infinite set \(Y\). Thus \(x\) has a compact neighborhood but no open neighborhood with compact closure. This space is not Hausdorff, since every pair of nonempty open sets contains \(x\) and so cannot be disjoint.

Common pitfall. In \(\mathbb{Q}\), one might take a bounded relative interval and argue that its closure is compact because it is bounded and “closed in \(\mathbb{Q}\).” That conclusion misuses Heine–Borel, which concerns closed and bounded subsets of \(\mathbb{R}^n\), not subsets of \(\mathbb{Q}\). For example, \(\mathbb{Q}\cap[-1,1]\) is bounded and closed in \(\mathbb{Q}\), but if it were compact, its image in \(\mathbb{R}\) would be compact and therefore closed in \(\mathbb{R}\). It is not closed in \(\mathbb{R}\): it contains rational numbers arbitrarily close to \(\sqrt{2}/2\), but does not contain \(\sqrt{2}/2\). Boundedness alone does not supply a compact neighborhood.

Check Your Understanding

Use the definitions and the compact-neighborhood criteria to answer the following.

  1. Explain why a compact neighborhood \(K\) in a Hausdorff space gives an open neighborhood with compact closure.
  2. Does the discrete topology on an infinite set make the whole space compact? Is the space locally compact? Justify both answers.
  3. Which step in the proof of the compact-neighborhood criteria uses the Hausdorff property?
  4. Why does the argument for \(\mathbb{Q}\) rule out a compact neighborhood at every rational point?
  5. In the non-Hausdorff example, verify directly that the displayed family \(\{\{x,y\}:y\in Y\}\) has no finite subcover.