Topology Explained
What remains when shape is allowed to bend, stretch, and change?
Topology begins with the famous claim that a coffee mug and a donut can be considered the same shape—but the real mathematics goes much deeper. Topology studies spaces through open sets, continuity, homeomorphisms, connectedness, compactness, orientability, Euler characteristic, and algebraic invariants such as the fundamental group. This lesson develops those ideas from intuitive deformation all the way to genuine university-level topology.
Estimated read time: 45 minutes • Layered for advanced high school, undergraduate, and general mathematical readers.

What Is Topology?
Topology is the mathematical study of spaces and the properties preserved by homeomorphisms and continuous transformations. Two spaces are topologically equivalent when there is a homeomorphism between them—a bijective continuous map with continuous inverse. Topology ignores measurements such as exact distance and angle and instead studies deeper structure such as connectedness, compactness, orientability, holes, and algebraic invariants.
The popular coffee-mug-and-donut example is an intuition builder, not the definition of topology. In an idealized model, a one-handled mug-shaped solid can be continuously reshaped into a solid torus without tearing or gluing. Exact dimensions, curvature, and physical imperfections are irrelevant to the underlying topological type.
To prove two spaces are topologically different, find a property a homeomorphism cannot destroy.
Geometry vs. Topology

Geometry and topology ask different questions about shape.
| Geometry Often Studies | Topology Often Studies |
|---|---|
| Distance | Continuity |
| Angles | Connectedness |
| Curvature | Compactness |
| Area and volume | Orientability |
| Exact geometric shape | Topological invariants |
A circle can be stretched into an ellipse or a wavy simple closed curve. Distances and curvatures change, but the object remains one connected loop.
S^1\cong\text{ellipse}\cong\text{distorted simple closed loop}.
\]
A simple closed curve in the plane is not merely a visual loop: the Jordan Curve Theorem says it separates the plane into an inside and an outside, with the curve as their common boundary. That theorem is one of topology’s classic bridges between intuitive pictures and rigorous structure.
By contrast, one circle cannot become two disjoint circles through a homeomorphism:
S^1\not\cong S^1\sqcup S^1.
\]
The obstruction is connectedness: the first space is connected and the second is not.
Topology Begins With Open Sets

A topological space is a pair
\boxed{(X,\mathcal T)}
\]
where \(X\) is a set and \(\mathcal T\) is a collection of subsets of \(X\). The members of \(\mathcal T\) are called open sets.
The Three Topology Axioms
The empty set and the whole space are open:
\varnothing,X\in\mathcal T.
\]
An arbitrary union of open sets is open:
\{U_\alpha\}_{\alpha\in A}\subseteq\mathcal T
\quad\Longrightarrow\quad
\bigcup_{\alpha\in A}U_\alpha\in\mathcal T.
\]
A finite intersection of open sets is open:
U_1,\dots,U_n\in\mathcal T
\quad\Longrightarrow\quad
\bigcap_{k=1}^{n}U_k\in\mathcal T.
\]
In the usual topology on \(\mathbb R\), every interval \((-1/n,1/n)\) is open, but
\bigcap_{n=1}^{\infty}\left(-\frac1n,\frac1n\right)=\{0\},
\]
and \(\{0\}\) is not open in the usual topology on \(\mathbb R\).
Three Important Examples of Topologies
| Topology | Definition | Interpretation |
|---|---|---|
| Usual topology on \(\mathbb R\) | Generated by open intervals | The topology used in ordinary calculus and analysis |
| Discrete topology | \(\mathcal T=\mathcal P(X)\) | Every subset is open |
| Indiscrete topology | \(\mathcal T=\{\varnothing,X\}\) | Only the required two sets are open |
Metrics Create Topologies
If \(X\) has a metric \(d\), then open balls
B_r(x)=\{y\in X:d(x,y)\lt r\}
\]
generate a topology. But abstract topology is more general: not every topology needs to come from a metric.
Continuity Is Defined by Open Sets
The reason open sets matter is that they give topology its definition of continuity.
A function
f:X\to Y
\]
is continuous if the inverse image of every open subset of \(Y\) is open in \(X\):
\boxed{
f\text{ continuous}
\iff
f^{-1}(U)\text{ is open in }X
\text{ for every open }U\subseteq Y
}.
\]
Worked Example: \(f(x)=x^2\)
Take
f:\mathbb R\to\mathbb R,
\qquad
f(x)=x^2.
\]
The inverse image of the open interval \((1,4)\) is
f^{-1}((1,4))=(-2,-1)\cup(1,2),
\]
which is open. The example is useful because the preimage is open even though it is not a single interval.
Closed Sets
A subset \(F\subseteq X\) is closed when its complement \(X\setminus F\) is open. Continuity can equivalently be characterized by inverse images of closed sets:
f\text{ continuous}
\iff
f^{-1}(F)\text{ is closed whenever }F\text{ is closed}.
\]
Homeomorphisms: When Two Spaces Are Topologically the Same

