MathLabs

Topology

Topological spaces, compactness and connectedness

A topology is the minimal structure needed to talk about continuity, open sets, compactness and connectedness without any notion of distance; continuous maps send compact sets to compact sets and connected sets to connected sets, the two facts behind the general Intermediate Value Theorem, robot motion planning, and existence proofs in economics.

IntuitionWhat survives without a ruler

Stretch or bend a rubber sheet and distances change completely, but some facts never change: a loop around a hole stays a loop around a hole, a single piece stays a single piece, and a solid disk never tears into two. A topology captures exactly this "rubber-sheet" structure by remembering only which sets count as open, throwing away distance altogether.

A 3D rendering of a torus (donut shape) that can be rotated to illustrate a topological surface with a hole.
A torus: rotate it and stretch it and it stays the same topological space. The loop that goes around the central hole can never be shrunk to a point while staying on the surface — a fact that survives every continuous deformation.

UndergraduateThe axioms of a topology

Definition: Topological space

A topology on a set XX is a collection τ\tau of subsets of XX (called open sets) satisfying: (T1) ∅∈τ\emptyset \in \tau and X∈τX \in \tau; (T2) the union of any collection of sets in τ\tau (even infinitely many) is in τ\tau; (T3) the intersection of any finite collection of sets in τ\tau is in τ\tau. The pair (X,τ)(X,\tau) is a topological space. Every metric space is a topological space: declare UU open exactly when every point of UU has an open ball around it that stays inside UU.

∅,X∈τ⋃i∈IUi∈τ (Ui∈τ)⋂i=1nUi∈τ (Ui∈τ)\emptyset, X \in \tau \qquad \bigcup_{i \in I} U_i \in \tau \ (U_i \in \tau) \qquad \bigcap_{i=1}^n U_i \in \tau \ (U_i \in \tau)

With open sets as the only primitive, continuity is redefined without any ε\varepsilon-δ\delta: a function f:X→Yf: X \to Y between topological spaces is continuous exactly when the preimage of every open set is open, f−1(U)f^{-1}(U) open in XX for every UU open in YY. On metric spaces this matches the familiar ε\varepsilon-δ\delta definition exactly, but it now also makes sense on spaces with no distance at all.

f:X→Y continuous  ⟺  f−1(U)∈τX  ∀U∈τYf: X \to Y \text{ continuous} \iff f^{-1}(U) \in \tau_X \ \ \forall U \in \tau_Y

A topological space is Hausdorff if any two distinct points can be separated by disjoint open sets: for all x≠yx \ne y there exist U,V∈τU, V \in \tau with x∈Ux \in U, y∈Vy \in V, and U∩V=∅U \cap V = \emptyset. Every metric space is automatically Hausdorff (take balls of radius d(x,y)/2d(x,y)/2), but strange topologies exist without this property, where limits of sequences are not even unique.

∀x≠y ∃U,V∈τ: x∈U, y∈V, U∩V=∅\forall x \ne y\ \exists U, V \in \tau:\ x \in U,\ y \in V,\ U \cap V = \emptyset
Compactness across settings
SettingCompactness testExample
Rn\mathbb{R}^n (Heine–Borel)closed and bounded[0,1][0,1] is compact, (0,1)(0,1) is not
general metric spacesequential compactness == open-cover compactnessevery sequence has a convergent subsequence
general topological spaceonly open-cover compactness appliesevery open cover has a finite subcover

UndergraduateTheorems

If f:X→Yf: X \to Y is continuous and K⊆XK \subseteq X is compact (every open cover of KK has a finite subcover), then f(K)⊆Yf(K) \subseteq Y is compact. Consequently, if YY is Hausdorff, every compact subset K⊆YK \subseteq Y is closed.

Why is it true?

It explains why continuous functions on closed bounded intervals always attain a maximum, and it is the abstract engine behind "compact + Hausdorff = as good as a closed bounded set" throughout analysis.

Proof

Step 1 — Pull back an arbitrary open cover of f(K)f(K). Let {Vi}i∈I\{V_i\}_{i \in I} be any collection of open sets in YY covering f(K)f(K), i.e. f(K)⊆⋃iVif(K) \subseteq \bigcup_i V_i. Since ff is continuous, each f−1(Vi)f^{-1}(V_i) is open in XX. For every x∈Kx \in K, f(x)∈f(K)f(x) \in f(K) lies in some ViV_i, so x∈f−1(Vi)x \in f^{-1}(V_i); thus {f−1(Vi)}i∈I\{f^{-1}(V_i)\}_{i \in I} is an open cover of KK.

