MATH-447 · Lesson 9 of 12 · 27 min
Homotopy and the fundamental group
The invariants of the first half of the course, connectedness and compactness, cannot tell a disc from an annulus or a sphere from a torus: all four are compact and connected. What distinguishes them is the presence of holes, detected by loops that cannot be shrunk to a point. This lesson turns that idea into algebra. Two loops are considered the same if one can be continuously deformed into the other, and the deformation classes of loops at a point form a group, the fundamental group, introduced by Henri Poincaré in Analysis Situs in 1895. Homeomorphic spaces have isomorphic fundamental groups, so the group is a topological invariant, and it is computable.
Homotopy
Definition. Two continuous maps \(f, g : X \to Y\) are homotopic, written \(f \simeq g\), if there is a continuous map \(H : X \times [0, 1] \to Y\) with \(H(x, 0) = f(x)\) and \(H(x, 1) = g(x)\) for all \(x\). The map \(H\) is a homotopy from \(f\) to \(g\). Think of the second variable as time: \(H_t = H(\cdot, t)\) is a continuous family of maps starting at \(f\) and ending at \(g\).
Example: the straight-line homotopy. If \(Y\) is a convex subset of \(\mathbb{R}^n\), any two maps \(f, g : X \to Y\) are homotopic by \(H(x, t) = (1 - t)f(x) + tg(x)\), which stays in \(Y\) by convexity and is continuous as an algebraic combination of continuous functions. So in a convex set, all maps from a given space are homotopic. In the punctured plane \(\mathbb{R}^2 \setminus \{0\}\), by contrast, the straight-line homotopy between the identity of the circle and the constant map at \((1, 0)\) passes through the origin, and lesson 10 proves that no homotopy between them avoids it.
Homotopy is an equivalence relation on the set of maps \(X \to Y\). It is reflexive by the constant homotopy \(H(x, t) = f(x)\), symmetric by running a homotopy backwards, \(H(x, 1 - t)\), and transitive by running two homotopies one after the other at double speed: if \(F\) goes from \(f\) to \(g\) and \(G\) from \(g\) to \(h\), define \(K(x, t) = F(x, 2t)\) for \(t \le 1/2\) and \(G(x, 2t - 1)\) for \(t \ge 1/2\). The two formulas agree at \(t = 1/2\), where both give \(g(x)\), so the pasting lemma makes \(K\) continuous.
Path homotopy
For paths a finer notion is needed, since any path in a path-connected space can be shrunk to its starting point by \(H(s, t) = \gamma((1 - t)s)\), which is useless for detecting holes. The fix is to keep the endpoints fixed. Two paths \(\gamma, \delta : [0, 1] \to X\) from \(x\) to \(y\) are path homotopic, written \(\gamma \simeq_p \delta\), if there is a homotopy \(H\) from \(\gamma\) to \(\delta\) with \(H(0, t) = x\) and \(H(1, t) = y\) for all \(t\). The same arguments as above show that path homotopy is an equivalence relation; the class of \(\gamma\) is written \([\gamma]\).
If \(\gamma\) is a path from \(x\) to \(y\) and \(\delta\) a path from \(y\) to \(z\), the product \(\gamma \cdot \delta\) is the path that traverses \(\gamma\) and then \(\delta\), each at double speed: \((\gamma \cdot \delta)(s) = \gamma(2s)\) for \(s \le 1/2\) and \(\delta(2s - 1)\) for \(s \ge 1/2\). It is continuous by the pasting lemma. The reverse path is \(\bar\gamma(s) = \gamma(1 - s)\), and the constant path at \(x\) is \(e_x\).
Theorem. The product is well defined on path homotopy classes, and on classes it is associative, has identities and has inverses: whenever the products are defined, (a) \([\gamma] \cdot ([\delta] \cdot [\varepsilon]) = ([\gamma] \cdot [\delta]) \cdot [\varepsilon]\); (b) \([e_x] \cdot [\gamma] = [\gamma] = [\gamma] \cdot [e_y]\) for \(\gamma\) from \(x\) to \(y\); (c) \([\gamma] \cdot [\bar\gamma] = [e_x]\) and \([\bar\gamma] \cdot [\gamma] = [e_y]\).
Proof. Well defined: if \(F\) is a path homotopy from \(\gamma\) to \(\gamma'\) and \(G\) from \(\delta\) to \(\delta'\), then \(F(2s, t)\) for \(s \le 1/2\) and \(G(2s - 1, t)\) for \(s \ge 1/2\) defines a path homotopy from \(\gamma \cdot \delta\) to \(\gamma' \cdot \delta'\). For (a) and (b), use reparametrization: if \(\varphi : [0, 1] \to [0, 1]\) is continuous with \(\varphi(0) = 0\) and \(\varphi(1) = 1\), then \(\gamma \circ \varphi \simeq_p \gamma\) by \(H(s, t) = \gamma((1 - t)\varphi(s) + ts)\), which is defined because \([0, 1]\) is convex and keeps the endpoints fixed. Now \((\gamma \cdot \delta) \cdot \varepsilon\) and \(\gamma \cdot (\delta \cdot \varepsilon)\) traverse the same three paths, spending the time intervals \([0, 1/4], [1/4, 1/2], [1/2, 1]\) and \([0, 1/2], [1/2, 3/4], [3/4, 1]\) respectively; one is the other composed with the piecewise linear \(\varphi\) sending \(0, 1/2, 3/4, 1\) to \(0, 1/4, 1/2, 1\). Similarly \(e_x \cdot \gamma = \gamma \circ \varphi\) where \(\varphi\) is 0 on \([0, 1/2]\) and rises linearly from 0 to 1 on \([1/2, 1]\). For (c), the homotopy \(H(s, t) = \gamma(2s(1 - t))\) for \(s \le 1/2\) and \(\gamma((2 - 2s)(1 - t))\) for \(s \ge 1/2\) goes out along \(\gamma\) only as far as time \(1 - t\) and comes back; at \(t = 0\) it is \(\gamma \cdot \bar\gamma\), at \(t = 1\) it is constant at \(x\), and the endpoints stay at \(x\) throughout. The second identity in (c) is the first applied to \(\bar\gamma\).
The fundamental group
A loop at \(x_0\) is a path from \(x_0\) to \(x_0\). By the theorem, the path homotopy classes of loops at \(x_0\) form a group under the product, with identity \([e_{x_0}]\) and inverse \([\gamma]^{-1} = [\bar\gamma]\). This group is the fundamental group \(\pi_1(X, x_0)\).
If \(X\) is a convex subset of \(\mathbb{R}^n\), every loop at \(x_0\) is path homotopic to the constant loop by the straight-line homotopy, which keeps the endpoints fixed since both loops are at \(x_0\) there. So \(\pi_1(X, x_0)\) is the trivial group. A path-connected space with trivial fundamental group is called simply connected. Balls, cubes, Euclidean spaces and star-shaped regions are simply connected. The circle, the annulus and the torus are not, as lessons 10 and 11 prove.
Theorem (change of basepoint). If \(h\) is a path from \(x_0\) to \(x_1\), the map \(\beta_h([\gamma]) = [\bar h] \cdot [\gamma] \cdot [h]\) is a group isomorphism from \(\pi_1(X, x_0)\) to \(\pi_1(X, x_1)\).
Proof. \(\bar h \cdot \gamma \cdot h\) goes from \(x_1\) back along \(h\) to \(x_0\), around \(\gamma\), and out along \(h\) to \(x_1\), so it is a loop at \(x_1\), and by associativity the expression is unambiguous on classes. It is a homomorphism: \(\beta_h([\gamma])\beta_h([\delta]) = [\bar h][\gamma][h][\bar h][\delta][h] = [\bar h][\gamma][\delta][h] = \beta_h([\gamma][\delta])\), using \([h][\bar h] = [e_{x_0}]\). Its inverse is \(\beta_{\bar h}\), by the same cancellation.
So in a path-connected space the fundamental group does not depend on the basepoint, up to isomorphism, and one often writes \(\pi_1(X)\). The isomorphism does depend on the path \(h\) in general; different paths give isomorphisms differing by conjugation, so for abelian fundamental groups they all agree.
Induced homomorphisms
A continuous map \(f : X \to Y\) with \(f(x_0) = y_0\) induces \(f_* : \pi_1(X, x_0) \to \pi_1(Y, y_0)\), \(f_*([\gamma]) = [f \circ \gamma]\). It is well defined, since composing a path homotopy with \(f\) gives a path homotopy, and a homomorphism, since \(f \circ (\gamma \cdot \delta) = (f \circ \gamma) \cdot (f \circ \delta)\).
Theorem (functoriality). \((g \circ f)_* = g_* \circ f_*\) and \((\mathrm{id}_X)_* = \mathrm{id}\). Consequently, if \(f\) is a homeomorphism, \(f_*\) is an isomorphism.
Proof. The first two identities follow from \((g \circ f) \circ \gamma = g \circ (f \circ \gamma)\) and \(\mathrm{id} \circ \gamma = \gamma\). If \(f\) has an inverse \(g\), then \(g_* f_* = (g \circ f)_* = \mathrm{id}\) and \(f_* g_* = \mathrm{id}\), so \(f_*\) is an isomorphism with inverse \(g_*\).
This is the decisive property: the fundamental group is a topological invariant. If two path-connected spaces have non-isomorphic fundamental groups, they are not homeomorphic. Lesson 10 computes \(\pi_1(S^1) \cong \mathbb{Z}\), and the disc is simply connected, so the circle is not homeomorphic to the disc. More usefully, invariance under homeomorphism can be strengthened to invariance under a much weaker relation.
Homotopy equivalence and deformation retracts
Maps \(f : X \to Y\) and \(g : Y \to X\) are homotopy inverses if \(g \circ f \simeq \mathrm{id}_X\) and \(f \circ g \simeq \mathrm{id}_Y\); then \(f\) is a homotopy equivalence and \(X\) and \(Y\) have the same homotopy type. A space is contractible if it has the homotopy type of a point, equivalently if its identity map is homotopic to a constant map. A subspace \(A \subseteq X\) is a deformation retract if there is a homotopy \(H : X \times [0, 1] \to X\) from the identity to a map into \(A\), with \(H(a, t) = a\) for all \(a \in A\) and all \(t\). Then the inclusion \(A \hookrightarrow X\) is a homotopy equivalence.
Theorem. A homotopy equivalence \(f : X \to Y\) induces an isomorphism \(f_* : \pi_1(X, x_0) \to \pi_1(Y, f(x_0))\).
Proof sketch. The key lemma says that if \(H\) is a homotopy from \(k_0\) to \(k_1\), and \(\alpha(t) = H(x_0, t)\) is the track of the basepoint, then \((k_1)_* = \beta_\alpha \circ (k_0)_*\): the image of a loop under \(k_0\), followed by the track, is homotopic to the track followed by the image under \(k_1\), as one sees by restricting \(H\) to the square \([0, 1] \times [0, 1]\) traced by the loop and reading off its boundary. Applying the lemma to \(g \circ f \simeq \mathrm{id}\) shows that \(g_* f_*\) is the change-of-basepoint isomorphism, so \(f_*\) is injective; applying it to \(f \circ g \simeq \mathrm{id}\) shows that \(f_* g_*\) is an isomorphism, so \(f_*\) is surjective.
Examples. The circle is a deformation retract of the punctured plane, by \(H(v, t) = (1 - t)v + tv/\|v\|\), which never passes through 0 because both endpoints of each segment point in the same direction. So \(\pi_1(\mathbb{R}^2 \setminus \{0\}) \cong \pi_1(S^1)\). The circle is likewise a deformation retract of the annulus, the solid torus, the Möbius strip, where it is the central circle, and the infinite cylinder. Every convex set is contractible, and so is every star-shaped set. Contractible spaces are simply connected, but they need not look simple: the comb space and the dunce cap are contractible, and spaces with very complicated local behaviour can be contractible.
Products and higher spheres
Theorem. \(\pi_1(X \times Y, (x_0, y_0)) \cong \pi_1(X, x_0) \times \pi_1(Y, y_0)\).
Proof. A loop in the product is a pair of loops \((\gamma_1, \gamma_2)\), by the universal property of products, and a path homotopy in the product is a pair of path homotopies. So the map \([\gamma] \mapsto ([\pi_1 \circ \gamma], [\pi_2 \circ \gamma])\) is a bijection, and it is the homomorphism \(((\pi_1)_*, (\pi_2)_*)\).
Thus the torus \(S^1 \times S^1\) has fundamental group \(\mathbb{Z} \times \mathbb{Z}\), once \(\pi_1(S^1) \cong \mathbb{Z}\) is known. The two generators are the loops around the two circles, and the fact that they commute is visible in the square picture of lesson 4: going along \(a\) then \(b\) is homotopic to going along \(b\) then \(a\), by sliding across the square.
Theorem. For \(n \ge 2\) the sphere \(S^n\) is simply connected.
Proof. \(S^n\) is path-connected. Let \(\gamma\) be a loop at \(x_0\). If \(\gamma\) misses some point \(p\), then it lies in \(S^n \setminus \{p\}\), which is homeomorphic to \(\mathbb{R}^n\) by stereographic projection and hence simply connected, so \(\gamma\) is null-homotopic. The catch is that a loop can be space-filling and miss no point at all. To handle this, choose \(p \ne x_0\) and an open ball \(B\) around \(p\), small enough not to contain \(x_0\) and to lie in a hemisphere, so that \(B\) is homeomorphic to a convex open ball in \(\mathbb{R}^n\). The open sets \(\gamma^{-1}(B)\) and \(\gamma^{-1}(S^n \setminus \{p\})\) cover \([0, 1]\), so by the Lebesgue number lemma there is a subdivision \(0 = s_0 < s_1 < \cdots < s_k = 1\) such that each piece \([s_{i-1}, s_i]\) is mapped into \(B\) or into \(S^n \setminus \{p\}\). Merging adjacent pieces of the same kind, we may assume the kinds alternate. Every piece mapped into \(B\) has endpoints in \(S^n \setminus \{p\}\), because they are shared with neighbouring pieces of the other kind, or equal \(x_0 \notin B\). Since \(n \ge 2\), the set \(B \setminus \{p\}\) is path-connected, so there is a path \(\sigma_i\) in \(B \setminus \{p\}\) joining the two endpoints, and since \(B\) is homeomorphic to a convex set, \(\sigma_i\) is path homotopic in \(B\) to the piece of \(\gamma\) it replaces. Making all the replacements gives a loop path homotopic to \(\gamma\) that misses \(p\), and that loop is null-homotopic.
The argument fails for \(n = 1\) precisely because \(B \setminus \{p\}\) is disconnected when \(B\) is an arc. That is the first sign that the circle is different, and lesson 10 confirms it.
Loops by computer
The program represents loops in the punctured plane as closed polygons and computes their winding number around the origin, the number of times the angle increases by a full turn. Lesson 10 proves that this number classifies loops up to homotopy. Here it is checked that the winding number of a product of loops is the sum, that reversing a loop negates it, and that a small deformation does not change it.
import math, random
def winding(loop):
"""loop: list of points, closed (last joins first), avoiding the origin."""
total = 0.0
for (x1, y1), (x2, y2) in zip(loop, loop[1:] + loop[:1]):
a = math.atan2(x1 * y2 - y1 * x2, x1 * x2 + y1 * y2) # signed angle between the two position vectors
total += a
return round(total / (2 * math.pi), 9)
def circle(k, r=1.0, n=200):
return [(r * math.cos(2 * math.pi * k * j / n), r * math.sin(2 * math.pi * k * j / n)) for j in range(n)]
def product(a, b): # both based at (1, 0): traverse a, then b
return a + b
def reverse(a):
return [a[0]] + a[:0:-1]
a, b = circle(1), circle(2)
c = circle(-1)
print("winding of a, b, c:", winding(a), winding(b), winding(c))
print("winding of a.b:", winding(product(a, b)), " of a.b.c:", winding(product(product(a, b), c)))
print("winding of reversed b:", winding(reverse(b)))
random.seed(447)
wobbly = [(x + random.uniform(-0.3, 0.3), y + random.uniform(-0.3, 0.3)) for x, y in circle(3)]
print("winding of a randomly perturbed triple loop:", winding(wobbly))
off = [(x + 3, y) for x, y in circle(1)]
print("winding of a loop that does not surround the origin:", winding(off) + 0)
# straight-line homotopy from the circle to a constant passes through the origin:
hit = min(math.hypot((1 - t) * x + t * 1.0, (1 - t) * y) for x, y in circle(1, n=400) for t in [k / 400 for k in range(401)])
print("closest approach to the origin during the straight-line homotopy:", round(hit, 6))winding of a, b, c: 1.0 2.0 -1.0 winding of a.b: 3.0 of a.b.c: 2.0 winding of reversed b: -2.0 winding of a randomly perturbed triple loop: 3.0 winding of a loop that does not surround the origin: 0.0 closest approach to the origin during the straight-line homotopy: 0.0
The winding numbers behave like the integers under addition: the product of loops winding 1 and 2 times winds 3 times, and reversing a loop changes the sign. A perturbation by up to 0.3 in each coordinate leaves the winding number of the triple loop unchanged, because it never pushes the loop across the origin. The straight-line homotopy from the unit circle to the constant loop at \((1, 0)\) comes within distance 0 of the origin, at the point of the circle opposite \((1, 0)\) halfway through the deformation, so it is not a homotopy in the punctured plane. Lesson 10 shows that no homotopy is.
Worked problem
Computing a fundamental group by deformation retraction
Compute the fundamental group of the solid torus \(T = S^1 \times D^2\) in terms of \(\pi_1(S^1)\).
Show solution
- The disc \(D^2\) is convex, so it deformation retracts to its centre 0 by \(H(v, t) = (1 - t)v\).
- Define \(K : T \times [0, 1] \to T\) by \(K((z, v), t) = (z, (1 - t)v)\). It is continuous and fixes the core circle \(S^1 \times \{0\}\) at all times.
- At \(t = 1\) it maps \(T\) onto the core circle, so the core circle is a deformation retract of \(T\).
- Therefore the inclusion of the core circle is a homotopy equivalence and induces an isomorphism on fundamental groups.
- Alternatively, \(\pi_1(S^1 \times D^2) \cong \pi_1(S^1) \times \pi_1(D^2) = \pi_1(S^1) \times 1\).
Answer: \(\pi_1(S^1 \times D^2) \cong \pi_1(S^1)\), which is \(\mathbb{Z}\) by lesson 10.
Common mistakes
MistakeAllowing endpoints to move in a homotopy of loops.
InsteadWithout fixing endpoints every path can be shrunk to a point, and the group would always be trivial.
MistakeTreating the product of paths as associative on the nose.
InsteadThe parametrizations differ; associativity holds only up to path homotopy, by reparametrization.
MistakeAssuming a loop that fills the sphere cannot be contracted.
InsteadSubdivide using a Lebesgue number and push pieces off a point; spheres of dimension at least 2 are simply connected.
MistakeForgetting the basepoint when comparing fundamental groups.
InsteadFor path-connected spaces the groups are isomorphic, but the isomorphism depends on a chosen path.
MistakeThinking contractible spaces must be convex.
InsteadContractibility is a homotopy notion; many non-convex spaces, such as star-shaped regions and trees, are contractible.
Summary and key terms
- A homotopy is a continuous family of maps; path homotopies keep endpoints fixed.
- Path homotopy classes compose associatively, with identities and inverses, up to reparametrization.
- The fundamental group is the group of path homotopy classes of loops at a basepoint; in a path-connected space it does not depend on the basepoint up to isomorphism.
- Continuous maps induce homomorphisms functorially, so homeomorphic spaces have isomorphic fundamental groups.
- Homotopy equivalences, such as deformation retractions, also induce isomorphisms; convex sets are simply connected.
- The fundamental group of a product is the product of the groups, and spheres of dimension at least 2 are simply connected.
- homotopy
- A continuous map from the product of a space with the unit interval, deforming one map into another.
- path homotopy
- A homotopy between paths that keeps both endpoints fixed.
- fundamental group
- The group of path homotopy classes of loops at a basepoint.
- simply connected
- Path-connected with trivial fundamental group.
- induced homomorphism
- The homomorphism of fundamental groups obtained by composing loops with a continuous map.
- homotopy equivalence
- A map with a homotopy inverse.
- deformation retract
- A subspace onto which the whole space can be deformed while the subspace stays fixed.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Show that any two maps from a space \(X\) to \(\mathbb{R}^n\) are homotopic.
Show answer
Use the straight-line homotopy \((1 - t)f(x) + tg(x)\).
Prove that \(\mathbb{R}^n\) minus a point deformation retracts onto a sphere.
Show answer
For the point 0 use \(H(v, t) = (1 - t)v + tv/\|v\|\), which stays away from 0 and fixes the unit sphere.
Is the plane minus two points simply connected?
Show answer
No: it deformation retracts onto a figure eight, whose fundamental group is computed in lesson 11 to be free on two generators; already a loop around one point is not null-homotopic, since it is not null-homotopic in the plane minus that single point.
Show that if \(A\) is a retract of \(X\), via \(r : X \to A\) with \(r(a) = a\), then \(i_*\) is injective.
Show answer
\(r \circ i = \mathrm{id}_A\) gives \(r_* i_* = \mathrm{id}\), so \(i_*\) is injective.
Compute \(\pi_1(S^2 \times S^1)\).
Show answer
\(\pi_1(S^2) \times \pi_1(S^1) = 1 \times \mathbb{Z} \cong \mathbb{Z}\).
Why is a star-shaped region of the plane simply connected?
Show answer
If it is star-shaped about \(c\), the homotopy \(H(x, t) = (1 - t)x + tc\) stays inside and contracts it to \(c\), so it is contractible, hence simply connected.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.