# Cellular homology

In mathematics, cellular homology in algebraic topology is a homology theory for the category of CW-complexes. It agrees with singular homology, and can provide an effective means of computing homology modules.

## Definition

If $X$ is a CW-complex with n-skeleton $X_{n}$, the cellular-homology modules are defined as the homology groups H$_i$ of the cellular chain complex
    $\cdots \to {C_{n+1}}(X_{n+1},X_{n})\to {C_{n}}(X_{n},X_{n-1})\to {C_{n-1}}(X_{n-1},X_{n-2})\to \cdots ,$
where $X_{-1}$ is taken to be the empty set.
The group
    ${C_{n}}(X_{n},X_{n-1})$
is free abelian, with generators that can be identified with the $n$-cells of $X$. Let $e_{n}^{\alpha }$ be an $n$-cell of $X$, and let $\chi _{n}^{\alpha }:\partial e_{n}^{\alpha }\cong \mathbb {S} ^{n-1}\to X_{n-1}$ be the attaching map. Then consider the composition
    $\chi _{n}^{\alpha \beta }:\mathbb {S} ^{n-1}\,{\stackrel {\cong }{\longrightarrow }}\,\partial e_{n}^{\alpha }\,{\stackrel {\chi _{n}^{\alpha }}{\longrightarrow }}\,X_{n-1}\,{\stackrel {q}{\longrightarrow }}\,X_{n-1}/\left(X_{n-1}\setminus e_{n-1}^{\beta }\right)\,{\stackrel {\cong }{\longrightarrow }}\,\mathbb {S} ^{n-1},$
where the first map identifies $\mathbb {S} ^{n-1}$ with $\partial e_{n}^{\alpha }$ via the characteristic map $\Phi _{n}^{\alpha }$ of $e_{n}^{\alpha }$, the object $e_{n-1}^{\beta }$ is an $(n-1)$-cell of X, the third map $q$ is the quotient map that collapses $X_{n-1}\setminus e_{n-1}^{\beta }$ to a point (thus wrapping $e_{n-1}^{\beta }$ into a sphere $\mathbb {S} ^{n-1}$), and the last map identifies $X_{n-1}/\left(X_{n-1}\setminus e_{n-1}^{\beta }\right)$ with $\mathbb {S} ^{n-1}$ via the characteristic map $\Phi _{n-1}^{\beta }$ of $e_{n-1}^{\beta }$.
The boundary map
    $\partial _{n}:{C_{n}}(X_{n},X_{n-1})\to {C_{n-1}}(X_{n-1},X_{n-2})$
is then given by the formula
    ${\partial _{n}}(e_{n}^{\alpha })=\sum _{\beta }\deg \left(\chi _{n}^{\alpha \beta }\right)e_{n-1}^{\beta },$
where $\deg \left(\chi _{n}^{\alpha \beta }\right)$ is the degree of $\chi _{n}^{\alpha \beta }$ and the sum is taken over all $(n-1)$-cells of $X$, considered as generators of ${C_{n-1}}(X_{n-1},X_{n-2})$.

## Examples

The following examples illustrate why computations done with cellular homology are often more efficient than those calculated by using singular homology alone.

### The n-sphere

The n-dimensional sphere S$^n$ admits a CW structure with two cells, one 0-cell and one n-cell. Here the n-cell is attached by the constant mapping from $S^{n-1}$ to 0-cell. Since the generators of the cellular chain groups ${C_{k}}(S_{k}^{n},S_{k-1}^{n})$ can be identified with the k-cells of S$^n$, we have that ${C_{k}}(S_{k}^{n},S_{k-1}^{n})=\mathbb {Z}$ for $k=0,n,$ and is otherwise trivial.
Hence for $n>1$, the resulting chain complex is
    $\dotsb {\overset {\partial _{n+2}}{\longrightarrow \,}}0{\overset {\partial _{n+1}}{\longrightarrow \,}}\mathbb {Z} {\overset {\partial _{n}}{\longrightarrow \,}}0{\overset {\partial _{n-1}}{\longrightarrow \,}}\dotsb {\overset {\partial _{2}}{\longrightarrow \,}}0{\overset {\partial _{1}}{\longrightarrow \,}}\mathbb {Z} {\longrightarrow \,}0,$
but then as all the boundary maps are either to or from trivial groups, they must all be zero, meaning that the cellular homology groups are equal to
    $H_{k}(S^{n})={\begin{cases}\mathbb {Z} &k=0,n\\\{0\}&{\text{otherwise.}}\end{cases}}$
When $n=1$, it is possible to verify that the boundary map $\partial _{1}$ is zero, meaning the above formula holds for all positive $n$.

### Genus g surface

