Analysis begins with convergence: a sequence $x_1, x_2, \ldots$ in $\mathbb{R}$ converges to $L$ if $|x_n - L| \to 0$. In $\mathbb{R}^n$, the absolute value becomes the Euclidean distance, and the same definition carries over. But many of the most important spaces in mathematics — spaces of [functions](/page/Function), [distributions](/page/Distribution), measures — are infinite-dimensional and carry no single canonical distance. Worse, some natural notions of convergence ([weak convergence](/page/Weak%20Convergence), convergence in distribution) cannot be described by any metric at all. The resolution is to abandon distance as the primitive concept and axiomatise the structure that distance provides: the collection of "[open sets](/page/Open%20Set)." This is the subject of **topology**.
This page develops the foundations of point-set topology: the axioms for a topological space, bases, [closed sets](/page/Closed%20Set) and closure, [continuity](/page/Continuity) and homeomorphisms, separation, compactness, and connectedness. The more specialised structures that analysis requires — [normed spaces](/page/Normed%20Vector%20Space), [topological vector spaces](/page/Topological%20Vector%20Space), metrizable spaces — are developed on their own pages.
[motivation]
## Motivation
### [Metric Spaces](/page/Metric%20Space): What Distance Gives You
In a metric space $(X, d)$, the distance function $d: X \times X \to [0, \infty)$ provides a complete toolkit for analysis: open balls $B(x, r) = \{y \in X : d(x, y) < r\}$, convergence ($x_n \to x$ iff $d(x_n, x) \to 0$), continuity ($f$ is continuous at $x$ iff $d(f(x_n), f(x)) \to 0$ whenever $d(x_n, x) \to 0$), and compactness. Every metric space carries a natural topology — the collection of sets that are unions of open balls — and the metric concepts of convergence and continuity depend only on this topology, not on the specific values of $d$.
This is the starting point: if the metric is dispensable and only the open sets matter, why insist on having a metric at all?
### What Metrics Cannot Do
The need to go beyond metrics arises in concrete situations. Consider the space $C([0,1])$ of continuous functions on the unit interval. The supremum metric $d_\infty(f, g) = \sup_{x \in [0,1]} |f(x) - g(x)|$ captures [uniform convergence](/page/Uniform%20Convergence) — but what about pointwise convergence, where $f_n(x) \to f(x)$ for each $x$? This is a natural notion of convergence, but it is not given by any metric on $C([0,1])$: the topology of pointwise convergence on an uncountable index set is not metrizable. Similarly, the [weak* topology](/page/Weak*%20Topology) on the dual of an infinite-dimensional [Banach space](/page/Banach%20Space) is typically not metrizable on the full space, only on bounded subsets.
Even when a metric exists, the same set can carry multiple metrics that produce identical open sets. On $\mathbb{R}$, the metrics $d_1(x,y) = |x-y|$ and $d_2(x,y) = \min(|x-y|, 1)$ give the same open sets, the same convergent [sequences](/page/Sequence), and the same continuous functions. The metric carries redundant information; the topology is the intrinsic structure.
### The Correct Abstraction
What properties must a collection of "open sets" satisfy? Examining what holds in every metric space, one extracts three axioms: (i) the empty set and the whole space are open, (ii) arbitrary unions of open sets are open, and (iii) finite intersections of open sets are open. These are the axioms of a topology. The insistence on *arbitrary* unions but only *finite* intersections is not arbitrary — in a metric space, the intersection $\bigcap_{n=1}^\infty (-1/n, 1/n) = \{0\}$ is a single point, which is not open in $\mathbb{R}$, while any union of open balls is always open.
[/motivation]
## Definition
The axioms of a topology distil from metric space theory exactly the structure needed for convergence, continuity, and all related concepts. The definition asks only for a collection of subsets satisfying closure under arbitrary unions and finite intersections.
[definition:Topology]
Let $X$ be a [set](/page/Set). A **topology** on $X$ is a collection $\tau \subseteq \mathcal{P}(X)$ of subsets of $X$ satisfying:
1. $\varnothing \in \tau$ and $X \in \tau$.
2. If $\{U_i\}_{i \in I}$ is any collection of elements of $\tau$, then $\bigcup_{i \in I} U_i \in \tau$.
3. If $U_1, \ldots, U_n \in \tau$, then $U_1 \cap \cdots \cap U_n \in \tau$.
The pair $(X, \tau)$ is called a **topological space**. The elements of $\tau$ are called **open sets**.
[/definition]
The axioms encode two asymmetries. Unions are unrestricted but intersections must be finite — infinite intersections of open sets need not be open, as $\bigcap_{n=1}^\infty (-1/n, 1/n) = \{0\}$ demonstrates. The axioms say nothing about complements; the behaviour of closed sets must be deduced, and it turns out to be dual: arbitrary intersections of closed sets are closed, but only finite unions.
[example:Standard Topology On R]
The **standard (Euclidean) topology** on $\mathbb{R}$ consists of all sets $U \subseteq \mathbb{R}$ such that for every $x \in U$, there exists $\varepsilon > 0$ with $(x - \varepsilon, x + \varepsilon) \subseteq U$. This is the topology induced by the metric $d(x,y) = |x-y|$: a set is open if and only if it is a union of open intervals. Verification of the axioms: the empty union gives $\varnothing$; $\mathbb{R}$ is itself open; arbitrary unions of open sets remain open; and a finite intersection of open sets is open because the minimum of finitely many positive $\varepsilon$-values is still positive.
[/example]
[example:Extreme Topologies]
Every set $X$ carries two extreme topologies. The **discrete topology** $\tau = \mathcal{P}(X)$ declares every subset open: every function out of $X$ is continuous, and convergence means eventual constancy. The **indiscrete (trivial) topology** $\tau = \{\varnothing, X\}$ declares only the empty set and $X$ open: every sequence converges to every point. The discrete topology has "too many" open sets for interesting analysis; the indiscrete topology has too few. All useful topologies lie between these extremes.
[/example]
## Bases and the Generation of Topologies
In practice, topologies are rarely specified by listing all open sets. The standard topology on $\mathbb{R}$ is described by saying "a set is open if every point has an open-interval neighbourhood inside it" — the open intervals *generate* the topology. This idea generalises: a smaller collection of sets, called a **basis**, can determine the full topology by taking arbitrary unions.
### Bases for a Topology
The question is: what conditions must a collection $\mathcal{B}$ satisfy so that "arbitrary unions of elements of $\mathcal{B}$" forms a topology? Two conditions suffice: $\mathcal{B}$ must cover $X$, and any point in the intersection of two basis elements must be contained in a third basis element inside that intersection.
[definition:Basis For A Topology]
Let $X$ be a set. A collection $\mathcal{B} \subseteq \mathcal{P}(X)$ is a **basis for a topology** on $X$ if:
1. For every $x \in X$, there exists $B \in \mathcal{B}$ with $x \in B$.
2. If $B_1, B_2 \in \mathcal{B}$ and $x \in B_1 \cap B_2$, there exists $B_3 \in \mathcal{B}$ with $x \in B_3 \subseteq B_1 \cap B_2$.
The topology $\tau_\mathcal{B}$ **generated by** $\mathcal{B}$ consists of all sets that are unions of elements of $\mathcal{B}$ (including the empty union $\varnothing$). A set $U$ is open in $\tau_\mathcal{B}$ if and only if for every $x \in U$, there exists $B \in \mathcal{B}$ with $x \in B \subseteq U$.
[/definition]
Condition (2) is precisely what is needed to ensure that finite intersections of unions of basis elements are again unions of basis elements — it is the mechanism by which the basis axioms guarantee axiom (3) of a topology.
[example:Basis For The Standard Topology On R]
The open intervals $\{(a, b) : a < b\}$ form a basis for the standard topology on $\mathbb{R}$. A strictly smaller basis also works: the open intervals with rational endpoints $\{(p, q) : p < q,\; p, q \in \mathbb{Q}\}$ generate the same topology, since every open interval contains a rational-endpoint sub-interval around each of its points. This countable basis witnesses the **second countability** of $\mathbb{R}$ — a property with profound consequences for [separability](/page/Separable) and metrizability.
[/example]
### The Metric Topology
The basis concept explains why every metric space is automatically a topological space. In a metric space $(X, d)$, the open balls $\{B(x, r) : x \in X,\, r > 0\}$ form a basis: any point in $B(x_1, r_1) \cap B(x_2, r_2)$ is contained in a smaller ball inside the intersection (take $r_3 = \min(r_1 - d(x, x_1), r_2 - d(x, x_2))$, which is positive by the triangle inequality). The topology generated by this basis is the **metric topology**, and it is the unique topology in which a sequence converges if and only if $d(x_n, x) \to 0$.
Different metrics on the same set can generate the same topology. Two metrics $d_1$ and $d_2$ on $X$ are called **topologically equivalent** if they generate the same open sets. For instance, on $\mathbb{R}^n$, the metrics induced by the $\ell^1$, $\ell^2$, and $\ell^\infty$ norms are all topologically equivalent — they have different unit balls but the same open sets. A topological space whose topology arises from some metric is called **metrizable**; not every topological space is metrizable, and characterising which ones are is a deep question (answered by the Urysohn metrization theorem and the Nagata-Smirnov theorem).
## Closed Sets, Closure, and Interior
The open sets determine their complements — the closed sets — and from these one builds the closure and interior operators, which describe how a subset relates to the ambient topology. The theory of closed sets is entirely dual to that of open sets, and the duality is mediated by [De Morgan's laws](/theorems/622).
### Closed Sets and Duality
A set $F \subseteq X$ is **closed** if its complement $X \setminus F$ is open. The properties of closed sets are dual to those of open sets:
[quotetheorem:306]
This duality is a direct consequence of [De Morgan's laws](/theorems/622): the complement of an arbitrary union is an arbitrary intersection of complements, and the complement of a finite intersection is a finite union. Since arbitrary unions of open sets are open, arbitrary intersections of closed sets are closed. Since finite intersections of open sets are open, finite unions of closed sets are closed. The asymmetry — arbitrary intersections but only finite unions — mirrors the open-set axioms: the infinite union $\bigcup_{n=1}^\infty [1/n, 1] = (0, 1]$ is not closed in $\mathbb{R}$.
A set can be both open and closed (such sets are called **clopen**): $\varnothing$ and $X$ are always clopen, and in the discrete topology every set is clopen. In a connected space, $\varnothing$ and $X$ are the *only* clopen sets — this is the definition of connectedness (see below).
### The Closure Operator
The closure of a set is the smallest closed set containing it. It captures the idea of "adding all limit points."
[definition:Closure]
Let $(X, \tau)$ be a topological space and $A \subseteq X$. The **closure** of $A$ is
\begin{align*}
\overline{A} := \bigcap \{F \subseteq X : F \text{ is closed and } A \subseteq F\},
\end{align*}
the smallest closed set containing $A$.
[/definition]
A point $x$ belongs to $\overline{A}$ if and only if every open set containing $x$ meets $A$ — that is, $U \cap A \neq \varnothing$ for all open $U \ni x$. This characterisation is the working definition in most proofs: to show $x \in \overline{A}$, exhibit an element of $A$ in every neighbourhood of $x$; to show $x \notin \overline{A}$, find a single open set around $x$ that misses $A$. A set is closed if and only if $\overline{A} = A$.
### The Interior and [Boundary](/page/Boundary)
Dual to the closure is the interior — the largest open set contained in a given set — and the boundary, which consists of points that are limits of both $A$ and its complement.
[definition:Interior]
Let $(X, \tau)$ be a topological space and $A \subseteq X$. The **interior** of $A$ is
\begin{align*}
A^\circ := \bigcup \{U \subseteq X : U \text{ is open and } U \subseteq A\},
\end{align*}
the largest open set contained in $A$.
[/definition]
[definition:Boundary]
The **boundary** of $A$ is
\begin{align*}
\partial A := \overline{A} \setminus A^\circ = \overline{A} \cap \overline{X \setminus A}.
\end{align*}
[/definition]
The closure and interior are dual: $\overline{A} = X \setminus (X \setminus A)^\circ$ and $A^\circ = X \setminus \overline{X \setminus A}$. A set is open if and only if $A = A^\circ$. Every topological space decomposes with respect to any subset $A$ as $X = A^\circ \cup \partial A \cup (X \setminus A)^\circ$ (disjoint union).
[example:Closure Interior And Boundary In R]
In $\mathbb{R}$ with the standard topology, let $A = (0, 1) \cup \{2\}$. The closure is $\overline{A} = [0, 1] \cup \{2\}$: the points $0$ and $1$ are limit points of $(0,1)$, while $2$ is already in $A$. The interior is $A^\circ = (0, 1)$: the singleton $\{2\}$ contains no open interval. The boundary is $\partial A = \{0, 1, 2\}$: these are the points where every neighbourhood meets both $A$ and $\mathbb{R} \setminus A$.
[/example]
## Continuity and Homeomorphisms
Continuity is the central concept that topology was designed to support. In metric spaces, continuity uses $\varepsilon$-$\delta$ conditions or sequential convergence, both of which depend on the metric. The topological reformulation replaces these with a condition on preimages of open sets — a definition that applies uniformly to all topological spaces, including those with no metric.
### Continuous Functions
The key insight is that in a metric space, $f: X \to Y$ is continuous if and only if $f^{-1}(U)$ is open for every open $U \subseteq Y$. This characterisation uses only the topologies of $X$ and $Y$, not the metrics, and becomes the definition in general.
[definition:Continuous Function]
Let $(X, \tau_X)$ and $(Y, \tau_Y)$ be topological spaces. A function $f: X \to Y$ is **continuous** if the preimage of every open set is open:
\begin{align*}
V \in \tau_Y \implies f^{-1}(V) \in \tau_X.
\end{align*}
[/definition]
An equivalent characterisation follows by taking complements: $f$ is continuous if and only if $f^{-1}(F)$ is closed for every closed $F \subseteq Y$. This closed-set version is often more convenient — for instance, it immediately shows that the zero set $\{x \in X : f(x) = 0\}$ of a continuous real-valued function is closed.
Continuity composes: if $f: X \to Y$ and $g: Y \to Z$ are continuous, then $g \circ f: X \to Z$ is continuous, because $(g \circ f)^{-1}(W) = f^{-1}(g^{-1}(W))$ is the preimage under $f$ of the open set $g^{-1}(W)$. The identity function is always continuous, and constant functions are always continuous. Together, these facts make topological spaces and continuous functions into a category — the category **Top**.
### Homeomorphisms and the Compact-Hausdorff Criterion
The correct notion of equivalence for topological spaces is the homeomorphism: a bijection that preserves the open-set structure in both directions.
[definition:Homeomorphism]
A function $f: X \to Y$ between topological spaces is a **homeomorphism** if $f$ is bijective and both $f$ and $f^{-1}$ are continuous. Equivalently, $f$ is a bijection such that $U \in \tau_X$ if and only if $f(U) \in \tau_Y$.
If a homeomorphism exists, $X$ and $Y$ are **homeomorphic**, written $X \cong Y$.
[/definition]
A continuous bijection need not be a homeomorphism — the inverse can fail to be continuous.
[example:Failure Of Continuous Bijection To Be Homeomorphism]
The function $f: [0, 2\pi) \to S^1$ defined by $f(t) = (\cos t, \sin t)$ is a continuous bijection from the half-open interval to the unit circle. But $f^{-1}$ is not continuous: a small arc around $(1, 0) \in S^1$ has a preimage that "wraps around" the endpoint, consisting of $[0, \varepsilon) \cup (2\pi - \varepsilon, 2\pi)$, which is not an interval in $[0, 2\pi)$. The problem is that $[0, 2\pi)$ is not compact — if it were, the following theorem would guarantee that $f^{-1}$ is automatically continuous.
[/example]
The [Closed Map Lemma](/theorems/317) states that a continuous function from a compact space to a Hausdorff space is necessarily a closed map — images of closed sets are closed. Since a closed bijection has a continuous inverse, this immediately yields:
[quotetheorem:318]
This is one of the most frequently used results in point-set topology. Whenever one constructs a continuous bijection from a compact space to a Hausdorff space, the inverse continuity — and hence the homeomorphism — is free. The compactness hypothesis is essential: the example $[0, 2\pi) \to S^1$ above shows that without it, continuous bijections need not be homeomorphisms.
## Subspace and Product Topologies
The basic constructions of new topological spaces from old ones are the subspace topology (restricting to a subset) and the product topology (combining two or more spaces). Both are characterised by universal properties: they are the coarsest topologies making certain natural maps continuous.
### The Subspace Topology
Given a topological space $(X, \tau)$ and a subset $A \subseteq X$, one wants $A$ to inherit a topology from $X$ in a way that is compatible with the ambient structure. The natural choice intersects the open sets of $X$ with $A$.
[definition:Subspace Topology]
Let $(X, \tau)$ be a topological space and $A \subseteq X$. The **subspace topology** on $A$ is
\begin{align*}
\tau_A := \{U \cap A : U \in \tau\}.
\end{align*}
The pair $(A, \tau_A)$ is a **subspace** of $(X, \tau)$.
[/definition]
The subspace topology is the coarsest topology on $A$ making the inclusion $\iota: A \hookrightarrow X$ continuous. It satisfies a universal property: a function $f: Y \to A$ is continuous if and only if $\iota \circ f: Y \to X$ is continuous.
Care is needed with "open" and "closed" in subspaces. A subset $B \subseteq A$ can be open in $\tau_A$ without being open in $\tau$: the set $[0, 1)$ is open in the subspace $[0, 1]$ of $\mathbb{R}$ (since $[0, 1) = (-1, 1) \cap [0, 1]$), but not open in $\mathbb{R}$.
### The Product Topology
Given topological spaces $X$ and $Y$, the product $X \times Y$ should carry a topology making the projections $\pi_X$ and $\pi_Y$ continuous. The obvious candidate — all products $U \times V$ with $U$ open in $X$ and $V$ open in $Y$ — is a basis but not itself a topology (it is not closed under unions). The product topology is generated by this basis.
[definition:Product Topology]
Let $(X, \tau_X)$ and $(Y, \tau_Y)$ be topological spaces. The **product topology** on $X \times Y$ is the topology generated by the basis
\begin{align*}
\mathcal{B} = \{U \times V : U \in \tau_X,\; V \in \tau_Y\}.
\end{align*}
A set $W \subseteq X \times Y$ is open if and only if for every $(x, y) \in W$, there exist $U \in \tau_X$ and $V \in \tau_Y$ with $(x, y) \in U \times V \subseteq W$.
[/definition]
The product topology satisfies the universal property: a function $f: Z \to X \times Y$ is continuous if and only if both $\pi_X \circ f$ and $\pi_Y \circ f$ are continuous. This means that checking continuity of a function into a product reduces to checking continuity of each coordinate.
The product topology extends to finite products $X_1 \times \cdots \times X_n$ by iteration, and to arbitrary products $\prod_{i \in I} X_i$ — where the correct topology (the Tychonoff product topology) requires only finitely many factors to be constrained at a time, not all of them. This distinction matters: the "box topology" (which constrains all factors) fails to have the universal property and produces pathological behaviour in infinite dimensions.
## Separation and the Hausdorff Condition
The axioms of a topology are deliberately minimal — they say nothing about how well the topology distinguishes points. In the indiscrete topology, every sequence converges to every point and no pair of distinct points can be separated by open sets. For analysis, one needs topologies that at least distinguish distinct points by their neighbourhoods.
[definition:Hausdorff Space]
A topological space $(X, \tau)$ is **Hausdorff** (or $T_2$) if for every pair of distinct points $x, y \in X$, there exist disjoint open sets $U, V \in \tau$ with $x \in U$ and $y \in V$:
\begin{align*}
\forall\, x \neq y \in X, \quad \exists\, U, V \in \tau: \quad x \in U,\; y \in V,\; U \cap V = \varnothing.
\end{align*}
[/definition]
The Hausdorff condition has three important consequences. First, **[limits](/page/Limit) are unique**: if $x_n \to x$ and $x_n \to y$, separate $x$ and $y$ by disjoint open sets; for large $n$, $x_n$ must belong to both, which is impossible, so $x = y$. Second, **singletons are closed**: for every $y \neq x$, there is an open set containing $y$ that misses $x$, so $X \setminus \{x\}$ is a union of open sets and hence open. Third, the Hausdorff property interacts powerfully with compactness, as the next section develops.
Every metric space is Hausdorff: given $x \neq y$, set $r = d(x,y)/2 > 0$ and take $U = B(x, r)$, $V = B(y, r)$; the triangle inequality forces $U \cap V = \varnothing$. The converse is false — there exist Hausdorff spaces that are not metrizable, such as uncountable products of $\mathbb{R}$ with the product topology.
[example:Non Hausdorff Quotient]
Let $X = \mathbb{R}$ with the standard topology, and form the quotient space $Y = X / {\sim}$ where $x \sim y$ if and only if $x - y \in \mathbb{Q}$. The quotient topology on $Y$ is the indiscrete topology: every equivalence class is dense in $\mathbb{R}$ (the rationals translate any class to every point), so any nonempty open set in $Y$ pulls back to a dense open set in $\mathbb{R}$, and the only dense open set that is also closed (as a saturated set must be) is $\mathbb{R}$ itself. In particular, $Y$ is not Hausdorff — distinct points cannot be separated.
[/example]
## Compactness
Compactness is arguably the single most important property in topology and analysis. It is the topological generalisation of the finiteness that makes closed bounded subsets of $\mathbb{R}^n$ well-behaved, and it provides the key tool for passing from local to global: extracting convergent subsequences, attaining suprema, extending local estimates. Without compactness, most existence theorems in analysis — from the Extreme Value Theorem to the existence of minimisers in the [calculus of variations](/page/Calculus%20of%20Variations) — would fail.
### The Open Cover Definition
In metric spaces, compactness can be characterised sequentially (every sequence has a convergent subsequence). In general topological spaces, the sequential characterisation fails — there exist compact spaces with sequences that have no convergent subsequences — and the correct definition uses open covers.
[definition:Compact Space]
A topological space $(X, \tau)$ is **compact** if every open cover has a finite subcover: whenever $\{U_i\}_{i \in I}$ is a collection of open sets with $X = \bigcup_{i \in I} U_i$, there exist finitely many indices $i_1, \ldots, i_n \in I$ with $X = U_{i_1} \cup \cdots \cup U_{i_n}$.
A subset $K \subseteq X$ is **compact** if it is compact in the subspace topology.
[/definition]
### Compactness in Metric Spaces
The open-cover definition looks abstract, but in metric spaces it coincides with the more concrete sequential and metric characterisations:
[quotetheorem:316]
The equivalence of these three conditions relies on the metric structure. Sequential compactness implies total boundedness (otherwise one can extract a sequence with mutual distances $\ge \varepsilon$, which has no convergent subsequence). Total boundedness plus completeness gives the covering property (the finite $\varepsilon$-nets provide the finite subcovers). In general topological spaces, sequential compactness and compactness are independent: neither implies the other without metrizability or first countability.
The concrete incarnation in Euclidean space is the Heine-Borel theorem:
[quotetheorem:315]
This result is specific to finite-dimensional spaces. In infinite-dimensional normed spaces, the closed unit ball is closed and bounded but never compact — by Riesz's lemma, one can extract a sequence of unit vectors with mutual distances $\ge 1/2$, which has no convergent subsequence. This failure is one of the central difficulties of infinite-dimensional analysis and the reason that weak topologies and weak compactness become essential in functional analysis.
### Compactness and Continuous Functions
The power of compactness lies in its interaction with continuity. Continuous images of compact spaces are compact, and continuous real-valued functions on compact spaces attain their extrema.
[quotetheorem:305]
The proof is a direct manipulation of open covers: if $\{V_i\}$ covers $f(X)$, then $\{f^{-1}(V_i)\}$ covers $X$; extracting a finite subcover of $X$ gives a finite subcover of $f(X)$. This underpins many constructions: it is the reason that continuous images of closed bounded sets in $\mathbb{R}^n$ are again closed and bounded, and it provides the compactness needed in variational arguments.
[quotetheorem:304]
The Extreme Value Theorem is a direct consequence: $f(X)$ is a compact subset of $\mathbb{R}$, hence closed and bounded by Heine-Borel, so $\sup f(X)$ and $\inf f(X)$ belong to $f(X)$. This is the abstract version of the calculus fact that a continuous function on $[a, b]$ attains its maximum and minimum.
### Compactness and the Hausdorff Property
The interaction between compactness and the Hausdorff condition produces some of the most useful results in point-set topology. The fundamental fact is that compactness "acts like finiteness" with respect to closed sets:
[quotetheorem:307]
Part (1) — closed subsets of compact spaces are compact — is the standard method for verifying compactness in practice: show the set is a closed subset of a known compact space. Part (2) — compact subsets of Hausdorff spaces are closed — is a powerful automatic regularity result. Together they give: in a compact Hausdorff space, a subset is compact if and only if it is closed.
The [Closed Map Lemma](/theorems/317) and the [Topological Inverse Function Theorem](/theorems/318) (discussed above) are further consequences of this interaction. The product of compact spaces is again compact:
[quotetheorem:314]
Tychonoff's theorem for finite products extends by induction to any finite number of factors. The full Tychonoff theorem — that an arbitrary product of compact spaces is compact in the product topology — is one of the deepest results in point-set topology and is equivalent to the Axiom of Choice. It is the foundation of the Banach-Alaoglu theorem, the existence of Haar measure, and Stone-Čech compactification.
### Failure of Compactness in Infinite Dimensions
The failure of the Heine-Borel theorem in infinite dimensions is not a minor inconvenience — it fundamentally changes the landscape of analysis. In a finite-dimensional normed space, the unit ball $\{x : \|x\| \le 1\}$ is compact, so bounded minimising sequences always have convergent subsequences. In an infinite-dimensional normed space, this fails: the unit ball is closed and bounded but not compact.
[example:Non Compactness Of The Unit Ball In Infinite Dimensions]
In $\ell^2 = \{(x_1, x_2, \ldots) : \sum_{k=1}^\infty x_k^2 < \infty\}$, the standard basis vectors $e_1 = (1,0,0,\ldots)$, $e_2 = (0,1,0,\ldots)$, $\ldots$ satisfy $\|e_n\| = 1$ for all $n$ and $\|e_m - e_n\| = \sqrt{2}$ for $m \neq n$. No subsequence can be Cauchy (since all pairwise distances are $\sqrt{2}$), so no subsequence converges. The closed unit ball of $\ell^2$ is therefore not sequentially compact, hence not compact. The same argument applies to any infinite-dimensional normed space, using Riesz's lemma to construct a sequence of unit vectors with pairwise distances bounded below.
[/example]
This is why functional analysis develops alternative notions of compactness — weak compactness, weak* compactness — using coarser topologies on which bounded sets *are* (relatively) compact. The Banach-Alaoglu theorem (the closed unit ball of $X^*$ is weak* compact) is the replacement for Heine-Borel in infinite dimensions.
## Connectedness
Connectedness captures the intuitive idea that a space is "in one piece" — it has no gaps or breaks. Like compactness, connectedness is preserved by continuous functions, making it a topological invariant: homeomorphic spaces are either both connected or both disconnected. The theory of connectedness provides the abstract framework behind the [Intermediate Value Theorem](/theorems/629) and its generalisations.
### Connected Spaces and the Intermediate Value Property
A connected space cannot be partitioned into two disjoint nonempty open sets. Equivalently, the only clopen subsets are $\varnothing$ and $X$.
[definition:Connected Space]
A topological space $(X, \tau)$ is **connected** if there is no partition of $X$ into two disjoint nonempty open sets. Equivalently, the only subsets of $X$ that are both open and closed are $\varnothing$ and $X$.
A subset $A \subseteq X$ is **connected** if it is connected in the subspace topology.
[/definition]
The abstract definition connects to familiar calculus through the following characterisation:
[quotetheorem:294]
Condition (2) — continuous real-valued functions have interval images — is the abstract Intermediate Value Theorem. In $\mathbb{R}$, the connected subsets are precisely the intervals: any subset with a "gap" at a point $a$ can be disconnected by the continuous function $x \mapsto \mathbb{1}_{(a, \infty)}(x)$ applied to $\{-1, 1\}$ with the discrete topology. Condition (3) is often the most convenient for proving connectedness: a space is connected if and only if every continuous function to a discrete two-point set is constant.
Continuous functions preserve connectedness:
[quotetheorem:296]
This is the engine behind the classical Intermediate Value Theorem: $[a, b]$ is connected (as an interval in $\mathbb{R}$), so if $f: [a, b] \to \mathbb{R}$ is continuous, the image $f([a,b])$ is a connected subset of $\mathbb{R}$, hence an interval, so $f$ takes every value between $f(a)$ and $f(b)$.
### Path-Connectedness
A stronger, more geometric notion of connectedness requires that any two points can be joined by a continuous path.
[definition:Path Connected Space]
A topological space $X$ is **path-connected** if for every $x, y \in X$, there exists a continuous function $\gamma: [0, 1] \to X$ with $\gamma(0) = x$ and $\gamma(1) = y$.
[/definition]
The relationship between path-connectedness and connectedness is:
[quotetheorem:300]
The proof is concise: if $X = U \cup V$ were a disconnection and $\gamma$ a path from a point in $U$ to a point in $V$, then $\gamma^{-1}(U)$ and $\gamma^{-1}(V)$ would disconnect $[0,1]$, contradicting the connectedness of $[0,1]$. The converse fails:
[example:The Topologist's Sine Curve]
Define $S = \{(x, \sin(1/x)) : x > 0\} \subset \mathbb{R}^2$ and let $\overline{S}$ be its closure, which equals $S \cup (\{0\} \times [-1, 1])$. The set $S$ is the image of $(0, \infty)$ under the continuous map $x \mapsto (x, \sin(1/x))$, hence connected by the [continuous image theorem](/theorems/296). The [closure of a connected set is connected](/theorems/297), so $\overline{S}$ is connected.
However, $\overline{S}$ is not path-connected. Any continuous path $\gamma: [0,1] \to \overline{S}$ starting at $(0, 0)$ and ending at a point $(a, \sin(1/a))$ with $a > 0$ would need to traverse infinitely many oscillations of $\sin(1/x)$ near $x = 0$. A careful argument using the intermediate value theorem shows that $\gamma^{-1}(\{0\} \times [-1,1])$ would need to be both closed (by continuity) and contain $0$ as a non-isolated point, while $\gamma$ would have to hit every height in $[-1,1]$ infinitely often, contradicting the uniform continuity of $\gamma$ on $[0,1]$.
[/example]
### Connected Components
Every topological space admits a canonical decomposition into maximal connected pieces:
[quotetheorem:302]
The connected components partition $X$ into disjoint closed connected subsets. They need not be open: in $\mathbb{Q}$ with the subspace topology from $\mathbb{R}$, every connected component is a singleton $\{q\}$ (between any two rationals lies an irrational, providing a disconnection), which is closed but not open. A space in which every connected component is a single point is called **totally disconnected**. A space is connected if and only if it has exactly one connected component.
### Products of Connected Spaces
Connectedness is preserved by products:
The [product of connected spaces is connected](/theorems/299). The proof for two factors proceeds by fixing a point $(a, b) \in X \times Y$ and showing that every other point $(x, y)$ lies in the same connected component: the "cross" $(\{a\} \times Y) \cup (X \times \{y\})$ is a union of two connected sets (each homeomorphic to $Y$ or $X$) sharing the point $(a, y)$, hence connected by the [overlapping union theorem](/theorems/298). The union of all such crosses over $y \in Y$ is connected and covers $X \times Y$.
This result extends by induction to finite products, and the full result for arbitrary products (which requires a different argument) also holds: an arbitrary product of connected spaces is connected in the product topology.
## References
- Munkres, J. R., *Topology* (2nd ed., 2000).
- Willard, S., *General Topology* (1970).
- Kelley, J. L., *General Topology* (1955).
- Dugundji, J., *Topology* (1966).