Step 2 — Use compactness of KK to extract a finite subcover. Since KK is compact, finitely many of these sets already cover KK: there exist i1,…,ini_1, \dots, i_n with K⊆f−1(Vi1)∪⋯∪f−1(Vin)K \subseteq f^{-1}(V_{i_1}) \cup \dots \cup f^{-1}(V_{i_n}).

Step 3 — Push the finite subcover forward. Applying ff to both sides, f(K)⊆f(f−1(Vi1)∪⋯∪f−1(Vin))⊆Vi1∪⋯∪Vinf(K) \subseteq f\big(f^{-1}(V_{i_1}) \cup \dots \cup f^{-1}(V_{i_n})\big) \subseteq V_{i_1} \cup \dots \cup V_{i_n} (using f(f−1(V))⊆Vf(f^{-1}(V)) \subseteq V always). So {Vi1,…,Vin}\{V_{i_1}, \dots, V_{i_n}\} is a finite subcover of f(K)f(K) drawn from the original cover. Since {Vi}\{V_i\} was arbitrary, f(K)f(K) is compact.

Step 4 — The corollary: compact subsets of Hausdorff spaces are closed. Let K⊆YK \subseteq Y be compact, YY Hausdorff, and fix any y∉Ky \notin K. For each x∈Kx \in K, Hausdorff separation gives disjoint open sets Ux∋xU_x \ni x and Wx∋yW_x \ni y. The sets {Ux}x∈K\{U_x\}_{x \in K} cover KK, so finitely many Ux1,…,UxnU_{x_1}, \dots, U_{x_n} already cover KK by compactness. Then W=Wx1∩⋯∩WxnW = W_{x_1} \cap \dots \cap W_{x_n} is a finite intersection of open sets (hence open), contains yy, and is disjoint from every UxjU_{x_j}, hence disjoint from K⊆⋃jUxjK \subseteq \bigcup_j U_{x_j}. So every point outside KK has an open neighborhood missing KK: the complement of KK is open, i.e. KK is closed.

If f:X→Yf: X \to Y is continuous and XX is connected (it cannot be written as a union of two disjoint nonempty open sets), then f(X)f(X) is connected. In particular, if XX is connected and f:X→Rf: X \to \mathbb{R} is continuous, then f(X)f(X) is an interval: for any a,b∈Xa, b \in X, ff attains every value between f(a)f(a) and f(b)f(b).

Why is it true?

This is the true source of the Intermediate Value Theorem from calculus — connectedness, not the specific formula of ff, is what forces every intermediate value to be hit, and the same argument works for any connected domain, not just intervals of R\mathbb{R}.

Proof

Step 1 — Suppose for contradiction that f(X)f(X) is disconnected. Then f(X)=A∪Bf(X) = A \cup B for some disjoint, nonempty sets A,BA, B that are each open in the subspace topology of f(X)f(X): there exist open sets A′,B′A', B' in YY with A=f(X)∩A′A = f(X) \cap A' and B=f(X)∩B′B = f(X) \cap B'.

Step 2 — Pull the separation back to XX. Let P=f−1(A′)P = f^{-1}(A') and Q=f−1(B′)Q = f^{-1}(B'). Since ff is continuous, PP and QQ are open in XX. Every x∈Xx \in X has f(x)∈f(X)=A∪Bf(x) \in f(X) = A \cup B, so f(x)∈A′f(x) \in A' or f(x)∈B′f(x) \in B', meaning x∈Px \in P or x∈Qx \in Q: thus X=P∪QX = P \cup Q. Also PP and QQ are both nonempty (since A,BA, B are nonempty and are hit by ff), and P∩Q=∅P \cap Q = \emptyset (if x∈P∩Qx \in P \cap Q then f(x)∈A′∩B′∩f(X)=A∩B=∅f(x) \in A' \cap B' \cap f(X) = A \cap B = \emptyset, impossible).

Step 3 — Contradiction. PP and QQ are disjoint nonempty open sets with X=P∪QX = P \cup Q, exactly the definition of XX being disconnected. This contradicts the hypothesis that XX is connected. So f(X)f(X) cannot be disconnected: it is connected.

Step 4 — The interval corollary. The connected subsets of R\mathbb{R} are exactly the intervals (a standard fact: any subset that skips a real number between two of its points fails connectedness via the same open-set separation). Since f(X)f(X) is connected by Steps 1–3, f(X)f(X) is an interval of R\mathbb{R}, so it contains every real number between any two of its elements f(a)f(a) and f(b)f(b) — the classical Intermediate Value Theorem, now seen as a special case of a purely topological fact.

