logo

Betti Number of Homology group 📂Topological Data Analysis

Betti Number of Homology group

Overview

Without considering the geometric meaning, if we just define it plainly, in Algebraic Topology, the Betti Number is merely the rank of the homology group in a chain complex. The problem is that such an explanation does not help those curious about the meaning of Betti numbers, and it’s also difficult to learn through examples because the specific calculation is daunting.

In this post, we introduce a theorem that answers at least the second question—how to calculate Betti numbers—with its detailed proof. According to the theorem introduced below, a certain matrix can be found according to the given chain complex, and through a series of calculations, the following explicit formula can be derived. $$ \beta_{p} = \rank ?_{1} - \rank ?_{2} $$

Although the best explanation for mathematical content is to convey it without using mathematics, in the case of Betti numbers, one can realize its fundamental principles through the process of deriving the formula. The proof may be quite difficult for undergraduates to follow, but it is written in detail without omissions, so it is recommended to at least give it a try.

Theorem

Definition of Homology group:

  1. Let’s say $n \in \mathbb{N}_{0}$. Chain $$ \cdots \longrightarrow C_{n+1} \overset{\partial_{n+1}}{\longrightarrow} C_{n} \overset{\partial_{n}}{\longrightarrow} C_{n-1} \longrightarrow \cdots \longrightarrow C_{1} \overset{\partial_{1}}{\longrightarrow} C_{0} \overset{\partial_{0}}{\longrightarrow} 0 $$ If it satisfies $$ \partial_{n} \circ \partial_{n+1} = 0 $$ for all $n$, then $\mathcal{C} := \left\{ \left( C_{n}, \partial_{n} \right) \right\}_{n=0}^{\infty}$ is called a Chain Complex.
  2. The Quotient group $H_{n} := \ker \partial_{n} / \operatorname{Im} \partial_{n+1}$ is called the $n$-th Homology group of $\mathcal{C}$.
  3. Homomorphism $\partial_{n} : C_{n} \longrightarrow C_{n-1}$ is called a Boundary or Differential Operator.
  4. Elements of $Z_{n} := \ker \partial_{n}$ are called $n$-Cycles, and elements of $B_{n} := \operatorname{Im} \partial_{n+1}$ are called $n$-Boundaries.

Standard Basis Decomposition of Free Chain Complexes

Assuming that all $C_{p}$ of the Chain Complex $\mathcal{C} := \left\{ \left( C_{p}, \partial_{p} \right) \right\}$ are Free groups with Finite Rank, there exist Subgroups $U_{p}, V_{p}, W_{p} \subset C_{p}$ and for all $p$ and $Z_{p} := \ker \partial_{p}$ that satisfy the following. $$ \begin{align*} C_{p} =& U_{p} \oplus V_{p} \oplus W_{p} \\ =& U_{p} \oplus Z_{p} \end{align*} $$ $$ \begin{align*} \partial_{p} \left( U_{p} \right) \subset & W_{p} \\ Z_{p} =& V_{p} \oplus W_{p} \end{align*} $$ Of course, $Z_{p}$ is the Kernel of $\partial_{p}$, so $\partial_{p} \left( V_{p} \right) = 0$ and $\partial_{p} \left( W_{p} \right) = 0$. Furthermore, the Restriction Function ${\partial_{p}}_{| U_{p}} : U_{p} \to W_{p-1}$ from $U_{p}$ to $\partial_{p}$ has the following Smith Normal Form. $$ \begin{bmatrix} b_{1} & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & b_{l} \end{bmatrix} $$ Here, $b_{i} \in \mathbb{N}$ and $b_{1} \mid \cdots \mid b_{l}$.

Efficient Computability of Homology groups 1

The Betti Number of $H_{p} \left( \mathcal{C} \right)$ is called the $p$-th Betti Number of $\mathcal{C}$. The $\beta_{p}$ of a finite Complex $K$ is as follows. $$ \beta_{p} = \rank Z_{p} - \rank B_{p} $$ Its specific values can be calculated by the Smith Normal Form of $\partial_{p}$ as follows. In the diagram, the blue dotted line represents the diagonal components where $1$, the orange solid line represents the diagonal components where $1$ is not $0$, and all other components are $0$2.