A function \(f:X\to Y\) is a homeomorphism if:
- \(f\) is bijective.
- \(f\) is continuous.
- \(f^{-1}\) is continuous.
\boxed{X\cong Y}.
\]
Why Must the Inverse Be Continuous?
A continuous bijection alone can preserve continuity in one direction while failing to preserve the topology in the reverse direction. Requiring \(f^{-1}\) to be continuous guarantees that the open-set structure is preserved both ways.
A Topological Proof That \(S^1\not\cong[0,1]\)
Assume for contradiction that there were a homeomorphism
h:S^1\to[0,1].
\]
Choose an interior point \(y\in(0,1)\), and let \(x=h^{-1}(y)\). Removing \(x\) from the circle leaves a connected arc:
S^1\setminus\{x\}\text{ is connected}.
\]
But removing the interior point \(y\) from the interval produces two components:
[0,1]\setminus\{y\}=[0,y)\cup(y,1],
\]
which is disconnected. A homeomorphism between the complements would preserve connectedness, giving a contradiction.
\boxed{S^1\not\cong[0,1]}.
\]
What Is a Topological Invariant?
A topological invariant is a property or quantity preserved by homeomorphism. If two spaces have different values of an invariant, they cannot be homeomorphic.
| Invariant or Property | Question It Answers |
|---|---|
| Connectedness | Is the space all in one connected piece? |
| Compactness | Can every open cover be reduced to finitely many sets? |
| Euler characteristic | What combinatorial topological quantity survives subdivision? |
| Orientability | Can orientation be chosen consistently over the surface? |
| Fundamental group | What loop types cannot be continuously contracted away? |
When asked whether two spaces are homeomorphic, do not stare at the pictures. Search for an invariant that distinguishes them.
Connectedness and Path Connectedness

A topological space \(X\) is connected if there do not exist disjoint, nonempty open sets \(U,V\subseteq X\) such that
X=U\cup V.
\]
Such a pair \(U,V\) would be called a separation of \(X\).
A space \(X\) is path-connected if for every \(x,y\in X\), there exists a continuous path
\gamma:[0,1]\to X,
\qquad
\gamma(0)=x,
\quad
\gamma(1)=y.
\]
\boxed{\text{path-connected}\Longrightarrow\text{connected}}.
\]
The converse fails.
The Topologist’s Sine Curve
A standard example is
T=
\left\{
\left(x,\sin\frac1x\right):0\lt x\le1
\right\}
\cup
\left(\{0\}\times[-1,1]\right).
\]
The oscillating graph accumulates on the entire vertical segment \(\{0\}\times[-1,1]\). The resulting space \(T\) is connected, but there is no path joining a point on that vertical segment to a point of the oscillating graph.
\boxed{T\text{ is connected but not path-connected}.}
\]
Compactness: One of Topology’s Most Powerful Ideas

A topological space \(X\) is compact if every open cover has a finite subcover. If
X\subseteq\bigcup_{\alpha\in A}U_\alpha,
\]
where all \(U_\alpha\) are open, then there exist \(U_{\alpha_1},\dots,U_{\alpha_n}\) such that
X\subseteq U_{\alpha_1}\cup\cdots\cup U_{\alpha_n}.
\]
Why \((0,1)\) Is Not Compact
Consider the open cover
U_n=\left(\frac1n,1\right),
\qquad n\ge2.
\]
Every point of \((0,1)\) lies in some \(U_n\), so these sets cover the interval. But any finite selection has a largest index \(N\), and its union misses all points in \((0,1/N]\). Therefore no finite subcover exists.
\boxed{(0,1)\text{ is not compact}.}
\]
Heine-Borel in Euclidean Space
\boxed{
K\subseteq\mathbb R^n
\text{ compact}
\iff
K\text{ is closed and bounded}
}.
\]
“Closed and bounded” characterizes compactness in finite-dimensional Euclidean spaces such as \(\mathbb R^n\). It is not the definition of compactness and fails as a characterization in more general spaces.
Why Calculus Cares: The Extreme Value Theorem
If \(K\) is nonempty and compact and \(f:K\to\mathbb R\) is continuous, then \(f(K)\) is compact in \(\mathbb R\). Hence it is closed and bounded, so it contains its largest and smallest values.
\boxed{f\text{ attains both a maximum and a minimum}.}
\]
For the full Real Analysis treatment—including open covers, Heine-Borel, sequential compactness, and proof strategy—see Compactness in Real Analysis.
Genus and Euler Characteristic

