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. βp=rank?1rank?2 \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 nN0n \in \mathbb{N}_{0}. Chain Cn+1n+1CnnCn1C11C000 \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 nn+1=0 \partial_{n} \circ \partial_{n+1} = 0 for all nn, then C:={(Cn,n)}n=0\mathcal{C} := \left\{ \left( C_{n}, \partial_{n} \right) \right\}_{n=0}^{\infty} is called a Chain Complex.
  2. The Quotient group Hn:=kern/Imn+1H_{n} := \ker \partial_{n} / \operatorname{Im} \partial_{n+1} is called the nn-th Homology group of C\mathcal{C}.
  3. Homomorphism n:CnCn1\partial_{n} : C_{n} \longrightarrow C_{n-1} is called a Boundary or Differential Operator.
  4. Elements of Zn:=kernZ_{n} := \ker \partial_{n} are called nn-Cycles, and elements of Bn:=Imn+1B_{n} := \operatorname{Im} \partial_{n+1} are called nn-Boundaries.

Standard Basis Decomposition of Free Chain Complexes

Assuming that all CpC_{p} of the Chain Complex C:={(Cp,p)}\mathcal{C} := \left\{ \left( C_{p}, \partial_{p} \right) \right\} are Free groups with Finite Rank, there exist Subgroups Up,Vp,WpCpU_{p}, V_{p}, W_{p} \subset C_{p} and for all pp and Zp:=kerpZ_{p} := \ker \partial_{p} that satisfy the following. Cp=UpVpWp=UpZp \begin{align*} C_{p} =& U_{p} \oplus V_{p} \oplus W_{p} \\ =& U_{p} \oplus Z_{p} \end{align*} p(Up)WpZp=VpWp \begin{align*} \partial_{p} \left( U_{p} \right) \subset & W_{p} \\ Z_{p} =& V_{p} \oplus W_{p} \end{align*} Of course, ZpZ_{p} is the Kernel of p\partial_{p}, so p(Vp)=0\partial_{p} \left( V_{p} \right) = 0 and p(Wp)=0\partial_{p} \left( W_{p} \right) = 0. Furthermore, the Restriction Function pUp:UpWp1{\partial_{p}}_{| U_{p}} : U_{p} \to W_{p-1} from UpU_{p} to p\partial_{p} has the following Smith Normal Form. [b100bl] \begin{bmatrix} b_{1} & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & b_{l} \end{bmatrix} Here, biNb_{i} \in \mathbb{N} and b1blb_{1} \mid \cdots \mid b_{l}.

Efficient Computability of Homology groups 1

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

20220304_141907.png

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

Proof 3

Part 1. BpWpZpCpB_{p} \subset W_{p} \subset Z_{p} \subset C_{p}

Let’s say Zp:=kerpBp:=Imp+1Wp:={cpCp:λcpBp,m0} \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, WpW_{p} becomes a Subgroup of CpC_{p}, and considering only λ=1\lambda = 1, it weakens the condition of the Boundary BpB_{p}, so it is called a Weak Boundary.

  • From the definition of WpW_{p}, if we consider λ1\lambda \ne 1 BpWp B_{p} \subset W_{p}
  • From the definition of ZpZ_{p}, since zpZp\forall z_{p} \in Z_{p} is pzp=0\partial_{p} z_{p} = 0 and Zp=kerpZ_{p} = \ker \partial_{p} is p:CpCp1\partial_{p} : C_{p} \to C_{p-1} ZpCp Z_{p} \subset C_{p}
  • Since CpC_{p} is assumed to be a Free group, it is Torsion-Free, meaning there does not exist λ0\lambda \ne 0 that satisfies λzp=0\lambda z_{p} = 0 for any zpZpCp\forall z_{p} \in Z_{p} \subset C_{p}. Meanwhile, for all cp+1Cp+1c_{p+1} \in C_{p+1} p+1cp+1=λzpWp \partial_{p+1} c_{p+1} = \lambda z_{p} \in W_{p} If we apply p\partial_{p} to both sides, 0=pp+1cp+1=pλzp=λpzp 0 = \partial_{p} \partial_{p+1} c_{p+1} = \partial_{p} \lambda z_{p} = \lambda \partial_{p} z_{p} so pzp=0\partial_{p} z_{p} = 0 must hold. This means if λzpWp\lambda z_{p} \in W_{p} then λzpZp\lambda z_{p} \in Z_{p}, WpZp W_{p} \subset Z_{p}

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


