Module 1: basic topological structures and invariants¶

Metric spaces¶

A metric space is a pair $(X,d)$ consisting of a set $X$ and a function $d\colon X\rightarrow\mathbb{R}_{\geq 0}$, called the metric, that satisfies the following three properties:

  • $d(x,x)=0$ for every $x\in X$,
  • $d(x,y)>0$ for every $x\neq y$ (positivity),
  • $d(x,y)=d(y,x)$ for any $x,y\in X$ (symmetry),
  • $d(x,z)\leq d(x,y)+d(y,z)$ for any $x,y,z\in X$ (triangle inequality).

An open (resp. closed) ball of radius $r>0$ with center $x_0$ in a metric space $(X,d)$ is the set $B(x_0,r)=\{x\in X \mid d(x_0,x)<r\}$ (resp. $\bar{B}(x_0,r)=\{x\in X \mid d(x_0,x)\leq r\}$).

Example (the real line $\mathbb{R}$)¶

The real numbers $\mathbb{R}$ with the absolute value metric $d=|\cdot|$ constitute a metric space:

  • $d(x,x)=|x-x|=0$,
  • $d(x,y)=|x-y|>0$ for $x\neq y$,
  • $d(x,y)=|x-y|=|y-x|=d(y,x)$,
  • $d(x,z)=|x-z|=|(x-y)+(y-z)|\leq|x-y|+|y-z|=d(x,y)+d(y,z)$.

The balls are open and closed intervals:

Example (the plane $\mathbb{R}^2$)¶

The plane $\mathbb{R}^2$ equipped with the Euclidean metric $d((x_1,x_2),(y_1,y_2))=\sqrt{(x_1-y_1)^2+(x_2-y_2)^2}$ forms a metric space:

  • $d((x_1,x_2),(x_1,x_2))=\sqrt{(x_1-x_1)^2+(x_2-x_2)^2}=0$,
  • $d((x_1,x_2),(y_1,y_2))=\sqrt{(x_1-y_1)^2+(x_2-y_2)^2}=\sqrt{(y_1-x_1)^2+(y_2-x_2)^2}=d((y_1,y_2),(x_1,x_2))$,
  • the triangle inequality in this case can be visualized in the picture below — it corresponds directly to the familiar geometric triangle inequality.

The balls are open and closed disks:

Example ($\mathbb{R^n}$)¶

$\mathbb{R}^n$ is also equipped with the Euclidean metric $d((x_1,\ldots,x_n),(y_1,\ldots,y_n))=\sqrt{(x_1-y_1)^2+\ldots+(x_n-y_n)^2}$:

  • $d((x_1,\ldots,x_n),(x_1,\ldots,x_n))=\sqrt{(x_1-x_1)^2+\ldots+(x_n-x_n)^2}=0$,
  • $d((x_1,\ldots,x_n),(y_1,\ldots,y_n))=\sqrt{(x_1-y_1)^2+\ldots+(x_n-y_n)^2}=\sqrt{(y_1-x_1)^2+\ldots+(y_n-x_n)^2}=d((y_1,\ldots,y_n),(x_1,\ldots,x_n)).$

To prove the triangle inequality, we recall the Cauchy–Schwarz inequality: $(u_1v_1+\ldots+u_nv_n)\leq\sqrt{u_1^2+\ldots+u_n^2}\cdot\sqrt{v_1^2+\ldots+v_n^2}$. Then the proof proceeds as follows:

  • $d((x_1,\ldots,x_n),(z_1,\ldots,z_n))^2=(x_1-y_1+y_1-z_1)^2+\ldots+(x_n-y_n+y_n-z_n)^2=\sum_{i=1}^n(x_i-y_i)^2+\sum_{i=1}^n(y_i-z_i)^2+2\sum_{i=1}^n(x_i-y_i)(y_i-z_i)$

    $\leq \sum_{i=1}^n(x_i-y_i)^2+\sum_{i=1}^n(y_i-z_i)^2+2\sqrt{\sum_{i=1}^n(x_i-y_i)^2}\cdot\sqrt{\sum_{i=1}^n(y_i-z_i)^2}=\left(\sqrt{\sum_{i=1}^n(x_i-y_i)^2}+\sqrt{\sum_{i=1}^n(y_i-z_i)^2}\right)^2=\left(d((x_1,\ldots,x_n),(y_1,\ldots,y_n))+d((y_1,\ldots,y_n),(z_1,\ldots,z_n))\right)^2$.

Example (Manhattan metric)¶