20220304_141907.png

What is important here is the number $\rank B_{p-1}$ of $1$ in the Smith Normal Form, and the number of zero columns $\rank Z_{p}$.

Proof 3

Part 1. $B_{p} \subset W_{p} \subset Z_{p} \subset C_{p}$

Let’s say $$ \begin{align*} Z_{p} :=& \ker \partial_{p} \\ B_{p} :=& \operatorname{Im} \partial_{p+1} \\ W_{p} :=& \left\{ c_{p} \in C_{p} : \lambda c_{p} \in B_{p} , \forall m \ne 0 \right\} \end{align*} $$. In particular, $W_{p}$ becomes a Subgroup of $C_{p}$, and considering only $\lambda = 1$, it weakens the condition of the Boundary $B_{p}$, so it is called a Weak Boundary.

  • From the definition of $W_{p}$, if we consider $\lambda \ne 1$ $$ B_{p} \subset W_{p} $$
  • From the definition of $Z_{p}$, since $\forall z_{p} \in Z_{p}$ is $\partial_{p} z_{p} = 0$ and $Z_{p} = \ker \partial_{p}$ is $\partial_{p} : C_{p} \to C_{p-1}$ $$ Z_{p} \subset C_{p} $$
  • Since $C_{p}$ is assumed to be a Free group, it is Torsion-Free, meaning there does not exist $\lambda \ne 0$ that satisfies $\lambda z_{p} = 0$ for any $\forall z_{p} \in Z_{p} \subset C_{p}$. Meanwhile, for all $c_{p+1} \in C_{p+1}$ $$ \partial_{p+1} c_{p+1} = \lambda z_{p} \in W_{p} $$ If we apply $\partial_{p}$ to both sides, $$ 0 = \partial_{p} \partial_{p+1} c_{p+1} = \partial_{p} \lambda z_{p} = \lambda \partial_{p} z_{p} $$ so $\partial_{p} z_{p} = 0$ must hold. This means if $\lambda z_{p} \in W_{p}$ then $\lambda z_{p} \in Z_{p}$, $$ W_{p} \subset Z_{p} $$

From such considerations, we obtain the following inclusion relationships. $$ B_{p} \subset W_{p} \subset Z_{p} \subset C_{p} $$


Part 2. $W_{p} \subset Z_{p}$ is a Direct Summand of $Z_{p}$

  • From the definition of the $p$-th Homology group $H_{p} \left( \mathcal{C} \right) = Z_{p} / B_{p}$ $$ \text{proj}_{1} : Z_{p} \to H_{p} \left( \mathcal{C} \right) $$ is a Projection with a rank reduced by as much as the Coset $B_{p}$, and
  • For the Torsion Subgroup $T_{p} \left( \mathcal{C} \right) \subset H_{p} \left( \mathcal{C} \right)$ of $H_{p} \left( \mathcal{C} \right)$ $$ \text{proj}_{2} : H_{p} \left( \mathcal{C} \right) \to H_{p} \left( \mathcal{C} \right) / T_{p} \left( \mathcal{C} \right) $$ is also a projection.

First Isomorphism Theorem: If a Homomorphism $\phi : G \to G'$ exists, then $$G / \ker ( \phi ) \simeq \phi (G)$$

Therefore, defined as $\text{proj} := \text{proj}_{1} \circ \text{proj}_{2}$ $$ \text{proj} : Z_{p} \to H_{p} \left( \mathcal{C} \right) / T_{p} \left( \mathcal{C} \right) $$ is also a projection. Elements of $W_{p}$ are expressed as $\partial_{p+1} d_{p+1}$, so the kernel of this projection $\text{proj}$ is $W_{p}$, and since every projection is a Surjection, according to the First Isomorphism Theorem, $$ Z_{p} / W_{p} \simeq H_{p} / T_{p} $$ holds. Here, regardless of how the right side of $H_{p}$ is formed, it’s reduced by the Torsion Subgroup $T_{p}$, so it’s torsion-free, thereby ensuring that the left side $Z_{p} / W_{p}$ is also torsion-free. Therefore, if $\alpha_{1} , \cdots , \alpha_{k}$ is the basis of $Z_{p} / W_{p}$, and $\alpha'_{1} , \cdots , \alpha'_{l} \in W_{p}$ is the basis of $W_{p}$, then $\alpha_{1} , \cdots , \alpha_{k}, \alpha'_{1} , \cdots , \alpha'_{l}$ becomes the basis of $Z_{p}$. Thus, $Z_{p}$ can be expressed as a direct sum of the Subgroup $V_{p}$ with the basis $\alpha_{1} , \cdots , \alpha_{k}$ and $W_{p}$.