Cellular homology can also be used to calculate the homology of the genus g surface $\Sigma _{g}$. The fundamental polygon of $\Sigma _{g}$ is a $4n$-gon which gives $\Sigma _{g}$ a CW-structure with one 2-cell, $2n$ 1-cells, and one 0-cell. The 2-cell is attached along the boundary of the $4n$-gon, which contains every 1-cell twice, once forwards and once backwards. This means the attaching map is zero, since the forwards and backwards directions of each 1-cell cancel out. Similarly, the attaching map for each 1-cell is also zero, since it is the constant mapping from $S^{0}$ to the 0-cell. Therefore, the resulting chain complex is
    $\cdots \to 0\xrightarrow {\partial _{3}} \mathbb {Z} \xrightarrow {\partial _{2}} \mathbb {Z} ^{2g}\xrightarrow {\partial _{1}} \mathbb {Z} \to 0,$
where all the boundary maps are zero. Therefore, this means the cellular homology of the genus g surface is given by
    $H_{k}(\Sigma _{g})={\begin{cases}\mathbb {Z} &k=0,2\\\mathbb {Z} ^{2g}&k=1\\\{0\}&{\text{otherwise.}}\end{cases}}$
Similarly, one can construct the genus g surface with a crosscap attached as a CW complex with one 0-cell, g 1-cells, and one 2-cell. Its homology groups are$H_{k}(\Sigma _{g})={\begin{cases}\mathbb {Z} &k=0\\\mathbb {Z} ^{g-1}\oplus \mathbb {Z} _{2}&k=1\\\{0\}&{\text{otherwise.}}\end{cases}}$

### Torus

The n-torus $(S^{1})^{n}$ can be constructed as the CW complex with one 0-cell, n 1-cells, ..., and one n-cell. The chain complex is $0\to \mathbb {Z} ^{\binom {n}{n}}\to \mathbb {Z} ^{\binom {n}{n-1}}\to \cdots \to \mathbb {Z} ^{\binom {n}{1}}\to \mathbb {Z} ^{\binom {n}{0}}\to 0$ and all the boundary maps are zero. This can be understood by explicitly constructing the cases for $n=0,1,2,3$, then see the pattern.
Thus, $H_{k}((S^{1})^{n})\simeq \mathbb {Z} ^{\binom {n}{k}}$ .

### Complex projective space

If $X$ has no adjacent-dimensional cells, (so if it has n-cells, it has no (n-1)-cells and (n+1)-cells), then $H_{n}^{CW}(X)$ is the free abelian group generated by its n-cells, for each $n$.
The complex projective space $\mathbb {C} P^{n}$ is obtained by gluing together a 0-cell, a 2-cell, ..., and a (2n)-cell, thus $H_{k}(\mathbb {C} P^{n})=\mathbb {Z}$ for $k=0,2,...,2n$, and zero otherwise.

### Real projective space

The real projective space $\mathbb {R} P^{n}$ admits a CW-structure with one $k$-cell $e_{k}$ for all $k\in \{0,1,\dots ,n\}$. The attaching map for these $k$-cells is given by the 2-fold covering map $\varphi _{k}\colon S^{k-1}\to \mathbb {R} P^{k-1}$. (Observe that the $k$-skeleton $\mathbb {R} P_{k}^{n}\cong \mathbb {R} P^{k}$ for all $k\in \{0,1,\dots ,n\}$.) Note that in this case, $C_{k}(\mathbb {R} P_{k}^{n},\mathbb {R} P_{k-1}^{n})\cong \mathbb {Z}$ for all $k\in \{0,1,\dots ,n\}$.
To compute the boundary map
    $\partial _{k}\colon C_{k}(\mathbb {R} P_{k}^{n},\mathbb {R} P_{k-1}^{n})\to C_{k-1}(\mathbb {R} P_{k-1}^{n},\mathbb {R} P_{k-2}^{n}),$
we must find the degree of the map
    $\chi _{k}\colon S^{k-1}{\overset {\varphi _{k}}{\longrightarrow }}\mathbb {R} P^{k-1}{\overset {q_{k}}{\longrightarrow }}\mathbb {R} P^{k-1}/\mathbb {R} P^{k-2}\cong S^{k-1}.$