For a connected closed orientable surface, the genus \(g\) counts the number of handles.
| Surface | Genus | Euler Characteristic |
|---|---|---|
| Sphere \(S^2\) | \(g=0\) | \(\chi=2\) |
| Torus \(T^2\) | \(g=1\) | \(\chi=0\) |
| Double torus | \(g=2\) | \(\chi=-2\) |
\boxed{\chi=2-2g}.
\]
Euler’s Polyhedral Formula
For a suitable finite cell or polyhedral decomposition,
\boxed{\chi=V-E+F}.
\]
For the boundary of a cube,
\chi=8-12+6=2.
\]
The cube boundary is therefore consistent with the sphere’s Euler characteristic. Indeed, the cube boundary and sphere are homeomorphic.
The formula \(\chi=2-2g\) is specifically for connected closed orientable surfaces. Non-orientable closed surfaces form a different family.
The Möbius Strip and Orientability

A Möbius strip is created by taking a rectangular strip, adding one half-twist, and identifying the ends. One standard quotient description is
(0,t)\sim(1,-t).
\]
It has:
- one connected boundary component,
- one continuous side in the familiar physical sense,
- no globally consistent orientation.
A smooth surface is non-orientable when it is impossible to choose a continuous unit normal vector field over the entire surface.
Transport a local normal vector once around the Möbius strip and it returns reversed.
Why This Matters for Stokes’ Theorem
The usual global form of Stokes’ Theorem requires an oriented surface:
\boxed{
\oint_{\partial S}\mathbf F\cdot d\mathbf r
=
\iint_S(\nabla\times\mathbf F)\cdot\widehat{\mathbf n}\,dS
}.
\]
A Möbius strip admits no continuous global unit normal, so it cannot be oriented globally in the required way.
The Möbius Strip Has Fundamental Group \(\mathbb Z\)
The Möbius strip deformation-retracts onto its central core circle. Therefore
\boxed{\pi_1(\text{Möbius strip})\cong\mathbb Z}.
\]
See Möbius Strip Explained: Orientation, Vector Calculus, and Stokes’ Theorem and Stokes’ Theorem Explained.
The Klein Bottle and the Classification of Closed Surfaces
The Möbius strip has boundary. A natural next question is what non-orientability looks like for a closed surface. The Klein bottle is the standard example: it is connected, closed, and non-orientable.
Non-Orientable Euler Characteristic
For a connected closed non-orientable surface obtained as a connected sum of \(k\) projective planes,
\boxed{\chi=2-k}.
\]
The Klein bottle corresponds to \(k=2\), so
\chi(\text{Klein bottle})=0.
\]
But the torus also has Euler characteristic zero:
\chi(T^2)=0.
\]
The torus and Klein bottle have the same Euler characteristic, but they are not homeomorphic because the torus is orientable and the Klein bottle is not.
Classification Theorem for Connected Closed Surfaces
Every connected closed surface is homeomorphic to exactly one member of the following families:
- the sphere \(S^2\),
- a connected sum of \(g\) tori, giving the orientable genus-\(g\) surfaces,
- a connected sum of \(k\) projective planes, giving the non-orientable genus-\(k\) surfaces.
For connected closed surfaces, orientability together with Euler characteristic determines the homeomorphism type. This is the payoff of the invariant viewpoint: a complicated surface can be classified by a small amount of preserved information.
The Fundamental Group

