Chapter 9 · Topology

9.4 Connectedness and Compactness

The two properties that every continuous image inherits — connectedness (no splitting into two open pieces) and compactness (every open cover has a finite subcover) — with path-connectedness, components, the topologist's sine curve, Tychonoff's theorem, compact Hausdorff spaces, the one-point compactification, and their use to tell spaces apart.

Two theorems of first-year calculus carry most of real analysis: the intermediate value theorem (a continuous function on an interval takes every value between two of its values) and the extreme value theorem (a continuous function on a closed bounded interval attains a maximum). Neither is really about numbers. The first holds because an interval cannot be split into two disjoint nonempty open pieces — it is connected; the second because every open cover of $[a,b]$ has a finite subcover — it is compact. Both properties are defined by open sets alone, both survive continuous maps, and so both make sense in every topological space. In Unit 1 (§7.2 Compactness in Metric Spaces and §7.3 Connectedness) you met them in metric spaces, where compactness can be tested by sequences and Heine–Borel. Here we work in general spaces, where sequences are not enough and where the Hausdorff property of §9.3 decides how compact sets behave.

Connectedness and compactness are also the main topological invariants of point-set topology: if two spaces differ in one of them, they are not homeomorphic. This is how one proves that $[0,1]$, $[0,1)$ and $(0,1)$ are pairwise non-homeomorphic, that a circle is not an interval, that $\mathbb{R}$ is not $\mathbb{R}^2$, and that the letters T and X are different shapes. CSIR NET asks exactly such questions in Part B ("which pair is homeomorphic?") and Part C ("which of the following subsets of $\mathbb{R}^2$ are connected / compact / path-connected?"), and the false options are almost always the classical counterexamples collected in this section: the topologist's sine curve, the box topology, $[0,1)\to S^1$, the cofinite topology, and the line with two origins of §9.3.

Connected Spaces

📘 Definition 9.24 — Separation; connected space

A separation of a topological space $X$ is a pair $U,V$ of disjoint nonempty open subsets of $X$ with $X=U\cup V$. The space $X$ is a connected space if it has no separation. A subset $Y\subseteq X$ is connected if it is connected in the subspace topology.

Equivalently (Exercise I.7), $Y\subseteq X$ is disconnected iff $Y=A\cup B$ with $A,B$ nonempty and $\overline{A}\cap B=\varnothing=A\cap\overline{B}$ (closures in $X$): neither piece contains a limit point of the other.

📐 Theorem 9.52 — Three equivalent forms of connectedness
For a topological space $X$ the following are equivalent: (i) $X$ is connected; (ii) the only subsets of $X$ that are both open and closed (clopen) are $\varnothing$ and $X$; (iii) every continuous map $f:X\to\{0,1\}$, where $\{0,1\}$ has the discrete topology, is constant.

Proof. (i)$\Rightarrow$(ii): if $U$ is clopen with $\varnothing\ne U\ne X$, then $U$ and $X\setminus U$ are disjoint nonempty open sets covering $X$ — a separation. (ii)$\Rightarrow$(iii): $f^{-1}(\{0\})$ is clopen (preimage of a clopen set), so it is $\varnothing$ or $X$, i.e. $f$ is constant. (iii)$\Rightarrow$(i): if $U,V$ is a separation, the function equal to $0$ on $U$ and $1$ on $V$ is continuous (the preimage of each of the four subsets of $\{0,1\}$ is $\varnothing$, $U$, $V$ or $X$) and not constant. ∎

📐 Theorem 9.53 — A connected set lies on one side
If $U,V$ is a separation of $Y\subseteq X$ (open in $Y$) and $A\subseteq Y$ is connected, then $A\subseteq U$ or $A\subseteq V$.

Proof. $A\cap U$ and $A\cap V$ are disjoint, open in $A$, and cover $A$. As $A$ is connected one of them is empty, so $A$ lies in the other. ∎

📐 Theorem 9.54 — Continuous images of connected spaces are connected
If $X$ is connected and $f:X\to Y$ is continuous, then $f(X)$ is connected. In particular connectedness is a topological invariant.

Proof. Regard $f$ as a continuous surjection $X\to f(X)$. If $g:f(X)\to\{0,1\}$ is continuous, then $g\circ f:X\to\{0,1\}$ is continuous, hence constant by Theorem 9.52; since $f$ is onto $f(X)$, $g$ is constant. By Theorem 9.52 again, $f(X)$ is connected. ∎

📐 Theorem 9.55 — The connected subsets of $\mathbb{R}$ are the intervals
A subset $S\subseteq\mathbb{R}$ (usual topology) is connected if and only if it is an interval: whenever $x\lt z\lt y$ with $x,y\in S$, also $z\in S$. Consequently (intermediate value theorem) if $X$ is connected and $f:X\to\mathbb{R}$ is continuous, then $f(X)$ is an interval.

Proof. If $S$ is not an interval, pick $x\lt z\lt y$ with $x,y\in S$, $z\notin S$; then $S\cap(-\infty,z)$ and $S\cap(z,\infty)$ form a separation of $S$. Conversely let $S$ be an interval and suppose $U,V$ is a separation of $S$ (sets open in $S$). Choose $a\in U$, $b\in V$; by symmetry $a\lt b$. Then $[a,b]\subseteq S$. Let $s=\sup\big(U\cap[a,b]\big)$; $s\in[a,b]\subseteq S$, so $s\in U$ or $s\in V$.

Case $s\in U$. Then $s\ne b$ (as $b\in V$), so $s\lt b$. $U$ is open in $S$, so some $[s,s+\delta)\cap S\subseteq U$ with $s+\delta\le b$; these points lie in $U\cap[a,b]$ and exceed $s$, contradicting $s=\sup$. Case $s\in V$. Then $s\gt a$ (as $a\in U$), and $V$ open in $S$ gives some $(s-\delta,s]\subseteq V$ with $s-\delta\ge a$. Then $U\cap[a,b]\subseteq[a,s-\delta]$, so $\sup\le s-\delta\lt s$, a contradiction. Hence $S$ has no separation. The last statement follows from Theorem 9.54. ∎

📐 Theorem 9.56 — Unions and closures of connected sets

(a) If $\{A_\alpha\}$ is a family of connected subsets of $X$ with a point in common, then $\bigcup_\alpha A_\alpha$ is connected. More generally, if connected sets $A_1,A_2,\dots$ satisfy $A_n\cap A_{n+1}\ne\varnothing$ for all $n$, then $\bigcup_n A_n$ is connected.

(b) If $A$ is connected and $A\subseteq B\subseteq\overline{A}$, then $B$ is connected. In particular $\overline{A}$ is connected.

Proof. (a) Let $p$ be a common point and $Y=\bigcup A_\alpha$. If $U,V$ were a separation of $Y$ with $p\in U$, each $A_\alpha$ would lie in $U$ by Theorem 9.53 (it meets $U$ at $p$), so $V=\varnothing$. For the chain, $B_n=A_1\cup\cdots\cup A_n$ is connected by induction ($B_n$ and $A_{n+1}$ share a point), and the $B_n$ all contain $A_1$, so their union is connected by the first part. (b) Let $U,V$ be a separation of $B$. By Theorem 9.53, $A\subseteq U$, say. Then $\overline{A}\cap V=\varnothing$: a point of $V$ has the neighbourhood $V$ (open in $B$, so $V=W\cap B$ with $W$ open in $X$), and $W$ misses $A\subseteq U$. Since $B\subseteq\overline{A}$, $V=\varnothing$ — a contradiction. ∎

📐 Theorem 9.57 — Products of connected spaces
A finite product of connected spaces is connected. An arbitrary product $\prod_\alpha X_\alpha$ of connected spaces is connected in the product topology. In contrast, $\mathbb{R}^{\mathbb{N}}$ with the box topology is not connected.

Proof. Two factors. Fix $(a,b)\in X\times Y$. For each $x\in X$ the "cross" $T_x=(X\times\{b\})\cup(\{x\}\times Y)$ is connected: both pieces are homeomorphic to $X$, $Y$ and they share the point $(x,b)$ (Theorem 9.56(a)). All $T_x$ contain $(a,b)$, and their union is $X\times Y$, so $X\times Y$ is connected. Induct for finitely many factors.

Arbitrary products. Fix $a=(a_\alpha)$. For each finite set $F$ of indices, the set $P_F$ of points agreeing with $a$ outside $F$ is homeomorphic to $\prod_{\alpha\in F}X_\alpha$, hence connected, and all $P_F$ contain $a$; so $P=\bigcup_F P_F$ is connected. $P$ is dense: a basic open set $\prod U_\alpha$ restricts only finitely many coordinates, say those in $F$, so it contains a point of $P_F$ (choose $u_\alpha\in U_\alpha$ for $\alpha\in F$ and $a_\alpha$ elsewhere). By Theorem 9.56(b), $\overline{P}=\prod X_\alpha$ is connected.

Box topology. Let $A$ be the set of bounded real sequences and $B$ the unbounded ones. If $x\in A$, the box $\prod_n(x_n-1,x_n+1)$ consists of bounded sequences, so $A$ is box-open; if $x\in B$, the same box consists of unbounded sequences, so $B$ is box-open. $A,B$ is a separation. (In the product topology this argument fails: a basic set restricts only finitely many coordinates, and contains both bounded and unbounded sequences.) ∎

📘 Definition 9.25 — Components; totally disconnected spaces
Define $x\sim y$ on $X$ if some connected subset of $X$ contains both $x$ and $y$. The equivalence classes are the connected components (components) of $X$. $X$ is totally disconnected if its only connected subsets are singletons and $\varnothing$ (equivalently, all components are singletons).
📐 Theorem 9.58 — Properties of components
$\sim$ is an equivalence relation. The component $C(x)$ of $x$ is the union of all connected sets containing $x$; it is connected, it is the largest connected set containing $x$, and it is closed. The components partition $X$; every nonempty connected subset lies in exactly one component; and a homeomorphism maps components onto components, so the number of components is a topological invariant.