Now, note that $\varphi _{k}^{-1}(\mathbb {R} P^{k-2})=S^{k-2}\subseteq S^{k-1}$, and for each point $x\in \mathbb {R} P^{k-1}\setminus \mathbb {R} P^{k-2}$, we have that $\varphi ^{-1}(\{x\})$ consists of two points, one in each connected component (open hemisphere) of $S^{k-1}\setminus S^{k-2}$. Thus, in order to find the degree of the map $\chi _{k}$, it is sufficient to find the local degrees of $\chi _{k}$ on each of these open hemispheres. For ease of notation, we let $B_{k}$ and ${\tilde {B}}_{k}$ denote the connected components of $S^{k-1}\setminus S^{k-2}$. Then $\chi _{k}|_{B_{k}}$ and $\chi _{k}|_{{\tilde {B}}_{k}}$ are homeomorphisms, and $\chi _{k}|_{{\tilde {B}}_{k}}=\chi _{k}|_{B_{k}}\circ A$, where $A$ is the antipodal map. Now, the degree of the antipodal map on $S^{k-1}$ is $(-1)^{k}$. Hence, without loss of generality, we have that the local degree of $\chi _{k}$ on $B_{k}$ is $1$ and the local degree of $\chi _{k}$ on ${\tilde {B}}_{k}$ is $(-1)^{k}$. Adding the local degrees, we have that
    $\deg(\chi _{k})=1+(-1)^{k}={\begin{cases}2&{\text{if }}k{\text{ is even,}}\\0&{\text{if }}k{\text{ is odd.}}\end{cases}}$
The boundary map $\partial _{k}$ is then given by $\deg(\chi _{k})$.
We thus have that the CW-structure on $\mathbb {R} P^{n}$ gives rise to the following chain complex:
    $0\longrightarrow \mathbb {Z} {\overset {\partial _{n}}{\longrightarrow }}\cdots {\overset {2}{\longrightarrow }}\mathbb {Z} {\overset {0}{\longrightarrow }}\mathbb {Z} {\overset {2}{\longrightarrow }}\mathbb {Z} {\overset {0}{\longrightarrow }}\mathbb {Z} \longrightarrow 0,$
where $\partial _{n}=2$ if $n$ is even and $\partial _{n}=0$ if $n$ is odd. Hence, the cellular homology groups for $\mathbb {R} P^{n}$ are the following:
    $H_{k}(\mathbb {R} P^{n})={\begin{cases}\mathbb {Z} &{\text{if }}k=0{\text{ and }}k=n{\text{ odd}},\\\mathbb {Z} /2\mathbb {Z} &{\text{if }}0<k<n{\text{ odd,}}\\0&{\text{otherwise.}}\end{cases}}$

## Other properties

One sees from the cellular chain complex that the $n$-skeleton determines all lower-dimensional homology modules:
    ${H_{k}}(X)\cong {H_{k}}(X_{n})$
for $k<n$.
An important consequence of this cellular perspective is that if a CW-complex has no cells in consecutive dimensions, then all of its homology modules are free. For example, the complex projective space $\mathbb {CP} ^{n}$ has a cell structure with one cell in each even dimension; it follows that for $0\leq k\leq n$,
    ${H_{2k}}(\mathbb {CP} ^{n};\mathbb {Z} )\cong \mathbb {Z}$
and
    ${H_{2k+1}}(\mathbb {CP} ^{n};\mathbb {Z} )=0.$

## Generalization

The Atiyah–Hirzebruch spectral sequence is the analogous method of computing the (co)homology of a CW-complex, for an arbitrary extraordinary (co)homology theory.

## Euler characteristic

For a cellular complex $X$, let $X_{j}$ be its $j$-th skeleton, and $c_{j}$ be the number of $j$-cells, i.e., the rank of the free module ${C_{j}}(X_{j},X_{j-1})$. The Euler characteristic of $X$ is then defined by
    $\chi (X)=\sum _{j=0}^{n}(-1)^{j}c_{j}.$
The Euler characteristic is a homotopy invariant. In fact, in terms of the Betti numbers of $X$,
    $\chi (X)=\sum _{j=0}^{n}(-1)^{j}\operatorname {Rank} ({H_{j}}(X)).$
This can be justified as follows. Consider the long exact sequence of relative homology for the triple $(X_{n},X_{n-1},\varnothing )$:
    $\cdots \to {H_{i}}(X_{n-1},\varnothing )\to {H_{i}}(X_{n},\varnothing )\to {H_{i}}(X_{n},X_{n-1})\to \cdots .$
Chasing exactness through the sequence gives
    $\sum _{i=0}^{n}(-1)^{i}\operatorname {Rank} ({H_{i}}(X_{n},\varnothing ))=\sum _{i=0}^{n}(-1)^{i}\operatorname {Rank} ({H_{i}}(X_{n},X_{n-1}))+\sum _{i=0}^{n}(-1)^{i}\operatorname {Rank} ({H_{i}}(X_{n-1},\varnothing )).$
The same calculation applies to the triples $(X_{n-1},X_{n-2},\varnothing )$, $(X_{n-2},X_{n-3},\varnothing )$, etc. By induction,
    $\sum _{i=0}^{n}(-1)^{i}\;\operatorname {Rank} ({H_{i}}(X_{n},\varnothing ))=\sum _{j=0}^{n}\sum _{i=0}^{j}(-1)^{i}\operatorname {Rank} ({H_{i}}(X_{j},X_{j-1}))=\sum _{j=0}^{n}(-1)^{j}c_{j}.$