Fix a base point \(x_0\in X\). A based loop is a continuous function
\gamma:[0,1]\to X,
\qquad
\gamma(0)=\gamma(1)=x_0.
\]
Two based loops are considered equivalent when one can be continuously deformed into the other while keeping the base point fixed. This equivalence is called homotopy relative to the base point.
Homotopy classes of loops form a group under loop concatenation:
\boxed{\pi_1(X,x_0)}.
\]
The Plane Has Trivial Fundamental Group
Every loop in \(\mathbb R^2\) can be continuously contracted to the base point. Therefore
\boxed{\pi_1(\mathbb R^2,x_0)=\{e\}}.
\]
The Circle Produces the Integers
A loop around \(S^1\) has an integer winding number:
\ldots,-2,-1,0,1,2,\ldots
\]
These winding numbers classify the homotopy classes of loops:
\boxed{\pi_1(S^1,x_0)\cong\mathbb Z}.
\]
Why the Annulus Also Has Fundamental Group \(\mathbb Z\)
An annulus deformation-retracts radially onto its central circle. Therefore the annulus and \(S^1\) have isomorphic fundamental groups:
\pi_1(\text{annulus})\cong\mathbb Z.
\]
Advanced Bonus: The Torus
A torus has two independent directions in which loops can wind, producing
\boxed{\pi_1(T^2)\cong\mathbb Z\times\mathbb Z}.
\]
Topology studies geometric deformation. Algebraic topology assigns algebraic objects—groups, homology groups, and cohomology groups—to spaces so that geometric differences become algebraic differences.
Why Topology Matters Across Mathematics and Science