Proof. Reflexivity: $\{x\}$ is connected. Symmetry is built in. Transitivity: if $A\ni x,y$ and $B\ni y,z$ are connected, then $A\cup B$ is connected (common point $y$) and contains $x,z$. The class of $x$ is the union of all connected sets containing $x$, which is connected by Theorem 9.56(a) and is therefore the largest one. Its closure is connected (Theorem 9.56(b)) and contains $x$, so $\overline{C(x)}\subseteq C(x)$: components are closed. A nonempty connected set $A$ lies in $C(a)$ for any $a\in A$. Finally a homeomorphism $h$ maps connected sets to connected sets in both directions, so $h(C(x))=C(h(x))$. ∎

Components are always closed but need not be open: in $\mathbb{Q}$ every component is a single point (Example 1), and points are not open in $\mathbb{Q}$. If $X$ has finitely many components, each is open (its complement is a finite union of closed sets).

✏️ Example 1 — Connected or not?
Decide whether each space is connected, and find its components: (a) $\mathbb{Q}$ and $\mathbb{R}\setminus\mathbb{Q}$ (usual topology); (b) an infinite set with the cofinite topology; (c) the Sorgenfrey line $\mathbb{R}_\ell$; (d) $GL_n(\mathbb{R})$, the invertible real $n\times n$ matrices, as a subspace of $\mathbb{R}^{n^2}$.
(a) Totally disconnected Let $S\subseteq\mathbb{Q}$ contain two points $x\lt y$. Choose an irrational $z$ between them; $S\cap(-\infty,z)$ and $S\cap(z,\infty)$ separate $S$. So the components of $\mathbb{Q}$ are its points. The same argument with a rational $z$ works for $\mathbb{R}\setminus\mathbb{Q}$. (Equivalently: by Theorem 9.55 a connected subset of $\mathbb{R}$ is an interval, and the only intervals inside $\mathbb{Q}$ or $\mathbb{R}\setminus\mathbb{Q}$ are points.)
(b) Connected Any two nonempty open sets $X\setminus F$, $X\setminus G$ meet (their intersection $X\setminus(F\cup G)$ is infinite), so there are no disjoint nonempty open sets at all. The single component is $X$. (The same holds for the cocountable topology on $\mathbb{R}$ and the indiscrete topology.)
(c) Totally disconnected Every basic set $[a,b)$ is clopen: its complement $(-\infty,a)\cup[b,\infty)$ is a union of half-open intervals. If $S$ contains $x\lt y$, then $S\cap[x,y)$ and $S\setminus[x,y)$ separate $S$ (the first contains $x$, the second $y$). So the components of $\mathbb{R}_\ell$ are its points — although $\mathbb{R}_\ell$ has no isolated points.
(d) Not connected $\det:GL_n(\mathbb{R})\to\mathbb{R}\setminus\{0\}$ is continuous (a polynomial in the entries) and onto (use $\mathrm{diag}(t,1,\dots,1)$). Its image is not an interval, so $GL_n(\mathbb{R})$ is not connected (Theorems 9.54, 9.55). One can show $\{\det\gt0\}$ and $\{\det\lt0\}$ are path-connected, so there are exactly two components. In contrast $GL_n(\mathbb{C})$ is connected (Exercise I.5).

Path-Connectedness and Cut Points

📘 Definition 9.26 — Paths; path-connected spaces; path components
A path in $X$ from $x$ to $y$ is a continuous map $\gamma:[0,1]\to X$ with $\gamma(0)=x$, $\gamma(1)=y$. $X$ is a path-connected space if any two points are joined by a path. Writing $x\approx y$ when a path joins them gives an equivalence relation (reverse paths; concatenate $\gamma$ then $\delta$ at double speed), whose classes are the path components of $X$.
📐 Theorem 9.59 — Path-connected spaces are connected
Every path-connected space is connected. Continuous images and arbitrary products (product topology) of path-connected spaces are path-connected, and a union of path-connected sets with a common point is path-connected. Each path component lies inside a component.

Proof. Fix $x_0\in X$. For each $x$, the image $\gamma_x([0,1])$ of a path from $x_0$ to $x$ is connected (Theorems 9.54, 9.55) and contains $x_0$; $X$ is the union of these sets, so it is connected by Theorem 9.56(a). If $\gamma$ joins $x,y$ in $X$ and $f$ is continuous, $f\circ\gamma$ joins $f(x),f(y)$. In a product, if $\gamma_\alpha$ joins $x_\alpha$ to $y_\alpha$, then $t\mapsto(\gamma_\alpha(t))_\alpha$ is continuous (each coordinate is, §9.2) and joins $x$ to $y$. Unions with a common point $p$: go from $x$ to $p$ and on to $y$. The last statement: a path component is path-connected, hence connected, hence inside one component. ∎

📐 Theorem 9.60 — Open connected subsets of $\mathbb{R}^n$ are path-connected
If $U\subseteq\mathbb{R}^n$ is open and connected, then $U$ is path-connected (indeed any two points are joined by a polygonal path in $U$). The same holds in every normed space.

Proof. Fix $p\in U$ and let $P$ be the set of points of $U$ joined to $p$ by a polygonal path in $U$. $P$ is open: if $q\in P$ and $B(q,r)\subseteq U$, every point of the ball is joined to $q$ by a segment inside the (convex) ball. $U\setminus P$ is open: if $q\notin P$ and $B(q,r)\subseteq U$, no point $z$ of the ball is in $P$, for otherwise appending the segment $[z,q]$ would put $q$ in $P$. Since $p\in P$ and $U$ is connected, $U\setminus P=\varnothing$. ∎

📐 Theorem 9.61 — The topologist's sine curve
Let $G=\{(x,\sin\tfrac1x):0\lt x\le1\}$ and $J=\{0\}\times[-1,1]$. The topologist's sine curve $S=G\cup J\subseteq\mathbb{R}^2$ is connected (and compact) but not path-connected. Its path components are $G$ and $J$, and $G$ is not closed in $S$.

Proof. Connected. $G$ is the image of the connected interval $(0,1]$ under the continuous map $x\mapsto(x,\sin\tfrac1x)$, so it is connected. Every point $(0,y)$ with $|y|\le1$ is a limit of points of $G$: with $\theta=\arcsin y$, the points $x_n=1/(\theta+2\pi n)\to0$ satisfy $\sin(1/x_n)=y$, so $(x_n,y)\to(0,y)$. Conversely, if $(x_n,\sin\frac1{x_n})\to(x,y)$ with $x\gt0$, continuity gives $y=\sin\frac1x$; and if $x=0$ then $|y|\le1$. So $\overline{G}=S$. By Theorem 9.56(b), $S$ is connected. It is closed and bounded, hence compact (Heine–Borel, Unit 1, §7.2).

Not path-connected. Suppose $\gamma:[0,1]\to S$ is a path with $\gamma(0)\in J$ and $\gamma(1)\in G$. The set $\gamma^{-1}(J)$ is closed (as $J$ is closed) and nonempty; let $t_0$ be its largest element. Then $t_0\lt1$, $\gamma(t_0)\in J$ and $\gamma(t)\in G$ for $t\gt t_0$. Write $\gamma(t)=(x(t),y(t))$, so $x(t_0)=0$ and, for $t\gt t_0$, $x(t)\gt0$ and $y(t)=\sin(1/x(t))$. For each $n$, the continuous function $x$ takes every value between $0$ and $x(t_0+\tfrac1n)\gt0$ on $[t_0,t_0+\tfrac1n]$ (when $t_0+\tfrac1n\le1$). Choose $u_n$ in that range with $\sin(1/u_n)=(-1)^n$ (take $1/u_n=\tfrac\pi2+k\pi$ with $k$ large and of the right parity), and $s_n\in(t_0,t_0+\tfrac1n]$ with $x(s_n)=u_n$. Then $s_n\to t_0$ while $y(s_n)=(-1)^n$ does not converge — contradicting the continuity of $y$ at $t_0$. So no path joins $J$ to $G$. Both $G$ (image of an interval) and $J$ (a segment) are path-connected, so they are the path components; $G$ is not closed because its closure is $S$. ∎

Intuition: a path from the segment to the curve would have to perform infinitely many full oscillations between heights $-1$ and $1$ in an arbitrarily short time. The sine curve is the standard reason for the one-way arrow "path-connected $\Rightarrow$ connected".

✏️ Example 2 — Path-connected sets in the plane
Prove that (a) $\mathbb{R}^n\setminus\{0\}$ is path-connected for $n\ge2$; (b) the sphere $S^{n-1}=\{x\in\mathbb{R}^n:|x|=1\}$ is path-connected for $n\ge2$; (c) $\mathbb{R}^2\setminus\mathbb{Q}^2$ (points with at least one irrational coordinate) is path-connected.
(a) Let $x,y\ne0$. If $0$ is not on the segment $[x,y]$, use the segment. Otherwise $y=-cx$ with $c\gt0$; as $n\ge2$, choose $z\ne0$ not on the line through $x$ (and $0$), and go $x\to z\to y$; neither segment passes through $0$ because $z$ is off the line $\mathbb{R}x$.
(b) $S^{n-1}$ is the image of $\mathbb{R}^n\setminus\{0\}$ under the continuous map $x\mapsto x/|x|$, and continuous images of path-connected spaces are path-connected (Theorem 9.59).
(c) Fix an irrational $\alpha$; the horizontal line $L=\{y=\alpha\}$ lies in $X=\mathbb{R}^2\setminus\mathbb{Q}^2$. Let $p=(a,b)\in X$. If $a$ is irrational, the vertical segment from $(a,b)$ to $(a,\alpha)$ has irrational first coordinate, so it lies in $X$ and reaches $L$. If $a$ is rational then $b$ is irrational; the horizontal segment from $(a,b)$ to $(\alpha,b)$ lies in $X$ (second coordinate $b$), and then the vertical segment from $(\alpha,b)$ to $(\alpha,\alpha)$ lies in $X$ (first coordinate $\alpha$). Every point is joined to the path-connected set $L$, so $X$ is path-connected.
Contrast $\mathbb{R}\setminus\mathbb{Q}$ is totally disconnected, but removing a countable set from the plane leaves it path-connected: there is "room to go around".