Part 3. Basis of $Z_{p}, B_{p-1}, W_{p-1}$

Homomorphism’s Smith Normal Form: If the ranks of free Abelian groups $G$ and $G'$ are $n,m$ and $f : G \to G'$, respectively, and $g$ is a homomorphism, then there exists a homomorphism $g$ with the following matrix. $$ \begin{bmatrix} d_{1} & 0 & 0 & 0 & \cdots & 0 \\ 0 & \ddots & 0 & 0 & \cdots & 0 \\ 0 & 0 & d_{r} & 0 & \cdots & 0 \\ 0 & 0 & 0 & 0 & \cdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & 0 & \cdots & 0 \end{bmatrix} \in \mathbb{Z}^{m \times n} $$ Here, $d_{1} , \cdots, d_{r} \in \mathbb{N}$ and $d_{1} \mid \cdots \mid d_{r}$, meaning $d_{k}$ must be a divisor of $d_{k+1}$.

$\partial_{p} : C_{p} \to C_{p-1}$ has the following Smith Normal Form of the matrix $m \times n$.

$$ \begin{matrix} & \begin{matrix} e_{1} & \cdots & e_{l} & e_{l} & \cdots & e_{n} \end{matrix} \\ \begin{matrix} e'_{1} \\ \vdots \\ e'_{l} \\ e'_{l} \\ \vdots \\ e'_{m} \end{matrix} & \begin{bmatrix} d_{1} & 0 & 0 & 0 & \cdots & 0 \\ 0 & \ddots & 0 & 0 & \cdots & 0 \\ 0 & 0 & d_{r} & 0 & \cdots & 0 \\ 0 & 0 & 0 & 0 & \cdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & 0 & \cdots & 0 \end{bmatrix} \end{matrix} $$

Here, we will directly show the following three things:

  • (1): $e_{l+1} , \cdots , e_{n}$ is the basis of $Z_{p}$.
  • (2): $b_{1} e'_{1} , \cdots , b_{l} e'_{l}$ is the basis of $B_{p-1}$.
  • (3): $e'_{1} , \cdots , e'_{l}$ is the basis of $W_{p-1}$.

Sub-proof

  • According to the definition of $\partial_{p}$, for a general $c_{p} \in C_{p}$, the following holds. $$ c_{p} = \sum_{i=1}^{n} a_{i} e_{i} \implies \partial_{p} c_{p} = \sum_{i=1}^{l} a_{i} b_{i} e'_{i} $$
  • (1): Since $b_{i} \ne 0$, the necessary and sufficient condition for $Z_{p} = \ker \partial_{p}$ is for $a_{i} = 0$ for any $i = 1 \cdots , l$. Therefore, $e_{l+1} , \cdots , e_{n}$ is the basis of $Z_{p}$.
  • (2): Every $\partial_{p} c_{p} \in B_{p-1}$ can be expressed as a Linear Combination of $b_{1} e'_{1} , \cdots , b_{l} e'_{l}$, and since $b_{i} \ne 0$, $b_{1} e'_{1} , \cdots , b_{l} e'_{l}$ is the basis of $B_{p-1}$.
  • (3): Since $b_{i} e'_{i} = \partial e_{i}$, first of all, $e'_{1}, \cdots, e'_{l} \in W_{p-1}$. Conversely, if we set $c_{p-1} \in C_{p-1}$ as $$ c_{p-1} = \sum_{i=1}^{m} d_{i} e'_{i} $$ and assume $c_{p-1} \in W_{p-1}$, then since $W_{p-1}$ was defined as $W_{p-1} = \left\{ c_{p} \in C_{p} : \lambda c_{p} \in B_{p} , \forall m \ne 0 \right\}$, $c_{p-1}$ can be expressed in the form of $$ \lambda c_{p-1} = \partial c_{p} = \sum_{i=1}^{l} a_{i} b_{i} e'_{i} $$ for some $\lambda \ne 0$. Comparing coefficients, for $i > l$, we obtain $$ \lambda d_{i} = 0 \implies d_{i} = 0 $$ Therefore, $e'_{1} , \cdots , e'_{l}$ is the basis of $W_{p-1}$.