$(\mathbb{R}^2,d)$, $d((x_1,x_2),(y_1,y_2))=|x_1-y_1|+|x_2-y_2|$.

The balls look as follows:

Example (discrete metric)¶

$(X,d)$,

$$ d(x,y)=\begin{cases} 0\quad x=y\\ 1\quad x\neq y \end{cases} $$

The balls simplify significantly in this metric: there are two types of open balls — those consisting of single points (for radius $\leq 1$) and the one consisting of the entire space $X$ (for any radius greater than $1$).

Example (a metric on the Cartesian product)¶

Suppose $(X,d_X)$ and $(Y,d_Y)$ are metric spaces. Then, the Cartesian product $X\times Y$ can be equipped, for example, with the following metric: $$ d((x_1,y_1),(x_2,y_2))=d_X(x_1,x_2)+d_Y(y_1,y_2). $$ Note that if $X=Y=\mathbb{R}$ and $d_X=d_Y$ is the absolute value metric, then this Cartesian product metric coincides with the Manhattan metric.

Open subsets in metric spaces¶

A subset $A\subseteq X$ of a metric space $(X,d)$ is open if, for every $x\in A$, there exists $\varepsilon>0$ such that $B(x,\varepsilon)\subseteq A$.

Example¶

The empty set $\emptyset$ and the entire metric space $X$ are examples of open subsets of a metric space $(X,d)$.

Example¶

Unions and finite intersections of open subsets are also open subsets.

Topological spaces¶

A topological space is a pair $(X,\tau)$, where $\tau$ is a collection of subsets of $X$, called the topology of $X$, satisfying the following conditions:

  • $\emptyset,X\in\tau$,
  • any union (finite or infinite) of subsets from $\tau$ belongs to $\tau$,
  • finite intersections of subsets from $\tau$ belong to $\tau$.

The subsets in $\tau$ are called open subsets of $X$.

Note that every metric space naturally induces a topological space — see the last two examples.

Example (trivial and discrete topologies)¶

Trivial topology: $\tau=\{\emptyset,X\}$

Discrete topology: $\tau=\{A \mid A\subseteq X\}$. Note that the discrete metric on $X$ induces precisely the discrete topology.

Example (manifolds)¶

Before we give the definition of a manifold, let us recall the necessary concepts:

  • a function $f\colon(X,\tau_X)\rightarrow(Y,\tau_Y)$ is continuous if, for every open subset $V\subseteq Y$ (i.e., $V\in\tau_Y$), its preimage $f^{-1}(V)$ is open in $X$ (i.e., $f^{-1}(V)\in \tau_X$),
  • a homeomorphism is a continuous bijection $f\colon X\rightarrow Y$ whose inverse is also continuous,
  • a topological space $X$ is Hausdorff if any two distinct points have disjoint open sets containing them.

A topological manifold of dimension $n$ is a Hausdorff topological space $M$ together with a collection of homeomorphisms $f_U\colon U\rightarrow \mathbb{R}^n$, where the $U$'s are open subsets of $M$ that cover $M$. The collection $\{U,f_U\}$ is called the atlas of $M$.

Example ($\mathbb{R}^n$)¶

This is probably the simplest example of a manifold — the atlas can be chosen to consist of a single chart (i.e., an open subset together with the corresponding homeomorphism), which is the entire space with the identity homeomorphism.

Example (spheres)¶

Example (torus)¶

Example (subspace topology)¶

Given a subset $A$ of a topological space $(X,\tau_X)$, we define the subspace topology $\tau_A$ on $A$ as follows: $\tau_A=\{A\cap U \mid U\in\tau_X\}$.

Example (quotient topology)¶

Given an equivalence relation $\sim$ on a topological space $X$, the quotient topological space of $X$ with respect to $\sim$ is $([X]_{\sim},\tau_{[X]_{\sim}})$. We define the quotient topology $\tau_{[X]_{\sim}}$ on it by letting the open sets (i.e., those belonging to $\tau_{[X]_{\sim}}$) be precisely the subsets $U$ of $[X]$ such that the set of $x\in X$ with $[x]\in U$ is open in $X$ (i.e., belongs to $\tau_X$).

Alternative definition of a topological space (via closed subsets)¶

A topological space is a pair $(X,\tau)$, where $\tau$ is a collection of subsets of $X$, called the topology of $X$, satisfying the following conditions:

  • $\emptyset,X\in\tau$,
  • any intersection (finite or infinite) of subsets from $\tau$ belongs to $\tau$
  • finite unions of subsets from $\tau$ belong to $\tau$.

