----
> [!definition] Definition. ([[cellular homology]])
> Using what we know about [[how singular homology interacts with cell complexes]], we can formulate the following definition.
>
The **cellular chain complex** $C_{\bullet}^{\text{cell}}$ of a [[cell complex]] $X$ is defined by taking as the $n$th [[chain complex of modules|chain group]] $C_{n}^{\text{cell}}(X):=H_{n}(X^{n}, X^{n-1}) \cong \bigoplus_{\alpha \in I_{n}} \mathbb{Z} $
and as the $n$th differential the composition $\begin{align}
d_{n}^{\text{cell}}: \underbrace{C_{n}^{\text{cell}}(X)}_{H_{n}(X^{n}, X^{n-1})} \xrightarrow{\partial{}} H_{n-1}(X^{n-1}) \xrightarrow{q_{n-1}} \underbrace{C_{n-1}^{\text{cell}}(X)}_{H_{n-1}(X^{n-1}, X^{n-2})}
\end{align}$
where the intermediate maps are obtained as in [[long exact sequence for relative singular homology|long exact sequence for a pair]].
>
>
We call the [[(co)homology of a complex|homology]] of $C_{\bullet}^{\text{cell}}(X)$ the **cellular homology** of $X$. [[cellular and singular homology agree|It agrees]] with [[singular homology]].
> [!justification]
> We need to show that $C_{\bullet}^{\text{cell}}$ is indeed a [[chain complex of modules|chain complex]], i.e., that $d_{n+1}^{\text{cell}} \circ d_{n}^{\text{cell}}=0$. Write out this composition: $\begin{align}
H_{n}(X^{n},X^{n-1}) \xrightarrow{\partial}H_{n-1}(X^{n-1}) \textcolor{Thistle}{\xrightarrow{q_{n-1}}H_{n-1}(X^{n-1}, X^{n-2})} \\
\textcolor{Thistle}{\xrightarrow{\partial{}} H_{n-2}(X^{n-2})} \xrightarrow{q_{n-2}} H_{n-2}(X^{n-2}, X^{n-3})
\end{align} $
and notice that $\textcolor{Thistle}{\partial{} \circ q_{n-1}}=0$ because it is part of the long exact sequence we have for a pair. So the whole composition is zero.
^justification
> [!basicexample] Example. ( (Cellular) Homology of $\mathbb{S}^{2}$)
> Construct $\mathbb{S}^{2}$ by starting with a singleton $0$-skeleton $\beta$ and attaching a single copy $\alpha$ of $\mathbb{D}^{2}$ ('blow up the balloon'). Then $C_{\bullet}^{\text{cell}}: ( \dots \to 0 \to \mathbb{Z} \langle \alpha \rangle \to 0 \to \mathbb{Z} \langle \beta \rangle )$
the differentials are all forced to be zero, so it is easy to see that $H_{\bullet}^{\text{cell}}(\mathbb{S}^{2})=0 \ \ \mathbb{Z} \ \ 0 \ \ \mathbb{Z}.$
Notice how easy this computation was!
^basic-example
> [!basicexample] Example (Cellular homology of $\mathbb{R}\mathbb{P}^{n}$)
> Consider $\mathbb{R}\mathbb{P}^{n}=\mathbb{S}^{n} / (x \sim -x)$. Recall $\mathbb{R}\mathbb{P}^{n} \cong \mathbb{D}^{n} / (x \sim -x \text{ for } x \in \partial \mathbb{D}^{n})$, draw picture(s). In particular, removing the interior gives a copy of $\mathbb{S}^{n-1}$ with [[antipodal map|antipodal]] points identified — that is, a copy of $\mathbb{R}\mathbb{P}^{n-1}$. Thus, $\mathbb{R}\mathbb{P}^{n}= \mathbb{R}\mathbb{P}^{n-1} \cup_{f} \mathbb{D}^{n}$
> where the [[adjunction space|attaching map]] $f: \mathbb{S}^{n-1} \to \mathbb{R} \mathbb{P}^{n-1}$ is given by $f(x)=[x].$
> Put differently, $\mathbb{R}P^{n}$ is obtained from $\mathbb{R}P^{n-1}$ by attaching an $n$-cell with [[covering space|attaching map]] $\begin{align}
> \mathbb{S}^{n-1}& \xrightarrow[\text{(antipodal)}]{\text{2:1 quotient}}\mathbb{R}P^{n-1} \\
> v &\mapsto \{ \pm v \}.
> \end{align}$
> So $\mathbb{R}\mathbb{P}^{n}$ has a cell structure with one cell $e_{i}$ of every degree up to $1 \leq i \leq n$. What are the boundary maps? We know $e_{i}$ is attached per the map $f$ defined above, i.e. $f: \mathbb{S}^{n-1} \xrightarrow{\varphi} \mathbb{R}\mathbb{P}^{n-1} \twoheadrightarrow \frac{\mathbb{R}\mathbb{P}^{n-1}}{\mathbb{R}\mathbb{P}^{n-2}}\cong \mathbb{S}^{n-1}.$
> On the upper hemisphere $\mathbb{S}^{n-1}_{_{+}}$, this map is the [[identity map|identity]]. On the lower hemisphere $\mathbb{S}^{n-1}_{-}$, it is the [[antipodal map|antipodal map]]. [[degree is sum of local degrees|Using]] [[local degree]], get that the [[degree]] [[degree of the antipodal map|is]] $\text{deg}(\id)+\text{deg}(\text{antipodal})=1+(-1)^{n}$. So $d_{n}:\mathbb{Z} \to \mathbb{Z}$ is given by multiplication by $2$ if $n$ is even, and $0$ if $n$ is odd. Then $d_{n-1}$ switches: multiplication by $0$ if $n$ is even, and $2$ if $n$ is odd. And so on. So there are two possible chain complexes based on parity of $n$:
>
> $C_{\bullet}(\mathbb{R}P^{n})=\begin{cases}
> \overbrace{ \mathbb{Z} }^{ n } \xrightarrow{2} \overbrace{ \mathbb{Z} }^{ n-1 } \xrightarrow{0} \mathbb{Z} \xrightarrow{2} \mathbb{Z} \to \cdots \xrightarrow{2} \overbrace{ \mathbb{Z} }^{ 1 } \xrightarrow{0} \mathbb{Z} \to 0 & n \text{ even}
> \end{cases}$
>
> $H_{i}(\mathbb{R}P^{n})=\begin{cases}
> \mathbb{Z} & i=0 \\
> \mathbb{Z} / 2 & 1 \leq i \leq n-1 , i \text{ odd} \\
> 0 & 1 \leq i \leq n-1, i\text{ even } \\
> \begin{cases}
> 0 & n \text{ even} \\
> \mathbb{Z} &n \text{ odd }
> \end{cases} & i = n.
> \end{cases}$
> The top group being $\mathbb{Z}$ when $n$ is odd is representative of the fact that $\mathbb{R}P^{n}$ is [[on the orientability of real projective space|orientable]] if and only if $n$ is odd.
>
> Getting cohomology from this is easy, because the chain groups and differentials dualize to themselves. Here it is:
> $H^{i}(\mathbb{R}P^{n}): \begin{cases}
> \mathbb{Z} & i=0 \\
> 0 & i\text{ odd}, i<n \\
> \mathbb{Z} / 2 & i \text{ even}, 0 < i \leq n \\
> \mathbb{Z} & i=n \text{ is odd} \\
> 0 & \text{ otherwise.}
> \end{cases}$
>
>
>
$H^{i}(\mathbb{R}P^{2})=\begin{cases}
\mathbb{Z} / 2 & i=2 \\
0 & i=1 \\
\mathbb{Z} & i = 0
\end{cases}$
----
####
----
#### References
> [!backlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM [[]]
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```
> [!frontlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM outgoing([[]])
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```