Part 4. Proof of ‘Standard Basis Decomposition of Free Chain Complexes’

For $C_{p}$ and $C_{p-1}$, if we consider the Free group generated by $e_{1} , \cdots , e_{l}$ appearing in the discussion so far as $U_{p}$, then since $Z_{p} = V_{p} \oplus W_{p}$, we obtain $$ \begin{align*} C_{p} =& U_{p} \oplus Z_{p} \\ =& U_{p} \oplus \left( V_{p} \oplus W_{p} \right) \end{align*} $$ as $\partial V_{p} = \partial W_{p} = 0$. Here, note that $W_{p}$ and $Z_{p}$ are unique according to $C_{p}$, but $U_{p}$ and $V_{p}$ do not necessarily have to be unique.


Part 5. Proof of ‘Efficient Computability of Homology groups’

According to Part 4, for the Complex $K$, the following decomposition is guaranteed to exist. $$ \begin{align*} C_{p} \left( K \right) =& U_{p} \oplus V_{p} \oplus W_{p} \\ Z_{p} =& V_{p} \oplus W_{p} \end{align*} $$

Properties of Direct Sum: Let’s say $G = G_{1} \oplus G_{2}$. If $H_{1}$ is a subgroup of $G_{1}$ and $H_{2}$ is a subgroup of $G_{2}$, then $H_{1}$ and $H_{2}$ can also be expressed as a direct sum, especially the following holds. $${{ G } \over { H_{1} \oplus H_{2} }} \simeq {{ G_{1} } \over { H_{1} }} \oplus {{ G_{2} } \over { H_{2} }}$$

  • [1]: If we say $H_{1} \simeq G_{1}$ and $H_{2} \simeq \left\{ 0 \right\}$, then $$ G / G_{1} \simeq G_{2} $$
  • [2]: If we say $H_{1} \simeq \left\{ 0 \right\}$, then $$ {{ G } \over { H_{2} }} \simeq G_{1} \oplus {{ G_{2} } \over { H_{2} }}$$

Since it was $B_{p} \subset W_{p} \subset Z_{p} \subset C_{p}$ in Part 1, according to the properties of the Direct Sum, $$ \begin{align*} H_{p} \left( K \right) =& Z_{p} / B_{p} \\ =& \left( {{ V_{p} \oplus W_{p} } \over { B_{p} }} \right) \\ =& V_{p} \oplus \left( {{ W_{p} } \over { B_{p} }} \right) & \because [2] \\ =& \left( {{ Z_{p} } \over { W_{p} }} \right) \oplus \left( {{ W_{p} } \over { B_{p} }} \right) & \because [1] \end{align*} $$ is obtained. Here, in $H_{p} \left( K \right) = \left( Z_{p} / W_{p} \right) \oplus \left( W_{p} / B_{p} \right)$,

  • $Z_{p} / W_{p}$ is the Free part, and
  • $W_{p} / B_{p}$ is the Torsion part.

Therefore, the $p$-th Betti Number $\beta_{p}$ of $K$ is calculated as follows. $$ \begin{align*} \beta_{p} =& \rank H_{p} \left( K \right) \\ =& \rank \left[ \left( Z_{p} / W_{p} \right) \oplus \left( W_{p} / B_{p} \right) \right] \\ =& \rank \left( Z_{p} / W_{p} \right) + \rank \left( W_{p} / B_{p} \right) \\ =& \left[ \rank Z_{p} - \rank W_{p} \right] + \left[ \rank W_{p} - \rank B_{p} \right] \\ =& \rank Z_{p} - \rank B_{p} \end{align*} $$