We call the subsets from $\tau$ closed subsets of $X$.

The two definitions of a topological space presented in these notes are equivalent, and the closed subsets are precisely the complements of the open subsets.

Simplicial complexes¶

Definition of a simplex¶

A set $X\subseteq\mathbb{R}^d$ is called convex if, for any two points $x, y\in X$, the line segment $[x, y] =\{tx+(1-t)y : t\in[0, 1]\}$ is contained in $X$. The convex hull of a set $X\subseteq\mathbb{R}^d$ is the smallest convex set $\text{conv}(X)$ containing $X$.

The convex hull of a set of $n+1$ points $\{a_0, a_1, \ldots , a_n\}\subset \mathbb{R}^d$, such that the vectors $a_1-a_0, \ldots , a_n - a_0$ are linearly independent, is called a (geometric) $n$-dimensional simplex in $\mathbb{R}^d$. We denote it by $\Delta [a_0, \ldots, a_n]$ or $[a_0,\ldots, a_n]$. The points $a_0, \ldots, a_n$ are called the vertices of the simplex.

The $n$-simplex $\Delta^n$ is homeomorphic to the $n$-dimensional disc $D^n=\{x\in\mathbb{R}^n\colon ||x|| \leq 1\}$:

Definition of a simplicial complex¶

A simplicial complex is a set $K$ of simplices in $\mathbb{R}^d$ satisfying the following conditions:

  • if a simplex belongs to $K$, then each of its faces (that is, simplices formed by proper subsets of the vertices of the considered simplex) also belongs to $K$,
  • the intersection of any two simplices $\sigma$ and $\tau$ from $K$ is either a face of both $\sigma$ and $\tau$,
  • (local finiteness condition) each vertex of a simplex from $K$ is contained in finitely many simplices from $K$.

Let $|K|\subseteq \mathbb{R}^d$ be the union of the simplices of $K$: $$ |K|=\bigcup_{\sigma\in K}\sigma. $$

We define the topology of $|K|$ by declaring a subset $A\subseteq |K|$ to be closed if and only if $A\cap\sigma$ is closed in $\sigma$ for each $\sigma\in K$, where each simplex has its natural topology as a subset of $\mathbb{R}^d$. The space $|K|$ with this topology is called the underlying space of $K$ or the polytope of $K$.

The dimension of a simplicial complex is the maximal dimension of a simplex in the complex.

Clarification of the face concept¶

The boundary of an $n$-simplex $\Delta^n$ is defined as the union of all its faces of dimension smaller than $n$. It turns out that $\partial\Delta^n$ is homeomorphic to the $(n-1)$-sphere $S^{n-1}=\{x\in\mathbb{R}^n \mid ||x||=1\}$:

Example (graph)¶

Example ("generic" higher-dimensional simplicial complex)¶

Example (not a simplicial complex)¶

Skeleta¶

The $n$-skeleton $K^{(n)}$ of a simplicial complex $K$ is defined by $$ K^{(n)} =\{ \sigma\in K\colon \dim\sigma \leq n \}. $$

Triangulations¶

A triangulation of a topological space $X$ is a homeomorphism $|K|\xrightarrow{\cong}X$ with $K$ being a simplicial complex. We call $X$ in this case a triangulable space.

Example (a triangulation of $\mathbb{R}^2$)¶

Example (a triangulation of a cube)¶

Example (triangulations of spheres)¶

Triangulability of manifolds¶

Smooth manifolds¶

Any smooth manifold is triangulable. However, there exist topological manifolds that do not admit a triangulation. The classical result states that up to dimension 3, all topological manifolds are polytopes, due to T. Radó (for surfaces – 2-manifolds) and E. Moise (3-manifolds).

CW-complexes¶

A CW-complex $X$ has an inductive definition as follows (we refer the reader to, e.g., Hatcher, p. 5):

  • One starts with a discrete topological space $X^0$ and declares each point of this space to be a $0$-cell of $X$.
  • For $n\geq 1$, there are given maps $f_{n,\alpha}\colon D^n\rightarrow X^{n-1}$, called the attaching maps, defining $X^n$ to be the quotient space of the disjoint union of $n$-disks $D^n$ for each index $\alpha$ and $X^{n-1}$ by the equivalence relation given by the identifications $x\sim f_{n,\alpha}(x)$.
  • $X=\cup_{n\geq 0} X^n$, and one declares $A\subseteq X$ to be open if and only if $A\cap X^n$ is open in $X^n$ for every $n\geq 0$.