Part 2. WpZpW_{p} \subset Z_{p} is a Direct Summand of ZpZ_{p}

  • From the definition of the pp-th Homology group Hp(C)=Zp/BpH_{p} \left( \mathcal{C} \right) = Z_{p} / B_{p} proj1:ZpHp(C) \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 BpB_{p}, and
  • For the Torsion Subgroup Tp(C)Hp(C)T_{p} \left( \mathcal{C} \right) \subset H_{p} \left( \mathcal{C} \right) of Hp(C)H_{p} \left( \mathcal{C} \right) proj2:Hp(C)Hp(C)/Tp(C) \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 ϕ:GG\phi : G \to G' exists, then G/ker(ϕ)ϕ(G)G / \ker ( \phi ) \simeq \phi (G)

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


Part 3. Basis of Zp,Bp1,Wp1Z_{p}, B_{p-1}, W_{p-1}

Homomorphism’s Smith Normal Form: If the ranks of free Abelian groups GG and GG' are n,mn,m and f:GGf : G \to G', respectively, and gg is a homomorphism, then there exists a homomorphism gg with the following matrix. [d10000000000dr000000000000]Zm×n \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, d1,,drNd_{1} , \cdots, d_{r} \in \mathbb{N} and d1drd_{1} \mid \cdots \mid d_{r}, meaning dkd_{k} must be a divisor of dk+1d_{k+1}.

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

e1elelene1elelem[d10000000000dr000000000000] \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): el+1,,ene_{l+1} , \cdots , e_{n} is the basis of ZpZ_{p}.
  • (2): b1e1,,blelb_{1} e'_{1} , \cdots , b_{l} e'_{l} is the basis of Bp1B_{p-1}.
  • (3): e1,,ele'_{1} , \cdots , e'_{l} is the basis of Wp1W_{p-1}.

Sub-proof

  • According to the definition of p\partial_{p}, for a general cpCpc_{p} \in C_{p}, the following holds. cp=i=1naiei    pcp=i=1laibiei 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 bi0b_{i} \ne 0, the necessary and sufficient condition for Zp=kerpZ_{p} = \ker \partial_{p} is for ai=0a_{i} = 0 for any i=1,li = 1 \cdots , l. Therefore, el+1,,ene_{l+1} , \cdots , e_{n} is the basis of ZpZ_{p}.
  • (2): Every pcpBp1\partial_{p} c_{p} \in B_{p-1} can be expressed as a Linear Combination of b1e1,,blelb_{1} e'_{1} , \cdots , b_{l} e'_{l}, and since bi0b_{i} \ne 0, b1e1,,blelb_{1} e'_{1} , \cdots , b_{l} e'_{l} is the basis of Bp1B_{p-1}.
  • (3): Since biei=eib_{i} e'_{i} = \partial e_{i}, first of all, e1,,elWp1e'_{1}, \cdots, e'_{l} \in W_{p-1}. Conversely, if we set cp1Cp1c_{p-1} \in C_{p-1} as cp1=i=1mdiei c_{p-1} = \sum_{i=1}^{m} d_{i} e'_{i} and assume cp1Wp1c_{p-1} \in W_{p-1}, then since Wp1W_{p-1} was defined as Wp1={cpCp:λcpBp,m0}W_{p-1} = \left\{ c_{p} \in C_{p} : \lambda c_{p} \in B_{p} , \forall m \ne 0 \right\}, cp1c_{p-1} can be expressed in the form of λcp1=cp=i=1laibiei \lambda c_{p-1} = \partial c_{p} = \sum_{i=1}^{l} a_{i} b_{i} e'_{i} for some λ0\lambda \ne 0. Comparing coefficients, for i>li > l, we obtain λdi=0    di=0 \lambda d_{i} = 0 \implies d_{i} = 0 Therefore, e1,,ele'_{1} , \cdots , e'_{l} is the basis of Wp1W_{p-1}.

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