Connectedness becomes a sharp tool for distinguishing spaces once we remove points. If $h:X\to Y$ is a homeomorphism, then for each $p$ it restricts to a homeomorphism $X\setminus\{p\}\to Y\setminus\{h(p)\}$, so by Theorem 9.58 the two have the same number of components.

📘 Definition 9.27 — Cut points
A point $p$ of a connected space $X$ is a cut point if $X\setminus\{p\}$ is disconnected. More finely, the cut-point profile of $X$ records, for each $k$, how many points $p$ make $X\setminus\{p\}$ have exactly $k$ components.
📐 Theorem 9.62 — Removing points is a homeomorphism invariant
If $h:X\to Y$ is a homeomorphism, then $X\setminus\{p\}$ and $Y\setminus\{h(p)\}$ have the same number of components for every $p\in X$. Hence homeomorphic spaces have the same number of cut points and the same cut-point profile; the same holds for the removal of any finite number of points.

Proof. $h$ restricts to a bijection $X\setminus\{p\}\to Y\setminus\{h(p)\}$ which is continuous with continuous inverse (restrictions of continuous maps to subspaces are continuous, §9.2), so it is a homeomorphism; apply Theorem 9.58. Removing $p_1,\dots,p_k$ works the same way. ∎

✏️ Example 3 — Telling spaces apart by removing points
Show that no two of the following are homeomorphic: (a) $[0,1]$, $[0,1)$, $(0,1)$; (b) $\mathbb{R}$ and $\mathbb{R}^n$ for $n\ge2$; (c) $S^1$ and $[0,1]$; (d) the letters T and X drawn as unions of segments in the plane.
(a) Count non-cut points. In $(0,1)$ every point is a cut point. In $[0,1)$ exactly one point ($0$) is not a cut point. In $[0,1]$ exactly two ($0$ and $1$) are not. A homeomorphism maps non-cut points to non-cut points bijectively, so the three spaces are pairwise non-homeomorphic. (Compactness also separates $[0,1]$ from the other two.)
(b) $\mathbb{R}\setminus\{0\}$ is disconnected, while $\mathbb{R}^n\setminus\{p\}$ is connected for every $p$ when $n\ge2$ (Example 2(a)). A homeomorphism $h:\mathbb{R}\to\mathbb{R}^n$ would make $\mathbb{R}\setminus\{0\}\cong\mathbb{R}^n\setminus\{h(0)\}$. (Distinguishing $\mathbb{R}^2$ from $\mathbb{R}^3$ needs more: algebraic topology.)
(c) $S^1$ minus any point is homeomorphic to an open interval, hence connected: $S^1$ has no cut points. $[0,1]$ minus $\tfrac12$ is disconnected.
(d) Removing the centre of X leaves $4$ components. For T, removing a point leaves at most $3$ components ($3$ at the junction, $2$ at other interior points, $1$ at the tips). So no homeomorphism can exist. Interactive 1 lets you compute these profiles.
Interactive 1 — Remove a Point, Count the Pieces

A point $p$ (hollow circle) travels over the space and is removed. The rest, $X\setminus\{p\}$, is coloured by its connected components, one colour per component. The number of components at each point is a homeomorphism invariant (Theorem 9.62), so the profile — which counts occur, and how often — tells spaces apart. Compare the segment with the circle, the tripod (letter Y or T) with the cross (letter X), and the circle with the θ-curve: those last two have the same profile, yet are not homeomorphic (remove two points).

space—
p is—
components of X ∖ {p}—
profile—

Compact Spaces

📘 Definition 9.28 — Open covers; compact spaces

An open cover of $X$ is a family $\mathcal{U}$ of open sets whose union is $X$; a subcover is a subfamily that still covers $X$. $X$ is a compact space if every open cover of $X$ has a finite subcover. A subset $Y\subseteq X$ is compact if it is compact in the subspace topology; equivalently, every cover of $Y$ by open sets of $X$ has a finite subfamily covering $Y$.

A family of sets has the finite intersection property (FIP) if every finite subfamily has nonempty intersection.

📐 Theorem 9.63 — Compactness via closed sets
$X$ is compact if and only if every family of closed subsets of $X$ with the finite intersection property has nonempty intersection. In particular, in a compact space a decreasing sequence $F_1\supseteq F_2\supseteq\cdots$ of nonempty closed sets has $\bigcap_n F_n\ne\varnothing$.

Proof. By De Morgan, a family $\{F_\alpha\}$ of closed sets has empty intersection iff the open sets $X\setminus F_\alpha$ cover $X$, and a finite subfamily has empty intersection iff the corresponding complements form a finite subcover. So "every open cover has a finite subcover" is the contrapositive of "every closed family with FIP has nonempty intersection". A decreasing sequence of nonempty sets has FIP (a finite subfamily intersects to its smallest member). ∎

📐 Theorem 9.64 — Closed subsets of compact spaces are compact
If $X$ is compact and $F\subseteq X$ is closed, then $F$ is compact.

Proof. Let $\mathcal{U}$ be a cover of $F$ by open sets of $X$. Adding the open set $X\setminus F$ gives an open cover of $X$, which has a finite subcover; discarding $X\setminus F$ from it leaves finitely many members of $\mathcal{U}$ covering $F$. ∎

📐 Theorem 9.65 — Compact subsets of Hausdorff spaces
Let $X$ be Hausdorff. (a) If $K\subseteq X$ is compact and $x\notin K$, there are disjoint open sets $U\ni x$ and $V\supseteq K$. (b) Hence every compact subset of a Hausdorff space is closed. (c) Disjoint compact sets $K,L$ in $X$ have disjoint open neighbourhoods.

Proof. (a) For each $y\in K$ choose disjoint open $U_y\ni x$, $V_y\ni y$. The $V_y$ cover $K$, so finitely many $V_{y_1},\dots,V_{y_m}$ do. Put $V=V_{y_1}\cup\cdots\cup V_{y_m}\supseteq K$ and $U=U_{y_1}\cap\cdots\cap U_{y_m}\ni x$, open as a finite intersection. A point of $U\cap V$ would lie in some $U_{y_i}\cap V_{y_i}=\varnothing$. (b) By (a) each $x\notin K$ has an open neighbourhood missing $K$, so $X\setminus K$ is open. (c) For each $x\in K$, (a) gives disjoint open $U_x\ni x$, $V_x\supseteq L$; finitely many $U_x$ cover $K$; their union and the intersection of the corresponding $V_x$ work. ∎

📐 Theorem 9.66 — Continuous images; the closed map lemma

(a) If $X$ is compact and $f:X\to Y$ is continuous, then $f(X)$ is compact. In particular (extreme value theorem) a continuous $f:X\to\mathbb{R}$ on a nonempty compact space is bounded and attains its maximum and minimum.

(b) If $X$ is compact, $Y$ is Hausdorff and $f:X\to Y$ is continuous, then $f$ maps closed sets to closed sets. Consequently a continuous bijection from a compact space onto a Hausdorff space is a homeomorphism.

Proof. (a) If $\mathcal{V}$ is an open cover of $f(X)$, the sets $f^{-1}(V)$, $V\in\mathcal{V}$, cover $X$; finitely many do, and the corresponding $V$'s cover $f(X)$. For real $f$, $f(X)$ is a compact subset of $\mathbb{R}$, hence closed and bounded (Heine–Borel), so it contains its supremum and infimum. (b) If $F\subseteq X$ is closed, it is compact (Theorem 9.64), so $f(F)$ is compact (part (a)), hence closed in the Hausdorff space $Y$ (Theorem 9.65). If $f$ is a continuous bijection, $(f^{-1})^{-1}(F)=f(F)$ is closed for every closed $F$, so $f^{-1}$ is continuous. ∎

Part (b) is the workhorse for identifying quotient spaces (§9.2): $t\mapsto(\cos2\pi t,\sin2\pi t)$ induces a continuous bijection from the compact quotient $[0,1]/(0\sim1)$ onto the Hausdorff circle, which is therefore a homeomorphism. Both hypotheses matter: the same formula is a continuous bijection $[0,1)\to S^1$ that is not a homeomorphism ($[0,1)$ is not compact), and the identity from $[0,1]$ with the usual topology onto $[0,1]$ with the indiscrete topology is a continuous bijection onto a compact non-Hausdorff space that is not a homeomorphism.

📐 Theorem 9.67 — Compact Hausdorff spaces are normal
Every compact Hausdorff space is normal (hence regular and completely regular, §9.3).

Proof. Singletons are closed ($T_2\Rightarrow T_1$). Disjoint closed sets $A,B$ are compact (Theorem 9.64), so Theorem 9.65(c) separates them by disjoint open sets. ∎

📐 Theorem 9.68 — The tube lemma; finite products of compact spaces
(a) Tube lemma. Let $Y$ be compact, $x_0\in X$, and $N$ an open subset of $X\times Y$ containing the slice $\{x_0\}\times Y$. Then some open $W\ni x_0$ satisfies $W\times Y\subseteq N$. (b) If $X$ and $Y$ are compact, so is $X\times Y$; hence every finite product of compact spaces is compact.