In the case there are no attaching maps for each $m>n$, one has $X=X^n$. One calls the subspaces $X^k$ the $k$-skeleta of $X$. Obviously, $X^0\subseteq X^1\subseteq X^2\subseteq \cdots \subseteq X$. In this case, one calls the maximal $n$ for which there exists an $n$-cell the dimension of $X$.

A CW-complex is called finite if it consists of finitely many cells.

CW-complexes are generalizations of simplicial complexes. Conversely, in a certain sense, every CW-complex $X$ can be thought of as a simplicial complex (if $X$ is finite, then the simplicial complex can be chosen to have the same dimension as $X$). This is indeed the case when considering topological spaces up to homotopy equivalence. This conclusion follows from the Simplicial Approximation Theorem — we refer the reader to HATCHER for details. It is convenient to be aware of both simplicial and CW-structures of a topological space, as either of them allows one to tackle specific aspects — often non-overlapping for the CW and simplicial cases — more efficiently.

Basic invariants¶

Homotopy equivalence relation¶

A homotopy between maps $f\colon X\rightarrow Y$ and $g\colon X\rightarrow Y$ is a continuous map $H\colon X\times I\rightarrow Y$, $(x,t)\mapsto h_t(x)$, such that $h_0=f$ and $h_1=g$. In this case, we call $f$ and $g$ homotopic maps and denote this by $f\simeq g$.

Two topological spaces $X$ and $Y$ are called homotopy equivalent if there exist maps $f\colon X\rightarrow Y$ and $g\colon Y\rightarrow X$ such that $f\circ g\simeq \text{id}_X$ and $g\circ f\simeq \text{id}_Y$. The relation of being homotopy equivalent is an equivalence relation for topological spaces. One often considers topological spaces not up to homeomorphism but rather up to homotopy. One has to bear in mind that some information is lost, such as the dimension of the space. On the other hand, many tools from algebra, which we shall learn later, are actually sensitive only to the homotopy type of topological spaces.

Examples¶

Fundamental group¶

Now that we have learned about homotopy, we are ready to introduce one of the basic algebraic invariants of topological spaces, the fundamental group. Denoted by $\pi_1(X)$ and defined for a (path)-connected topological space $X$, it is the set of homotopy classes of loops at a fixed $x_0\in X$. Two loops $f\colon S^1\rightarrow X$ and $g\colon S^1\rightarrow X$ are defined to be homotopic if there exists a continuous map $H\colon S^1\times I\rightarrow X$, $(\omega,t)\mapsto h_t(\omega)$, such that $f=h_0$, $g=h_1$, and $h_t(\omega_0)=x_0$ for all $t\in I$ and some fixed $\omega_0\in S^1$.

It is convenient to look at $S^1$ in the definition above as the interval $I$ with identified endpoints. In this way, one can reformulate the definition of the fundamental group as the set of homotopy classes of maps $f\colon I\rightarrow X$ satisfying $f(0)=f(1)=x_0$ for some fixed $x_0\in X$. The homotopy between such maps $f$ and $g$ is a continuous map $H\colon I\times I\rightarrow X$, $(u,t)\mapsto h_t(u)$, such that $f=h_0$, $g=h_1$, and $h_t(0)=h_t(1)=x_0$ for all $t\in I$.

Looking at the definitions above, we realize that we have so far defined $\pi_1(X)$ as a set only. The group operation is given by the concatenation of loops. To define it, we shall use the second version of the definition of the fundamental group.

Let $f\colon I\rightarrow X$ and $g\colon I\rightarrow X$ be two maps such that $f(0)=f(1)=g(0)=g(1)=x_0$. The concatenation of $f$ and $g$ is the map $f*g\colon I\rightarrow X$ defined as follows: $$ f*g(t)=\begin{cases} f(2t) & \text{for } t\leq 1/2,\\ g(2t-1) & \text{for } t\geq 1/2. \end{cases} $$

The concatenation of loops descends to $\pi_1(X)$, i.e., the operation $*\colon \pi_1(X)\times\pi_1(X)\rightarrow\pi_1(X)$, $([f],[g])\mapsto [f*g]$, is well-defined. Moreover, it satisfies the group axioms. The identity in $\pi_1(X)$ is the homotopy class of constant maps at $x_0$, and the inverse of an element $[f]\in\pi_1(X)$ is $[\overline{f}]$, where $\overline{f}$ denotes the reverse loop of $f$, i.e., $\overline{f}(t)=f(1-t)$.