For CpC_{p} and Cp1C_{p-1}, if we consider the Free group generated by e1,,ele_{1} , \cdots , e_{l} appearing in the discussion so far as UpU_{p}, then since Zp=VpWpZ_{p} = V_{p} \oplus W_{p}, we obtain Cp=UpZp=Up(VpWp) \begin{align*} C_{p} =& U_{p} \oplus Z_{p} \\ =& U_{p} \oplus \left( V_{p} \oplus W_{p} \right) \end{align*} as Vp=Wp=0\partial V_{p} = \partial W_{p} = 0. Here, note that WpW_{p} and ZpZ_{p} are unique according to CpC_{p}, but UpU_{p} and VpV_{p} do not necessarily have to be unique.


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

According to Part 4, for the Complex KK, the following decomposition is guaranteed to exist. Cp(K)=UpVpWpZp=VpWp \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=G1G2G = G_{1} \oplus G_{2}. If H1H_{1} is a subgroup of G1G_{1} and H2H_{2} is a subgroup of G2G_{2}, then H1H_{1} and H2H_{2} can also be expressed as a direct sum, especially the following holds. GH1H2G1H1G2H2{{ G } \over { H_{1} \oplus H_{2} }} \simeq {{ G_{1} } \over { H_{1} }} \oplus {{ G_{2} } \over { H_{2} }}

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

Since it was BpWpZpCpB_{p} \subset W_{p} \subset Z_{p} \subset C_{p} in Part 1, according to the properties of the Direct Sum, Hp(K)=Zp/Bp=(VpWpBp)=Vp(WpBp)[2]=(ZpWp)(WpBp)[1] \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 Hp(K)=(Zp/Wp)(Wp/Bp)H_{p} \left( K \right) = \left( Z_{p} / W_{p} \right) \oplus \left( W_{p} / B_{p} \right),

  • Zp/WpZ_{p} / W_{p} is the Free part, and
  • Wp/BpW_{p} / B_{p} is the Torsion part.

Therefore, the pp-th Betti Number βp\beta_{p} of KK is calculated as follows. βp=rankHp(K)=rank[(Zp/Wp)(Wp/Bp)]=rank(Zp/Wp)+rank(Wp/Bp)=[rankZprankWp]+[rankWprankBp]=rankZprankBp \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 Hp1(K)H_{p-1}(K) and b1blNb_{1} | \cdots | b_{l} \in \mathbb{N}, the following Isomorphism can be known to exist. Wp1/Bp1(Zb1Z)(ZblZ) 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 bi=1b_{i} = 1 for ili \le l, in other words, the rank of Bp1B_{p-1} is ll, is because Z/biZ=Z/Z={0} \mathbb{Z} / b_{i} \mathbb{Z} = \mathbb{Z} / \mathbb{Z} = \left\{ 0 \right\} so the rank of Wp1W_{p-1} is reduced by ll.

Example

Torus

20220118_105805.png

β0=1β1=2β2=1 \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 β1=2\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 GG and GG', if a1,,ana_{1} , \cdots , a_{n} is the basis of GG, and a1,,ama_{1}' , \cdots , a_{m}' is the basis of GG', and if the function f:GGf : G \to G' is a Homomorphism, then there exists a unique set of integers {λij}Z\left\{ \lambda_{ij} \right\} \subset \mathbb{Z} that satisfies the following. f(aj)=i=1mλijai f \left( a_{j} \right) = \sum_{i=1}^{m} \lambda_{ij} a_{i}' Here, the matrix (λij)Zm×n\left( \lambda_{ij} \right) \in \mathbb{Z}^{m \times n} is called the Matrix of ff with respect to the bases of GG and GG'.

Since β1=rankZ1rankB1\beta_{1} = \rank Z_{1} - \rank B_{1}, at least the Boundary Matrices (1)\left( \partial_{1} \right) and (2)\left( \partial_{2} \right) need to be found. For all a,b,cC1(T)a , b, c \in C_{1} (T), 1(a)=vv=0=0v1(b)=vv=0=0v1(c)=vv=0=0v \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. ZpZ_{p} is the number of zero vectors on the right side of the matrix, and Bp1B_{p-1} is the number of 11 in the matrix. Considering 2\partial_{2} next, 2(U)=ab+c2(L)=a+bc \begin{align*} \partial_{2} (U) =& -a -b +c \\ \partial_{2} (L) =& a + b - c \end{align*} is obtained. Combining these, the 11-th Betti Number β1\beta_{1} of the torus is calculated as follows. β1=rankZ1rankB1=31=2 \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. ↩︎