Proof. (a) For each $y\in Y$ choose a basic open $U_y\times V_y$ with $(x_0,y)\in U_y\times V_y\subseteq N$. The $V_y$ cover the compact $Y$; take $V_{y_1},\dots,V_{y_m}$ and put $W=U_{y_1}\cap\cdots\cap U_{y_m}$. For $(x,y)\in W\times Y$: $y\in V_{y_i}$ for some $i$, and $x\in U_{y_i}$, so $(x,y)\in U_{y_i}\times V_{y_i}\subseteq N$. (b) Let $\mathcal{A}$ be an open cover of $X\times Y$. For each $x\in X$ the slice $\{x\}\times Y\cong Y$ is compact, so finitely many members of $\mathcal{A}$ cover it; their union $N_x$ is open and contains the slice, so by (a) contains a tube $W_x\times Y$. Finitely many $W_{x_1},\dots,W_{x_k}$ cover the compact $X$; the finitely many members of $\mathcal{A}$ used for $N_{x_1},\dots,N_{x_k}$ cover $X\times Y$. Induct for more factors. ∎

📐 Theorem 9.69 — Tychonoff's theorem (statement)
An arbitrary product $\prod_{\alpha\in J}X_\alpha$ of compact spaces is compact in the product topology.

Idea of proof. Using Theorem 9.63, take a family $\mathcal{A}$ of subsets with FIP and enlarge it, by Zorn's lemma, to a maximal family $\mathcal{D}$ with FIP. For each $\alpha$ the sets $\overline{\pi_\alpha(D)}$, $D\in\mathcal{D}$, are closed in $X_\alpha$ with FIP, so by compactness of $X_\alpha$ they have a common point $x_\alpha$. Maximality of $\mathcal{D}$ forces every subbasic neighbourhood $\pi_\alpha^{-1}(U_\alpha)$ of $x=(x_\alpha)$, and hence every basic one, to belong to $\mathcal{D}$; so every basic neighbourhood of $x$ meets every $D\in\mathcal{D}$, i.e. $x\in\bigcap_{D\in\mathcal{D}}\overline{D}$. Tychonoff's theorem is equivalent to the axiom of choice (Kelley, 1950). For finitely many factors no choice is needed (Theorem 9.68), and for countably many compact metric factors a diagonal argument with sequences suffices.

In $\mathbb{R}^n$ (Heine–Borel) and in metric spaces you already have practical tests from Unit 1, §7.2: a subset of $\mathbb{R}^n$ is compact iff it is closed and bounded, and a metric space is compact iff it is sequentially compact iff it is complete and totally bounded. In general topological spaces none of these tests is available: "closed and bounded" makes no sense without a metric, and compactness and sequential compactness are different properties (the pitfalls box gives the examples).

✏️ Example 4 — Compact or not?
Decide which of the following are compact: (a) any subset of an infinite set $X$ with the cofinite topology; (b) $[0,1]$ in the Sorgenfrey line $\mathbb{R}_\ell$; (c) an infinite subset $A$ of $\mathbb{R}$ with the cocountable topology; (d) $[0,1]^{\mathbb{N}}$ with the product topology, and with the box topology.
(a) Compact Let $Y\subseteq X$ and let $\mathcal{U}$ be a cover of $Y$ by open sets of $X$; we may assume $Y\ne\varnothing$. Pick one member $U_0=X\setminus F$ meeting $Y$ ($F$ finite). It misses at most the finitely many points of $Y\cap F$, each of which lies in some member of $\mathcal{U}$. So finitely many members cover $Y$. Every subset is compact — but not every subset is closed: the cofinite space is not Hausdorff, and Theorem 9.65(b) fails.
(b) Not compact The sets $U_n=[0,1-\tfrac1n)$, $n\ge2$, and $[1,2)$ are open in $\mathbb{R}_\ell$ and cover $[0,1]$. A finite subfamily covers at most $[0,1-\tfrac1N)\cup\{1\}$, missing $1-\tfrac1{2N}$ for instance. The point $1$ is "isolated from the left" in $\mathbb{R}_\ell$.
(c) Not compact $A$ contains distinct points $a_1,a_2,\dots$. Let $C=\{a_n:n\in\mathbb{N}\}$ and $U_k=(\mathbb{R}\setminus C)\cup\{a_k\}$, which is open (its complement $C\setminus\{a_k\}$ is countable). The $U_k$ cover $\mathbb{R}\supseteq A$, but $U_{k_1}\cup\dots\cup U_{k_m}$ misses every $a_n$ with $n\notin\{k_1,\dots,k_m\}$. So the compact subsets of the cocountable line are exactly the finite sets.
(d) Product: compact; box: not Product topology: Tychonoff (or the diagonal argument for countable products of compact metric spaces). Box topology: the subset $\{0,1\}^{\mathbb{N}}$ is closed (it is closed in the coarser product topology), and in the box topology it is discrete — the box $\prod_n(x_n-\tfrac12,x_n+\tfrac12)$ meets it only in $x$. An infinite discrete closed subset of a compact space would be compact (Theorem 9.64) yet have the open cover by singletons with no finite subcover. So $[0,1]^{\mathbb{N}}$ is not box-compact.
✏️ Example 5 — Where the Hausdorff hypothesis bites
In the line with two origins $X$ of §9.3 (two copies of $\mathbb{R}$ glued along $\mathbb{R}\setminus\{0\}$, origins $0_a,0_b$), let $K_a$ be the image of $[-1,1]$ from the first copy and $K_b$ that from the second. Show that $K_a$ and $K_b$ are compact, that $K_a$ is not closed, and that $K_a\cap K_b$ is not compact.
Compact $K_a$ is the image of the compact interval $[-1,1]$ under the continuous map (inclusion of the first copy followed by the quotient map), so it is compact (Theorem 9.66(a)); likewise $K_b$.
Not closed $0_b\notin K_a$, but every open set containing $0_b$ contains a punctured interval $(-\varepsilon,0)\cup(0,\varepsilon)$, which lies in $K_a$. So $0_b\in\overline{K_a}\setminus K_a$. (No contradiction with Theorem 9.65: $X$ is not Hausdorff.)
Intersection $K_a\cap K_b=[-1,1]\setminus\{0\}$ (the common points of the two copies), which is homeomorphic to $[-1,0)\cup(0,1]\subseteq\mathbb{R}$. It is not closed and bounded in $\mathbb{R}$, hence not compact: the open cover by $[-1,-\tfrac1n)\cup(\tfrac1n,1]$ has no finite subcover.
Lesson In a Hausdorff space, compact sets are closed, so an intersection $K\cap L$ of compact sets is a closed subset of the compact $K$, hence compact. Without Hausdorff this fails.
Interactive 2 — Open Covers and Finite Subcovers

Each bar is one open set of a cover (rows only stack them for visibility). On the axis, green shows what the chosen sets cover, red what is still uncovered. For $[0,1]$ the animation extracts a finite subcover greedily — always taking the set that reaches furthest to the right; for $(0,1]$, $[0,1]$ in $\mathbb{R}_\ell$ and $\mathbb{R}$ it adds sets one by one and something is always left over. In the fourth cover, notice how the one set around $0$ swallows all but finitely many of the others.

sets in the cover—
sets chosen so far—
still uncovered—
finite subcover?—

Local Compactness, the One-Point Compactification and Invariants

📘 Definition 9.29 — Locally compact spaces
A Hausdorff space $X$ is locally compact if every point has a compact neighbourhood, i.e. for every $x$ there are a compact $K$ and an open $U$ with $x\in U\subseteq K$.