It should be noted that the choice of $x_0\in X$ does not affect $\pi_1(X)$.

Examples¶

Euler characteristic¶

Let $X$ be a simplicial complex of dimension $n$ with a finite number of faces: $k_0$ $0$-dimensional, $k_1$ $1$-dimensional, ..., $k_n$ $n$-dimensional. Then the Euler characteristic of $X$, denoted by $\chi(X)$, is defined as $$ \chi(X)=k_0-k_1+\ldots+(-1)^n k_n. $$

The same definition can be introduced for a finite CW-complex $X$ (of dimension $n$) with $k_i$ $i$-cells: $$ \chi(X)=k_0-k_1+\ldots+(-1)^n k_n. $$

If a topological space is endowed with both a CW-structure and a simplicial structure, then it does not matter from which of these structures we compute the Euler characteristic.

Actually, one can define the Euler characteristic for any topological space $X$, and this definition — equivalent to the one above for CW-complexes — is sensitive only to the homotopy type of $X$. In order to define $\chi(X)$ in such generality, we first need to introduce the concept of homology. We shall do this in the next lecture.

Example (Euler characteristic of the sphere $S^n$)¶

The case $n=1$¶

The case $n=2$¶

All surfaces of connected convex (this, actually, is not that important) polyhedra are homeomorphic to the sphere $S^2$. Thus, they share the same Euler characteristic. For such surfaces, this recovers the well-known formula $V-E+F=2$, where $V$, $E$, and $F$ denote the numbers of vertices, edges, and faces of the given polyhedron.

The general case¶

We can easily generalize the formula for $\chi(S^n)$ using the very simple CW-decomposition of $S^n$, already presented for $n=1$ and $n=2$. This decomposition consists of only one vertex and one $n$-dimensional cell, obtained by attaching the $n$-disk via the constant map onto that vertex. Thus, $$ \chi(S^n)=1+(-1)^n. $$

Programming tasks¶

Task 1: Compute skeleta of a simplicial complex¶

Input:

  • An integer n — number of simplices in the complex, given in a possibly "lazy" way, i.e. it is possible that all the facets of agiven already existing simplex are not listed expplicitly - you must take that into account!
  • An integer d — the dimension of the skeleton to consider,
  • n rows, each describing a simplex by a list of numbers denoting its vertices separated by a space.

Output:

  • in seperate rows, all simplices comprising the $d$-skeleton. List them in a full way, that is including all simplices belonging to that skeleton.

Task 2: Compute Euler characteristic of a simplicial complex¶

Input:

  • An integer n — number of simplices in the complex, given in a possibly "lazy" way, i.e. it is possible that all the facets of agiven already existing simplex are not listed expplicitly - you must take that into account!
  • n rows, each describing a simplex by a list of numbers denoting its vertices separated by a space.

Output:

  • a single number equal to Euler characteristic of the given simplicial complex.

Task 3: Compute open balls in a metric space¶

Let $(X,d)$ be a finite metric space. Recall that an open ball of radius $r>0$ and center $x_0\in X$ is the set $$ B(x_0,r)=\{x\in X|d(x_0,x)<r\}. $$ Write a code which, for a given metric space $(X,d)$ and a radius $r>0$ will compute open balls for centers being the points of $X$.

Input:

  • An integer n — number of points in $X$ (you may assume the points are denoted by $1,\ldots,n$).
  • $n\choose{2}$ lines, each containing a pair of numbers and a third number equal to the distance $d$ between the points of $X$ denote by these numbers.
  • A number r — the radius from above.

Output:

  • $n$ lines, $i$-th line containing the points comprising the open ball of radius $r$ and the center being the point denoted by $i$.

Task 4: Compute optimal scaling constant for finite set metrics¶

We call two metrics $d_1$ and $d_2$ on a set $X$ equivalent if there exists a constant $C>0$ such that for every $x,y\in X$ we have $$ \frac{1}{C}d_1(x,y)\leq d_2(x,y)\leq Cd_1(x,y). $$ It is true that all metrics on a finite set are equivalent. Given a finite set $X$ and two metrics on it, find the optimal, that is the smallest constant $C$ from the definition above.

Input:

  • An integer n — number of points in the set $X$,
  • $n\choose{2}$ rows, for each pair of points, each row containing four numbers: the first two are the numbers of points and the next two are the two distances between these points in the first and in the second metric respectively.

Output:

  • a single number equal to the optimal constant $C$ as described above.

Sources used for preparation of this notebook¶

  • A. Hatcher, Algebraic Topology, 2002