# Betti number

Given a topological space $X$, the $n^{th}$ Betti number of $X$, denoted $b_n(X)$, is a nonnegative integer defined in any of the following equivalent ways. Note that if any of these definitions gives a finite number, so do all the others, and the values of the numbers are equal.:
1. It is the free rank of the $n^{th}$ singular homology group $H_n(X;\mathbb{Z})$, where free rank refers to the rank of the torsion-free part (i.e., the quotient by the torsion subgroup). This makes sense if the torsion-free part is a finitely generated abelian group.
2. It is the dimension of the $n^{th}$ singular homology group $H_n(X;\mathbb{Q})$ as a vector space over $\mathbb{Q}$. This makes sense if the vector space is finite-dimensional.
3. It is the free rank of the $n^{th}$ singular cohomology group $H^n(X:\mathbb{Z})$, where free rank refers to the rank of the torsion-free part (i.e., the quotient by the torsion subgroup) as a free abelian group. This makes sense if the torsion-free part is a finitely generated abelian group.
4. It is the dimension of the $n^{th}$ singular cohomology group $H^n(X;\mathbb{Q})$ as a vector space over $\mathbb{Q}$. This makes sense if the vector space is finite-dimensional.