Examples: $\mathbb{R}^n$ (closed balls), every discrete space ($\{x\}$ is compact), every compact Hausdorff space, every open or closed subspace of a locally compact Hausdorff space. Non-examples: $\mathbb{Q}$ (Exercise IV.1: a compact subset of $\mathbb{Q}$ is compact in $\mathbb{R}$, hence closed in $\mathbb{R}$, so it cannot contain a set $\mathbb{Q}\cap(-\varepsilon,\varepsilon)$ whose closure in $\mathbb{R}$ contains irrationals); $\mathbb{R}^{\mathbb{N}}$ with the product topology (a basic open set leaves all but finitely many coordinates free, so its closure contains a closed copy of $\mathbb{R}$, which is not compact); and every infinite-dimensional normed space (Riesz's lemma — a closed ball is never compact).

📘 Definition 9.30 — The one-point compactification
Let $X$ be a topological space and $\infty$ a point not in $X$. On $X^*=X\cup\{\infty\}$ declare open: (i) every open subset of $X$, and (ii) every set $X^*\setminus K$ where $K\subseteq X$ is compact and closed in $X$. $X^*$ is the one-point compactification (Alexandroff compactification) of $X$.
📐 Theorem 9.70 — Properties of $X^*$
(a) The sets in Definition 9.30 form a topology on $X^*$; $X$ is an open subspace of $X^*$; and $X^*$ is compact. (b) $X^*$ is Hausdorff if and only if $X$ is locally compact Hausdorff. (c) If $X$ is not compact, $X$ is dense in $X^*$. (d) If $Y$ is compact Hausdorff, $p\in Y$ and $Y\setminus\{p\}$ is homeomorphic to $X$, then $Y\cong X^*$.

Proof. (a) Write $\mathcal{T}$ for the topology of $X$ and $\mathcal{C}$ for its compact closed sets. $\varnothing\in\mathcal{T}$, and $X^*=X^*\setminus\varnothing$. Intersections: $U\cap(X^*\setminus K)=U\setminus K\in\mathcal{T}$, and $(X^*\setminus K)\cap(X^*\setminus L)=X^*\setminus(K\cup L)$ with $K\cup L\in\mathcal{C}$. Unions: a union of sets of type (i) is of type (i); a union of sets $U_j$ of type (i) and at least one set $X^*\setminus K_i$ of type (ii) equals $X^*\setminus C$ with $C=\big(\bigcap_i K_i\big)\setminus\bigcup_j U_j$, a closed subset of some compact $K_i$, hence in $\mathcal{C}$ (Theorem 9.64). The trace of each open set on $X$ is in $\mathcal{T}$, so $X$ is a subspace, and it is open (type (i)). Compactness: in an open cover of $X^*$, some member contains $\infty$, say $X^*\setminus K$; the traces on $X$ of the other members are open in $X$ and cover the compact $K$, so finitely many do.

(b) If $X^*$ is Hausdorff, so is its subspace $X$; and for $x\in X$ there are disjoint open $U\ni x$ and $X^*\setminus K\ni\infty$, so $U\subseteq K$: $x$ has a compact neighbourhood. Conversely, two points of $X$ are separated inside $X$; and if $x\in U\subseteq K$ with $U$ open, $K$ compact (closed, as $X$ is Hausdorff), then $U$ and $X^*\setminus K$ separate $x$ and $\infty$. (c) If $X$ is not compact, every open set $X^*\setminus K$ around $\infty$ meets $X$ (as $K\ne X$), so $\infty\in\overline{X}$. (d) Map $X\cong Y\setminus\{p\}$ and $\infty\mapsto p$. One checks this bijection $X^*\to Y$ is continuous at $\infty$ (a neighbourhood $Y\setminus C$ of $p$, $C$ closed in $Y$ hence compact, pulls back to $X^*\setminus C'$) and applies Theorem 9.66(b). ∎

✏️ Example 6 — Identifying one-point compactifications
Identify $X^*$ for (a) $X=\mathbb{N}$ (discrete); (b) $X=\mathbb{R}^n$; (c) $X=(0,1)$ and $X=[0,1)$; (d) $X=\mathbb{Q}$.
(a) $Y=\{0\}\cup\{1/n:n\in\mathbb{N}\}$ is compact (closed and bounded) and Hausdorff, and $Y\setminus\{0\}$ is discrete, homeomorphic to $\mathbb{N}$ via $n\mapsto1/n$. By Theorem 9.70(d), $\mathbb{N}^*\cong Y$: the point at infinity becomes the limit $0$ of the sequence $1/n$. The neighbourhoods of $\infty$ are the cofinite sets containing $\infty$.
(b) Stereographic projection from the north pole $N$ is a homeomorphism $S^n\setminus\{N\}\to\mathbb{R}^n$, and $S^n$ is compact Hausdorff, so $(\mathbb{R}^n)^*\cong S^n$. For $n=2$ this is the Riemann sphere $\mathbb{C}\cup\{\infty\}$ of complex analysis (§1.1), and "$z\to\infty$" means convergence to the north pole.
(c) $(0,1)\cong\mathbb{R}$, so $(0,1)^*\cong S^1$ (glue both ends to one point). $[0,1)\cong[0,1]\setminus\{1\}$ with $[0,1]$ compact Hausdorff, so $[0,1)^*\cong[0,1]$. Note $(0,1)$ and $[0,1)$ have different one-point compactifications, another proof they are not homeomorphic.
(d) $\mathbb{Q}$ is Hausdorff but not locally compact, so $\mathbb{Q}^*$ is compact but not Hausdorff (Theorem 9.70(b)). Concretely, a compact subset of $\mathbb{Q}$ has empty interior, so every neighbourhood $\mathbb{Q}^*\setminus K$ of $\infty$ meets every nonempty open subset of $\mathbb{Q}$: $\infty$ cannot be separated from any point.

We can now collect the invariants of this chapter. A property is a topological invariant if every space homeomorphic to a space with the property also has it. To prove $X\not\cong Y$, find an invariant that one has and the other lacks.

invariantexamples it separates
compactness$[0,1]$ vs $[0,1)$, $(0,1)$, $\mathbb{R}$; $S^1$ vs $\mathbb{R}$; $S^2$ vs $\mathbb{R}^2$
connectedness, number of components$[0,1]\cup[2,3]$ vs $[0,1]$; $\mathbb{Q}$ vs $\mathbb{R}$; $GL_n(\mathbb{R})$ vs $GL_n(\mathbb{C})$
path-connectednesstopologist's sine curve vs $[0,1]$
components after removing $k$ points$\mathbb{R}$ vs $\mathbb{R}^2$; $S^1$ vs $[0,1]$; T vs X; circle vs θ-curve ($k=2$)
separation axioms, countability axioms$\mathbb{R}_\ell$ vs $\mathbb{R}$ (second countable); cofinite vs usual line ($T_2$)
local compactness$\mathbb{Q}$ vs $\mathbb{Z}$ (also: $\mathbb{Z}$ is discrete, $\mathbb{Q}$ has no isolated points)
not invariantsboundedness ($(0,1)\cong\mathbb{R}$), completeness ($(0,1)$ vs $\mathbb{R}$), length, curvature
✏️ Example 7 — Homeomorphic or not?
Decide for each pair: (a) $\mathbb{R}^2\setminus\{0\}$ and $S^1\times\mathbb{R}$; (b) $S^1\times S^1$ and $S^2$ — give at least a partial argument; (c) $\{(x,y):xy=1\}$ and $\{(x,y):xy=0\}$; (d) $[0,1]^2$ and $[0,1]$.
(a) Yes $h(p)=\big(p/|p|,\ \log|p|\big)$ is continuous $\mathbb{R}^2\setminus\{0\}\to S^1\times\mathbb{R}$ with continuous inverse $(u,s)\mapsto e^s u$ (polar coordinates).
(b) No Both are compact, connected and path-connected, and removing one point leaves both connected; the invariants of this chapter do not separate them. They are distinguished by algebraic topology: a loop around the torus cannot be shrunk to a point, while every loop on $S^2$ can (fundamental groups $\mathbb{Z}^2$ and $\{1\}$). Point-set questions in CSIR never require this, but they may ask which invariants fail to distinguish two spaces.
(c) No The hyperbola $xy=1$ has two components (the branches $x\gt0$ and $x\lt0$, each a continuous image of $\mathbb{R}$, separated by the sign of $x$). The union of the axes $xy=0$ is connected (two lines through $0$).
(d) No Removing one point: $[0,1]\setminus\{\tfrac12\}$ is disconnected, but $[0,1]^2$ minus any point is path-connected (go around the point inside the square). So $[0,1]$ has cut points and the square has none.
🧭 Problem-solving strategy — connected? compact? homeomorphic?
  1. Connected: exhibit it as a continuous image of a connected space (an interval, a product of intervals), a union of connected sets with common points or a chain, or a set squeezed between a connected set and its closure. In $\mathbb{R}^n$, open + connected = path-connected.
  2. Not connected: find a continuous onto map to $\{0,1\}$ (a sign, $\det$, "bounded or not"), or a clopen proper subset.
  3. Connected but not path-connected: look for an oscillation accumulating on a set (topologist's sine curve and its variants).
  4. Compact: in $\mathbb{R}^n$ use closed + bounded; in general use continuous images, closed subsets of compact sets, finite unions, products (Tychonoff — product topology only!).
  5. Not compact: write down an explicit open cover with no finite subcover (nested sets $(-n,n)$, $(\tfrac1n,1]$, $[0,1-\tfrac1n)$); or find an infinite closed discrete subset; or a continuous real function that is unbounded or does not attain its supremum.
  6. Homeomorphic? First compare invariants (compactness, components, cut points, countability, separation). If all agree, try to write down a homeomorphism; a continuous bijection from a compact space to a Hausdorff space is automatically one.
⚠️ Counterexamples and pitfalls
  1. Connected $\not\Rightarrow$ path-connected. Topologist's sine curve; also $G\cup\{(0,0)\}$ with $G$ the graph of $\sin(1/x)$, $x\gt0$.
  2. Components need not be open; path components need not be closed. In $\mathbb{Q}$ components are points (not open); in the sine curve the path component $G$ is not closed.
  3. Box topology breaks everything. $\mathbb{R}^{\mathbb{N}}$ (box) is disconnected; $[0,1]^{\mathbb{N}}$ (box) is not compact. Products are connected/compact only in the product topology.
  4. Compact need not be closed in a non-Hausdorff space: in the cofinite topology every subset is compact.
  5. Intersection of compact sets need not be compact without Hausdorff: $K_a\cap K_b$ in the line with two origins (Example 5).
  6. Continuous bijection $\ne$ homeomorphism. $t\mapsto e^{2\pi it}$ from $[0,1)$ onto $S^1$; it works on $[0,1]/(0\sim1)$ because the domain is then compact.
  7. Closed and bounded $\ne$ compact outside $\mathbb{R}^n$: the closed unit ball of $\ell^2$ (the orthonormal vectors $e_n$ have no convergent subsequence), $\mathbb{R}$ with the bounded metric $\min(|x-y|,1)$.
  8. Compact vs sequentially compact. They agree for metric spaces, but $[0,1]^{[0,1]}$ (product topology) is compact and not sequentially compact, and the space of countable ordinals is sequentially compact and not compact.
  9. Finer topologies can lose compactness, coarser ones can lose Hausdorff. $[0,1]$ is not compact in $\mathbb{R}_\ell$; the indiscrete topology makes everything compact and connected.
  10. Totally disconnected does not mean discrete. $\mathbb{Q}$, $\mathbb{R}\setminus\mathbb{Q}$, $\mathbb{R}_\ell$ and the Cantor set have no isolated points.
  11. $X^*$ is always compact, not always Hausdorff. $\mathbb{Q}^*$ is compact and not Hausdorff because $\mathbb{Q}$ is not locally compact.
  12. Unions need overlaps. $\mathbb{Q}=\bigcup_{q}\{q\}$ is a union of connected sets but is totally disconnected; Theorem 9.56(a) needs a common point or a chain.
  13. Removing a countable set. $\mathbb{R}\setminus\mathbb{Q}$ is totally disconnected, but $\mathbb{R}^2\setminus\mathbb{Q}^2$ (and $\mathbb{R}^2$ minus any countable set) is path-connected.

Exercises

I
Connectedness.
  • 1 Show that $\mathbb{R}$ with the cocountable topology is connected, and that $\mathbb{R}$ with the topology $\{\varnothing,\mathbb{R}\}\cup\{(-\infty,a):a\in\mathbb{R}\}$ is connected.
  • 2 Prove that a discrete space with at least two points is disconnected, and that a space $X$ is connected iff every continuous map from $X$ to a discrete space is constant.
  • 3 Find the number of components of the set of $(x,y)\in\mathbb{R}^2$ with $(x^2+y^2-1)(x^2+y^2-4)\ne0$, and of the hyperbola $\{x^2-y^2=1\}$.
  • 4 Let $f:S^1\to\mathbb{R}$ be continuous. Prove that $f(z)=f(-z)$ for some $z\in S^1$.
  • 5 Prove that $GL_n(\mathbb{C})$ is path-connected. (Hint: for $A,B$ invertible, $z\mapsto\det((1-z)A+zB)$ is a polynomial.)
  • 6 Let $A_1,A_2,\dots$ be connected subsets of $X$ with $A_n\cap A_{n+1}\ne\varnothing$. Show that $\bigcup A_n$ is connected, and give an example where $A_n\cap A_m=\varnothing$ for $|n-m|\ge2$.
  • 7 Prove the equivalence in Definition 9.24: $Y\subseteq X$ is disconnected iff $Y=A\cup B$ with $A,B$ nonempty, $\overline{A}\cap B=\varnothing=A\cap\overline{B}$.
  • 8 Show that a connected metric space with at least two points is uncountable.
  • 9 Let $X$ be connected and $f:X\to\mathbb{R}$ continuous and locally constant (each point has a neighbourhood on which $f$ is constant). Prove that $f$ is constant.
1 In both topologies any two nonempty open sets meet: two cocountable sets meet because $\mathbb{R}$ is uncountable, and $(-\infty,a)\cap(-\infty,b)=(-\infty,\min(a,b))\ne\varnothing$. So no separation exists.
2 In a discrete space $\{x\}$ is clopen, proper and nonempty when there are two points. If $X$ is connected and $f:X\to D$ is continuous with $D$ discrete, then for $d=f(x_0)$ the set $f^{-1}(\{d\})$ is clopen and nonempty, hence $X$. Conversely take $D=\{0,1\}$ and use Theorem 9.52.
3 The first set is $\{r\lt1\}\cup\{1\lt r\lt2\}\cup\{r\gt2\}$ with $r=\sqrt{x^2+y^2}$: three pieces, each path-connected (a disc, an annulus, the exterior of a disc), and $r$ maps the set into $[0,1)\cup(1,2)\cup(2,\infty)$, so no two pieces lie in a common connected set. Answer $3$. The hyperbola: $x\ne0$ on it, so $\operatorname{sign}x$ is continuous onto $\{\pm1\}$; each branch $\{(\pm\cosh t,\sinh t)\}$ is a continuous image of $\mathbb{R}$. Answer $2$.
4 $g(z)=f(z)-f(-z)$ is continuous on the connected $S^1$ and $g(-z)=-g(z)$. If $g(z_0)=c$, then $g$ takes the values $c$ and $-c$, so its image (an interval) contains $0$. (This is the one-dimensional Borsuk–Ulam theorem: at any moment two antipodal points of the equator have equal temperature.)
5 $p(z)=\det((1-z)A+zB)$ is a polynomial in $z$ with $p(0)=\det A\ne0$, so it has finitely many roots, none at $0$ or $1$. $\mathbb{C}$ minus finitely many points is path-connected, so there is a path $\sigma$ from $0$ to $1$ avoiding the roots; then $t\mapsto(1-\sigma(t))A+\sigma(t)B$ is a path in $GL_n(\mathbb{C})$ from $A$ to $B$. Over $\mathbb{R}$ this fails: $[0,1]$ itself must be used and $p$ may change sign.
6 Theorem 9.56(a). Example: $A_n=[n,n+1]\subseteq\mathbb{R}$; consecutive sets share the point $n+1$, the union $[1,\infty)$ is connected, and $A_n\cap A_{n+2}=\varnothing$.
7 If $U,V$ separate $Y$ (open in $Y$), put $A=U$, $B=V$. $A=Y\setminus V$ is closed in $Y$, so $\overline{A}\cap Y=A$, hence $\overline{A}\cap B=A\cap B=\varnothing$; similarly for $B$. Conversely, if $\overline{A}\cap B=\varnothing$ then $B=Y\setminus\overline{A}$ (as $Y=A\cup B$), which is open in $Y$; likewise $A=Y\setminus\overline{B}$ is open in $Y$. So $A,B$ separate $Y$.
8 Pick $a\ne b$ and let $f(x)=d(x,a)$, continuous. $f(X)$ is a connected subset of $\mathbb{R}$ containing $0=f(a)$ and $d(a,b)\gt0$, so it contains $[0,d(a,b)]$, which is uncountable. A surjection from $X$ onto an uncountable set forces $X$ to be uncountable.
9 Let $c=f(x_0)$ and $A=f^{-1}(\{c\})$. $A$ is closed (preimage of a closed set) and open (each $x\in A$ has a neighbourhood where $f\equiv f(x)=c$). $A\ne\varnothing$, so $A=X$.
II
Paths, cut points and invariants.
  • 1 Show that $S=G\cup\{(0,0)\}$, where $G=\{(x,\sin\tfrac1x):x\gt0\}$, is connected but not path-connected.
  • 2 Show that the comb space $C$, the union of the base $[0,1]\times\{0\}$, the segment $\{0\}\times[0,1]$ and the teeth $\{\tfrac1n\}\times[0,1]$ ($n\ge1$), is path-connected, and that it is not locally connected at $(0,1)$ in the sense that small balls around $(0,1)$ meet $C$ in disconnected sets.
  • 3 Prove that $[0,1)$ and $(0,1)$ are not homeomorphic, and that $\mathbb{R}$ and $[0,\infty)$ are not homeomorphic.
  • 4 Show that the circle and the θ-curve (a circle together with one diameter) are not homeomorphic.
  • 5 Show that $S^1$ is not homeomorphic to any subset of $\mathbb{R}$.
  • 6 Show that $\mathbb{R}^2\setminus C$ is path-connected for every countable $C\subseteq\mathbb{R}^2$.
  • 7 Find the number of path components of the union of the $x$-axis and the branch $\{y=1/x,\ x\gt0\}$ in $\mathbb{R}^2$, and of $GL_1(\mathbb{R})$.
1 $G$ is connected and $G\subseteq S\subseteq\overline{G}$ (as $(0,0)=\lim(\tfrac1{n\pi},0)$), so $S$ is connected (Theorem 9.56(b)). A path from $(0,0)$ into $G$ is impossible by exactly the argument of Theorem 9.61 (with $t_0$ the last time the path is at $(0,0)$).
2 Every point $(x,y)$ of $C$ lies on a vertical segment (or on the base); go down it to $(x,0)$, then along the base to $(0,0)$. Near $(0,1)$: a ball of radius $\tfrac12$ meets $C$ in pieces of the vertical teeth $\{\tfrac1n\}\times(\tfrac12,1]$ and $\{0\}\times(\tfrac12,1]$, which are disjoint and pairwise separated (a vertical line $x=c$ with $c$ not of the form $\tfrac1n$ or $0$ separates them). So arbitrarily small neighbourhoods of $(0,1)$ are disconnected, although $C$ is path-connected.
3 $[0,1)\setminus\{0\}$ is connected, while $(0,1)\setminus\{p\}$ is disconnected for every $p$. Same argument: $[0,\infty)\setminus\{0\}$ is connected and $\mathbb{R}\setminus\{p\}$ never is.
4 Removing one point from either leaves it connected, so use two. The circle minus any two points has $2$ components. The θ-curve minus two interior points of different arcs is connected: the third arc still joins the two branch points, and each half-arc hangs on a branch point. Theorem 9.62 with two points.
5 If $h:S^1\to A\subseteq\mathbb{R}$ were a homeomorphism, $A$ would be connected (an interval, Theorem 9.55) and compact, so $A=[a,b]$ with $a\lt b$. But $[a,b]$ has cut points and $S^1$ does not. (Or: $S^1\setminus\{p\}$ is connected while removing an interior point of $[a,b]$ disconnects it.)
6 Let $p,q\notin C$. The lines through $p$ form an uncountable family whose members meet only at $p$; each point of $C$ lies on at most one of them, so all but countably many lines through $p$ miss $C$. Likewise for $q$. Choose a line $L_p$ through $p$ and a line $L_q$ through $q$, both missing $C$ and not parallel (at most countably many directions are excluded); they meet at a point $r$, and $p\to r\to q$ along $L_p,L_q$ is a path in $\mathbb{R}^2\setminus C$.
7 The axis and the hyperbola branch are disjoint closed path-connected sets; they are at distance $0$ but no path (indeed no connected set) meets both: the function equal to $0$ on the axis and $1$ on the branch is continuous on the union (each piece is closed in it). Answer: $2$ path components (also $2$ components). $GL_1(\mathbb{R})=\mathbb{R}\setminus\{0\}$: $2$.
III
Compactness.
  • 1 Show that a finite union of compact subsets of $X$ is compact, and that a space with only finitely many open sets is compact.
  • 2 Show that $(0,1]$ is not compact by exhibiting an open cover with no finite subcover, and that $\{0\}\cup\{1/n:n\in\mathbb{N}\}$ is compact directly from the definition.
  • 3 Let $X$ be compact, $Y$ Hausdorff and $f:X\to Y$ continuous. Show that $f$ is a closed map, and deduce that $[0,1]/(0\sim1)\cong S^1$.
  • 4 Let $X$ be compact Hausdorff and $f:X\to X$ continuous. Show that $\bigcap_{n\ge1}f^n(X)$ is nonempty.
  • 5 Prove that every compact metric space is separable, and that every compact subset of a metric space is bounded.
  • 6 Let $X$ be compact and $f:X\to\mathbb{R}$ lower semicontinuous ($\{f\gt c\}$ open for all $c$). Show that $f$ attains its minimum.
  • 7 Prove that the closed unit ball of $\ell^2$ is closed and bounded but not compact.
  • 8 Let $F_1\supseteq F_2\supseteq\cdots$ be nonempty closed subsets of a compact space. Show that $\bigcap F_n\ne\varnothing$, and give nested nonempty closed subsets of $\mathbb{R}$ with empty intersection.
  • 9 (Robot arm.) A planar arm has links of lengths $3$ m and $2$ m and two rotating joints, so its configuration space is the torus $S^1\times S^1$ of joint angles $(\theta,\varphi)$; its tip is at $$P(\theta,\varphi)=3e^{i\theta}+2e^{i(\theta+\varphi)}$$ (points of the plane written as complex numbers). Explain why the reachable set $W$ of tip positions is compact and connected, and find it.
1 Given a cover of $K_1\cup\cdots\cup K_m$, finitely many members cover each $K_i$; together finitely many cover the union. If $X$ has finitely many open sets, every open cover is already finite.
2 $\{(\tfrac1n,2):n\in\mathbb{N}\}$ covers $(0,1]$; finitely many cover only $(\tfrac1N,1]$. For $K=\{0\}\cup\{1/n\}$: a member $U_0$ of any open cover contains $0$, hence an interval $(-\varepsilon,\varepsilon)$, hence all $1/n$ with $n\gt1/\varepsilon$; the finitely many remaining points need one set each.
3 Theorem 9.66(b). The map $t\mapsto(\cos2\pi t,\sin2\pi t)$ is continuous on $[0,1]$ and identifies exactly $0$ and $1$, so it induces a continuous bijection $q:[0,1]/(0\sim1)\to S^1$ (continuity by the universal property of quotients, §9.2). The quotient is compact (image of $[0,1]$) and $S^1$ is Hausdorff, so $q$ is a homeomorphism.
4 $F_n=f^n(X)$ is compact (Theorem 9.66(a)), hence closed (Theorem 9.65), and nonempty. $F_{n+1}=f^n(f(X))\subseteq f^n(X)=F_n$. Nested nonempty closed sets in a compact space have nonempty intersection (Theorem 9.63).
5 For each $n$ the balls $B(x,\tfrac1n)$ cover $X$; choose a finite subcover with centres $D_n$. $D=\bigcup D_n$ is countable and dense: every ball $B(y,r)$ contains a point of $D_n$ for $\tfrac1n\lt r$. A compact $K$ is covered by the balls $B(x_0,n)$, so by finitely many of them, i.e. by one: $K$ is bounded.
6 Let $m=\inf f\ge-\infty$. If $f(x)\gt m$ for every $x$, the open sets $\{f\gt c\}$ with $c\gt m$ cover $X$; a finite subcover gives $\{f\gt c_0\}=X$ for the smallest $c_0\gt m$, so $f\gt c_0\gt m$ everywhere — contradicting $m=\inf f$ (if $m=-\infty$ the same contradiction shows $f$ is bounded below). Hence the minimum is attained.
7 The ball $\{\|x\|\le1\}$ is closed and bounded. The unit vectors $e_n$ lie in it and $\|e_n-e_m\|=\sqrt2$ for $n\ne m$, so no subsequence of $(e_n)$ is Cauchy, let alone convergent; but a compact metric space is sequentially compact (Unit 1, §7.2). Equivalently, $\{e_n\}$ is an infinite closed discrete subset, which a compact space cannot contain (its cover by the balls $B(e_n,\tfrac12)$ and the complement of $\{e_n\}$ has no finite subcover).
8 The $F_n$ are closed in a compact space and have FIP (a finite subfamily intersects to its smallest member, which is nonempty), so $\bigcap F_n\ne\varnothing$ by Theorem 9.63. In $\mathbb{R}$, $F_n=[n,\infty)$ are nested, nonempty and closed with empty intersection — $\mathbb{R}$ is not compact.
9 $P$ is continuous on the torus, which is compact (product of two circles) and connected (product of connected spaces), so $W=P(S^1\times S^1)$ is compact and connected. Since $P=e^{i\theta}(3+2e^{i\varphi})$ in complex notation, $|P|^2=9+4+12\cos\varphi\in[1,25]$ and $\theta$ rotates freely. So $W=\{1\le|P|\le5\}$, the closed annulus with radii $1$ m and $5$ m. Compactness guarantees, for instance, that any continuous cost (energy, distance to a target) attains its minimum over all configurations.
IV
Local compactness, compactifications and challenges.
  • 1 Show that $\mathbb{Q}$ is not locally compact, but $\mathbb{Z}$ is.
  • 2 Show that the one-point compactification of $\mathbb{N}$ is homeomorphic to $\{0\}\cup\{1/n:n\in\mathbb{N}\}$, checking continuity at $\infty$ directly.
  • 3 Identify the one-point compactification of $\mathbb{R}\setminus\{0\}$ and of $(0,1)\cup(2,3)$.
  • 4 Use Tychonoff's theorem to show $\{0,1\}^{\mathbb{N}}$ (product topology) is compact, and prove that $(a_n)\mapsto\sum_n 2a_n3^{-n}$ is a homeomorphism onto the Cantor set.
  • 5 (Challenge.) Prove that a connected normal space with at least two points is uncountable.
  • 6 (Challenge.) Let $F_1\supseteq F_2\supseteq\cdots$ be nonempty compact connected subsets of a Hausdorff space. Prove that $\bigcap_n F_n$ is connected. Show by an example in $\mathbb{R}^2$ that "compact" cannot be replaced by "closed".
1 $\mathbb{Z}$ is discrete: $\{n\}$ is a compact open neighbourhood. In $\mathbb{Q}$, suppose $0\in U\subseteq K$ with $U$ open and $K$ compact. $U\supseteq\mathbb{Q}\cap(-\varepsilon,\varepsilon)$, so $K$ contains rationals $q_n\to\varepsilon/\sqrt2$. $K$ is compact in $\mathbb{Q}$, hence compact in $\mathbb{R}$, hence closed in $\mathbb{R}$; so $\varepsilon/\sqrt2\in K\subseteq\mathbb{Q}$, which is false.
2 $h(n)=1/n$, $h(\infty)=0$ is a bijection $\mathbb{N}^*\to Y$. Continuity at points $n$ is clear (they are isolated on both sides). At $\infty$: a neighbourhood of $0$ in $Y$ contains $\{0\}\cup\{1/n:n\gt N\}$, whose preimage $\{\infty\}\cup\{n\gt N\}=\mathbb{N}^*\setminus\{1,\dots,N\}$ is open ($\{1,\dots,N\}$ is compact and closed in $\mathbb{N}$). $\mathbb{N}^*$ is compact and $Y$ Hausdorff: $h$ is a homeomorphism (Theorem 9.66(b)).
3 $\mathbb{R}\setminus\{0\}\cong(0,1)\cup(2,3)$, two open intervals. Its one-point compactification is the figure eight: each open interval closes up into a circle through $\infty$, and the two circles share only $\infty$. (Check with Theorem 9.70(d): the figure eight minus its crossing point is two disjoint open arcs.)
4 $\{0,1\}$ is finite, hence compact; Tychonoff gives compactness of the product (or the diagonal argument). The map $\phi$ is continuous: if $a,b$ agree in the first $N$ places, $|\phi(a)-\phi(b)|\le\sum_{n\gt N}2\cdot3^{-n}=3^{-N}$. It is injective (if $a,b$ first differ at $N$, the values differ by at least $3^{-N}$ — Unit 1, §1.1) and its image is the Cantor set. A continuous injection from a compact space into the Hausdorff $\mathbb{R}$ is a homeomorphism onto its image.
5 Let $a\ne b$. $\{a\}$ and $\{b\}$ are disjoint closed sets ($T_1$), so Urysohn's lemma (§9.3) gives a continuous $f:X\to[0,1]$ with $f(a)=0$, $f(b)=1$. $f(X)$ is connected, contains $0$ and $1$, so $f(X)=[0,1]$, which is uncountable. Hence $X$ is uncountable. (Exercise I.8 is the metric special case.)
6 $F=\bigcap F_n$ is nonempty and compact (closed in the compact Hausdorff $F_1$). Suppose $F=A\cup B$ with $A,B$ disjoint nonempty and closed in $F$, hence compact. Theorem 9.65(c) gives disjoint open $U\supseteq A$, $V\supseteq B$. The sets $F_n\setminus(U\cup V)$ are compact, nested, and their intersection is $F\setminus(U\cup V)=\varnothing$, so some $F_N\setminus(U\cup V)=\varnothing$, i.e. $F_N\subseteq U\cup V$. As $F_N$ is connected, it lies in $U$ or in $V$ — but it contains $A\subseteq U$ and $B\subseteq V$, a contradiction. Counterexample with closed sets: $F_n=\big(\{0,1\}\times\mathbb{R}\big)\cup\big([0,1]\times[n,\infty)\big)$, two vertical lines joined by a band reaching up to infinity. Each $F_n$ is closed and connected (the band meets both lines), the $F_n$ decrease, but $\bigcap F_n=\{0,1\}\times\mathbb{R}$ is two disjoint lines.
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B GATE MA Which of the following subsets of $\mathbb{R}^2$ is connected but not path-connected? (A) $\{(x,y):x^2+y^2=1\}$; (B) $\{(x,\sin\tfrac1x):x\gt0\}\cup\{(0,0)\}$; (C) $\mathbb{R}^2\setminus\mathbb{Q}^2$; (D) $\{(x,y):xy=1\}$.

Options (A) path-connected (a continuous image of $[0,2\pi]$). (B) connected, being squeezed between the connected graph and its closure, but not path-connected (Exercise II.1). (C) path-connected (Example 2(c)). (D) not connected (two branches).
Answer (B).

E2. CSIR Part B Which pair of spaces (usual topologies) is homeomorphic? (A) $[0,1]$ and $S^1$; (B) $(0,1)$ and $[0,1)$; (C) $\mathbb{R}^2\setminus\{(0,0)\}$ and $S^1\times\mathbb{R}$; (D) $\mathbb{R}$ and $\mathbb{R}^2$.

Options (A) no: $[0,1]$ has cut points, $S^1$ none. (B) no: $[0,1)$ has a non-cut point, $(0,1)$ has none. (C) yes: $p\mapsto(p/|p|,\log|p|)$ (Example 7(a)). (D) no: $\mathbb{R}$ minus a point is disconnected.
Answer (C).

E3. CSIR Part B Let $X=\mathbb{R}$ with the cofinite topology. Then $X$ is (A) compact and connected; (B) compact but not connected; (C) connected but not compact; (D) neither compact nor connected.

Compact One member $\mathbb{R}\setminus F$ of any open cover misses only finitely many points (Example 4(a)).
Connected Any two nonempty open sets meet (Example 1(b)).
Answer (A).

E4. CSIR Part C Let $X$ be a compact space, $Y$ a Hausdorff space and $f:X\to Y$ continuous. Which of the following are necessarily true? (A) $f(X)$ is closed in $Y$. (B) If $f$ is a bijection, it is a homeomorphism. (C) $f^{-1}(K)$ is compact for every compact $K\subseteq Y$. (D) $X$ is Hausdorff.

(A) True $f(X)$ is compact, hence closed in the Hausdorff $Y$ (Theorems 9.66(a), 9.65(b)).
(B) True Theorem 9.66(b).
(C) True $K$ is closed in $Y$ (Hausdorff), so $f^{-1}(K)$ is closed in the compact $X$, hence compact (Theorem 9.64).
(D) False $X=\{a,b\}$ indiscrete (compact), $Y$ a point, $f$ constant.
Answer (A), (B) and (C).

E5. CSIR Part C Which of the following spaces are compact? (A) $[0,1]$ as a subspace of the Sorgenfrey line $\mathbb{R}_\ell$; (B) $[0,1]^{\mathbb{N}}$ with the product topology; (C) the closed unit ball $\{x\in\ell^2:\|x\|\le1\}$; (D) the one-point compactification $\mathbb{Q}^*$ of $\mathbb{Q}$.

(A) No $[0,1-\tfrac1n)$ and $[1,2)$ cover with no finite subcover (Example 4(b)).
(B) Yes Tychonoff's theorem.
(C) No The vectors $e_n$ are pairwise $\sqrt2$ apart (Exercise III.7).
(D) Yes Every one-point compactification is compact (Theorem 9.70(a)); $\mathbb{Q}^*$ is just not Hausdorff. A favourite trap.
Answer (B) and (D).

E6. CSIR Part C Let $X$ be a connected topological space with at least two points. Which of the following are necessarily true? (A) $X\times X$ is connected. (B) Every continuous $f:X\to\mathbb{Z}$ is constant. (C) $X$ is path-connected. (D) If $X$ is normal, then $X$ is uncountable.

(A) True Theorem 9.57.
(B) True $f(X)$ is a connected subset of $\mathbb{R}$ contained in $\mathbb{Z}$, i.e. an interval inside $\mathbb{Z}$: a single point.
(C) False The topologist's sine curve (Theorem 9.61).
(D) True Urysohn's lemma maps $X$ onto $[0,1]$ (Exercise IV.5). Without normality it fails: a countably infinite set with the cofinite topology is connected and countable.
Answer (A), (B) and (D).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Connectedness. Definition 9.24 and Theorem 9.52 (the $\{0,1\}$-valued test is the one students should use); Theorems 9.54–9.56 with the interval proof done in full on the board; products (the "cross" picture for $X\times Y$, the bounded/unbounded separation for the box topology); components and Example 1 — let the class guess first whether $\mathbb{R}_\ell$ and the cofinite line are connected.
  2. Paths and invariants. Theorem 9.59, open connected sets in $\mathbb{R}^n$, the topologist's sine curve (draw it; the key step is the oscillation argument), Example 2(c). Then project Interactive 1: segment vs circle, tripod vs cross, and finally circle vs θ-curve — ask the class why equal profiles do not mean homeomorphic. Example 3.
  3. Compactness. Definitions, FIP, Theorems 9.64–9.67 (the separation lemma 9.65(a) is the heart), Interactive 2 (start with the random cover on $[0,1]$, then the $(0,1]$ and $\mathbb{R}_\ell$ covers), tube lemma, Tychonoff (state), Example 4. Ten minutes on local compactness and $X^*$ with Example 6 — connect $(\mathbb{R}^2)^*=S^2$ to the Riemann sphere of Chapter 1. Close with Exam corner E4, E5.

Discussion questions. (1) Is the closure of a path-connected set path-connected? Is the closure of a connected set connected? Why the difference? (2) Which invariant would you use to show that the surface of a doughnut minus a point is not homeomorphic to a disc? Do the tools of this chapter suffice? (3) Why does Tychonoff's theorem fail for the box topology, and which step of the proof uses "finitely many coordinates"?

Misconceptions to watch for. "Connected $\Rightarrow$ path-connected"; "closed and bounded $\Rightarrow$ compact" in any metric space; "compact $\Rightarrow$ closed" without Hausdorff; "a continuous bijection is a homeomorphism"; "components are open"; "the one-point compactification is Hausdorff"; using the box topology in product theorems.

Suggested homework. I(1, 3, 4, 5, 8), II(1, 3, 4, 6), III(2, 3, 4, 7, 9), IV(1, 3, 5); Exam corner E1, E3, E6.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. A compact metric space is connected exactly when, for every $\varepsilon\gt0$, any two points can be joined by an $\varepsilon$-chain $x=x_0,x_1,\dots,x_m=y$ with $d(x_{i-1},x_i)\lt\varepsilon$. Can this criterion tell how many "pieces" a cloud of data points has, and at what scale?

Why it matters. Topological data analysis (used for example on protein conformations, sensor networks and astronomical surveys) studies how the number of $\varepsilon$-chain classes of a finite sample changes as $\varepsilon$ grows — the "zero-dimensional persistent homology" of the data. The same computation is single-linkage clustering in statistics: clusters that persist over a long range of $\varepsilon$ are real features; short-lived ones are noise.

What to do.

  1. Prove the criterion: if $X$ is connected, the set of points $\varepsilon$-chain-reachable from $x$ is clopen; conversely, if $X=A\cup B$ is a separation of a compact space, then $d(A,B)\gt0$ (both are compact), so no $\varepsilon$-chain with $\varepsilon\lt d(A,B)$ crosses.
  2. Show the criterion fails without compactness: $\mathbb{Q}$ is $\varepsilon$-chain connected for every $\varepsilon$, and so is the hyperbola-plus-axis set of Exercise II.7.
  3. Sample $300$ points from two noisy circles (radius $1$ centred at $(0,0)$ and at $(3,0)$) with a fixed random seed. For $\varepsilon$ from $0.01$ to $3$ compute the number of $\varepsilon$-chain classes (union–find on all pairs at distance $\lt\varepsilon$) and plot it against $\varepsilon$.
  4. Read off the range of $\varepsilon$ on which the count is $2$, and explain it in terms of the gap between the circles and the sampling density.

Tools: Python with NumPy (or SciPy's single-linkage clustering), and a plotting library.

Hand in: The proof of step 1, the counterexamples of step 2, and the plot of the number of classes against $\varepsilon$ with a short interpretation.

Going further. Read about persistence barcodes and the stability theorem (Cohen-Steiner, Edelsbrunner and Harer, 2007), which says that small perturbations of the data change the barcode only slightly — a quantitative version of "topological features are robust".

Instructor note: for two circles whose centres are $3$ apart the true gap is $1$, so with $300$ points the count drops to $2$ once $\varepsilon$ exceeds the largest spacing between neighbours on a circle (about $0.05$–$0.1$ for uniform samples) and stays $2$ until $\varepsilon$ reaches about $1$, when the circles join. In step 2, $\mathbb{Q}$ is disconnected but every two rationals are joined by $\varepsilon$-chains of rationals.

🧪 Self-check quiz

0/5 correct

Q1. Which of these spaces is connected but not path-connected?

Q2. A continuous bijection $f:X\to Y$ is guaranteed to be a homeomorphism when

Q3. $\mathbb{R}^{\mathbb{N}}$ with the box topology is

Q4. The one-point compactification of $\mathbb{R}^2$ is homeomorphic to

Q5. The simplest proof that $\mathbb{R}$ and $\mathbb{R}^2$ are not homeomorphic uses