UndergraduateReal-World Applications and Worked Examples

A robot arm's configuration space (all joint-angle combinations) is a topological space; whether the robot can move from pose aa to pose bb without collision is exactly whether aa and bb lie in the same connected component of the obstacle-free region, and boundedness/compactness of joint limits guarantees the reachable set behaves well (is closed, attains extremes). In economics, Arrow–Debreu equilibrium existence proofs rely on continuity of excess-demand functions on a compact price simplex, combined with connectedness arguments (a 1-D special case being: if excess demand is positive at one price and negative at another, continuity and connectedness of the price interval force an equilibrium price where it is exactly zero).

Example: Is the free configuration space connected?

A 2-link robot arm has configuration space T2=S1×S1T^2 = S^1 \times S^1 (angles θ1,θ2\theta_1, \theta_2 each range over a circle). An obstacle forbids the single point (θ1,θ2)=(0,0)(\theta_1,\theta_2) = (0,0). Is the free configuration space T2∖{(0,0)}T^2 \setminus \{(0,0)\} still connected, i.e. can the arm reach any pose from any other without hitting the obstacle?

Solution

Step 1 — Recall that removing a single point from a connected space of dimension ≥2\ge 2 typically preserves connectedness (unlike dimension 1, where removing a point from an interval disconnects it). The torus T2T^2 is a connected 2-dimensional surface.

Step 2 — Construct an explicit path avoiding the obstacle. Given any two poses p,q∈T2∖{(0,0)}p, q \in T^2 \setminus \{(0,0)\}, pick a path from pp to qq along the torus that happens to pass exactly through (0,0)(0,0) (such a path always exists since T2T^2 is path-connected). If it does pass through the obstacle, perturb the path slightly near that instant, routing it around (0,0)(0,0) through a small detour on the surface (possible since T2T^2 minus a point still has "room" in the second dimension to go around).

Step 3 — Conclude connectedness. Since any two points can always be joined by a path avoiding the single removed point, T2∖{(0,0)}T^2 \setminus \{(0,0)\} is path-connected, hence connected: the robot can indeed reach any pose from any other despite the single-point obstacle. (This is genuinely different from a 1-link arm, where the configuration space is just S1S^1, and removing a single point would disconnect the reachable region into a single arc — no detour is possible in one dimension.)

Example: Finding a 1-good market equilibrium price by connectedness

A market's excess demand function g(p)g(p) (demand minus supply at price pp) is continuous on the price interval [1,10][1,10], with g(1)=50>0g(1) = 50 > 0 (shortage at low price) and g(10)=−20<0g(10) = -20 < 0 (surplus at high price). Explain, using the connectedness-based theorem, why an equilibrium price p∗∈[1,10]p^* \in [1,10] with g(p∗)=0g(p^*)=0 must exist, without assuming any specific formula for gg.

Solution

Step 1 — Identify the topological ingredients. [1,10][1,10] is a connected subset of R\mathbb{R} (an interval), and g:[1,10]→Rg: [1,10] \to \mathbb{R} is continuous by assumption.

Step 2 — Apply the connectedness theorem. By the theorem, g([1,10])g([1,10]) is a connected subset of R\mathbb{R}, hence an interval. Since g(1)=50g(1)=50 and g(10)=−20g(10)=-20 both lie in g([1,10])g([1,10]), the interval g([1,10])g([1,10]) must contain every real number between −20-20 and 5050 — in particular it must contain 00.

Step 3 — Conclude existence (not uniqueness) of equilibrium. Therefore there exists at least one p∗∈[1,10]p^* \in [1,10] with g(p∗)=0g(p^*) = 0: an equilibrium price exists. Crucially, this argument used only continuity and connectedness — no formula for gg, no calculus, no convexity assumption — showing why the topological approach generalizes so well to economic models where demand curves are not given by closed-form formulas.

Which of these is NOT one of the topology axioms?

A robot's free configuration space is disconnected into two separate pieces around obstacle. What does this mean physically?

An excess-demand function is continuous on the compact, connected price interval [2,8][2,8], positive at p=2p=2 and negative at p=8p=8. What can you conclude?

K⊆R2K \subseteq \mathbb{R}^2 is compact and f:R2→R2f: \mathbb{R}^2 \to \mathbb{R}^2 is continuous. What must be true of f(K)f(K)?

References

  1. James Munkres (2000). Topology
  2. John L. Kelley (1955). General Topology
  3. Michael Farber (2008). Topology and Robot Motion Planning (survey chapter)