| Field | Topological Connection |
|---|---|
| Real Analysis | Continuity, compactness, connectedness, convergence, metric spaces |
| Geometry | Surfaces, manifolds, orientability, classification |
| Algebra | Fundamental groups, homology, cohomology |
| Differential Equations | Phase spaces, invariant sets, attractors, qualitative dynamics |
| Physics | Topological phases, defects, knots, and global structure |
| Data Science | Persistent homology and topological data analysis |
Geometry asks how a space is shaped. Topology asks what structure remains when the space is allowed to deform continuously.
Topology Definitions and Formulas to Know
Topology Axioms
\varnothing,X\in\mathcal T
\]
\bigcup_{\alpha\in A}U_\alpha\in\mathcal T
\]
\bigcap_{k=1}^{n}U_k\in\mathcal T
\]
Continuity
f\text{ continuous}
\iff
f^{-1}(U)\text{ open for every open }U.
\]
Homeomorphism
X\cong Y.
\]
Path Connectedness
\gamma:[0,1]\to X,
\qquad
\gamma(0)=x,
\quad
\gamma(1)=y.
\]
Compactness
X\subseteq\bigcup_{\alpha\in A}U_\alpha
\Longrightarrow
X\subseteq U_{\alpha_1}\cup\cdots\cup U_{\alpha_n}.
\]
Heine-Borel
K\subseteq\mathbb R^n
\text{ compact}
\iff
K\text{ closed and bounded}.
\]
Euler Characteristic
\chi=V-E+F.
\]
\chi=2-2g.
\]
\chi=2-k.
\]
Fundamental Groups
\pi_1(\mathbb R^2)=\{e\}.
\]
\pi_1(S^1)\cong\mathbb Z.
\]
\pi_1(T^2)\cong\mathbb Z\times\mathbb Z.
\]
Common Topology Mistakes
- Thinking topology means “counting holes.” Hole structure matters, but topology begins with open sets and continuity.
- Forgetting “arbitrary unions” and “finite intersections.” The asymmetry in the topology axioms is essential.
- Defining a homeomorphism as merely continuous and bijective. The inverse must also be continuous.
- Assuming connected means path-connected. Path-connected implies connected, but the converse can fail.
- Defining compact as closed and bounded. That is the Heine-Borel characterization in \(\mathbb R^n\), not the general definition.
- Using genus for arbitrary spaces. The familiar handle-counting classification applies to connected closed orientable surfaces.
- Assuming Euler characteristic determines a surface completely. The torus and Klein bottle both have \(\chi=0\), but they are not homeomorphic because orientability differs.
- Confusing a torus with an annulus. The annulus has fundamental group \(\mathbb Z\); the torus surface has fundamental group \(\mathbb Z\times\mathbb Z\).
- Thinking a Möbius strip has no boundary. It has exactly one connected boundary component.
Prove You Understand Topology
Close the article before doing these. Retrieval—not rereading—is the test.
- Rewrite the three topology axioms from memory.
- State aloud the topological definition of continuity using inverse images of open sets.
- Define a homeomorphism and explain why the inverse must be continuous.
- Explain why \(S^1\not\cong[0,1]\) using the point-removal argument.
- Distinguish connectedness from path connectedness and give the topologist’s sine curve as a counterexample to the converse.
- State the open-cover definition of compactness and explain why \((0,1)\) is not compact.
- Compute the Euler characteristic of a sphere, torus, and double torus from \(\chi=2-2g\).
- Explain aloud why a Möbius strip is non-orientable and why its fundamental group is \(\mathbb Z\).
- Explain why \(\pi_1(S^1)\cong\mathbb Z\) using winding number.
- Compare the torus and Klein bottle: both have Euler characteristic zero, but only one is orientable.
Do not memorize topology as vocabulary. Memorize the definitions, then practice using them to prove what can and cannot happen.
Topology FAQ
What is topology in simple terms?
Topology is the study of spaces and properties that remain unchanged under homeomorphisms and continuous transformations. It focuses on ideas such as open sets, continuity, connectedness, compactness, orientability, and topological invariants.
Why are a coffee mug and a donut considered the same in topology?
In an idealized model, a one-handled mug-shaped solid can be continuously deformed into a solid torus without cutting or gluing. They are therefore topologically equivalent even though their geometry is different.
What is a topological space?
A topological space is a pair \((X,\mathcal T)\), where \(X\) is a set and \(\mathcal T\) is a collection of subsets containing the empty set and \(X\), closed under arbitrary unions and finite intersections.
What is an open set in topology?
An open set is any subset designated as open by the topology \(\mathcal T\). In metric spaces, a set is open when every point has a sufficiently small open ball contained entirely in the set.
How does topology define continuity?
A map \(f:X\to Y\) is continuous when the inverse image \(f^{-1}(U)\) of every open set \(U\subseteq Y\) is open in \(X\).
What is a homeomorphism?
A homeomorphism is a bijective continuous function whose inverse is also continuous. Two spaces are homeomorphic when such a function exists between them.
What is a topological invariant?
A topological invariant is a property or quantity preserved by homeomorphism. Examples include connectedness, compactness, orientability, Euler characteristic, and the fundamental group.
What is the difference between connected and path-connected?
A connected space cannot be separated into two disjoint nonempty open pieces. A path-connected space allows every pair of points to be joined by a continuous path. Every path-connected space is connected, but not every connected space is path-connected.
What is the topologist’s sine curve?
The standard topologist’s sine curve is the graph of \(y=\sin(1/x)\) for \(0\lt x\le1\) together with the vertical limit segment \(\{0\}\times[-1,1]\). The resulting space is connected but not path-connected.
What is compactness?
A topological space is compact if every open cover has a finite subcover. In \(\mathbb R^n\), the Heine-Borel theorem says compact sets are exactly the closed and bounded sets.
Does closed and bounded always mean compact?
No. Closed and bounded characterizes compact subsets of finite-dimensional Euclidean spaces such as \(\mathbb R^n\). It is not a valid characterization in arbitrary topological or infinite-dimensional spaces.
Why is compactness important in calculus?
Compactness underlies global results such as the Extreme Value Theorem: a continuous real-valued function on a nonempty compact set attains both a maximum and a minimum.
What is Euler characteristic?
Euler characteristic is a topological invariant often computed from a finite cell decomposition as \(\chi=V-E+F\). For a connected closed orientable surface of genus \(g\), \(\chi=2-2g\).
What is genus in topology?
For connected closed orientable surfaces, genus is the number of handles. A sphere has genus zero, a torus genus one, and a double torus genus two.
Why is the Möbius strip non-orientable?
If a local normal direction is transported continuously once around a Möbius strip, it returns reversed. Therefore no continuous global orientation exists over the entire surface.
What is a Klein bottle?
A Klein bottle is a connected closed non-orientable surface. It has Euler characteristic zero, the same as a torus, but the two surfaces are not homeomorphic because the torus is orientable and the Klein bottle is not.
What does the classification theorem for closed surfaces say?
Every connected closed surface is homeomorphic to a sphere, a connected sum of tori, or a connected sum of projective planes. Equivalently, connected closed surfaces are classified by orientability together with genus or crosscap number.
What is the fundamental group?
The fundamental group \(\pi_1(X,x_0)\) is the group of homotopy classes of loops based at \(x_0\), with multiplication given by loop concatenation.
What is the fundamental group of a circle?
The fundamental group of the circle is isomorphic to the integers: \(\pi_1(S^1)\cong\mathbb Z\). The integer records the winding number of a loop around the circle.
What is topology used for?
Topology is foundational in Real Analysis, geometry, manifold theory, algebraic topology, dynamical systems, mathematical physics, knot theory, persistent homology, and topological data analysis.