20220304_141907.png

Meanwhile, for the torsion part of $H_{p-1}(K)$ and $b_{1} | \cdots | b_{l} \in \mathbb{N}$, the following Isomorphism can be known to exist. $$ W_{p-1} / B_{p-1} \simeq \left( {{ \mathbb{Z} } \over { b_{1} \mathbb{Z} }} \right) \oplus \cdots \oplus \left( {{ \mathbb{Z} } \over { b_{l} \mathbb{Z} }} \right) $$ Here, the fact that $b_{i} = 1$ for $i \le l$, in other words, the rank of $B_{p-1}$ is $l$, is because $$ \mathbb{Z} / b_{i} \mathbb{Z} = \mathbb{Z} / \mathbb{Z} = \left\{ 0 \right\} $$ so the rank of $W_{p-1}$ is reduced by $l$.

Example

Torus

20220118_105805.png

$$ \begin{align*} \beta_{0} =& 1 \\ \beta_{1} =& 2 \\ \beta_{2} =& 1 \end{align*} $$

The Betti numbers of a torus are known as above. Assuming the chain complex of this torus is defined as in the above figure, let’s just calculate $\beta_{1} = 2$ as an example. There is also a way to calculate it by just mathematically pondering without using the formula derived above, but as you can read, it’s headache-inducingly difficult. In contrast, let’s see how convenient it is to ’efficiently calculate homology’.

Homomorphism’s Smith Normal Form: For Free Abelian groups $G$ and $G'$, if $a_{1} , \cdots , a_{n}$ is the basis of $G$, and $a_{1}' , \cdots , a_{m}'$ is the basis of $G'$, and if the function $f : G \to G'$ is a Homomorphism, then there exists a unique set of integers $\left\{ \lambda_{ij} \right\} \subset \mathbb{Z}$ that satisfies the following. $$ f \left( a_{j} \right) = \sum_{i=1}^{m} \lambda_{ij} a_{i}' $$ Here, the matrix $\left( \lambda_{ij} \right) \in \mathbb{Z}^{m \times n}$ is called the Matrix of $f$ with respect to the bases of $G$ and $G'$.

Since $\beta_{1} = \rank Z_{1} - \rank B_{1}$, at least the Boundary Matrices $\left( \partial_{1} \right)$ and $\left( \partial_{2} \right)$ need to be found. For all $a , b, c \in C_{1} (T)$, $$ \begin{align*} \partial_{1} (a) =& v - v = 0 = 0v \\ \partial_{1} (b) =& v - v = 0 = 0v \\ \partial_{1} (c) =& v - v = 0 = 0v \end{align*} $$ is obtained. $Z_{p}$ is the number of zero vectors on the right side of the matrix, and $B_{p-1}$ is the number of $1$ in the matrix. Considering $\partial_{2}$ next, $$ \begin{align*} \partial_{2} (U) =& -a -b +c \\ \partial_{2} (L) =& a + b - c \end{align*} $$ is obtained. Combining these, the $1$-th Betti Number $\beta_{1}$ of the torus is calculated as follows. $$ \beta_{1} = \rank Z_{1} - \rank B_{1} = 3 - 1 = 2 $$ Of course, this result is guaranteed to match the value obtained by using all sorts of mathematical knowledge, discussing what the Free group is, what an Isomorphism is, and so on, according to the theorems introduced in this post. To speak a bit recklessly, one can ‘calculate’ Betti numbers, that is, ‘homology’, just by following instructions without using the brain. On the other hand, to put it more positively, it opens the way to studying topology through computers.


  1. Munkres. (1984). Elements of Algebraic Topology: p58. ↩︎

  2. Edelsbrunner, Harer. (2010). Computational Topology An Introduction: p104. ↩︎

  3. Munkres. (1984). Elements of Algebraic Topology: p58~61. ↩︎