This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

# The algebra of cells

## Cells as building blocks

We know that we can decompose the $n$-dimensional Euclidean space into $n$-dimensional blocks, the $n$-cells. For example, this is how an object can be represented with pixels or tiles ($n=2$):

Some questions remain, such as: what about curves? Without making sense of curves we can't study such topological concepts as path-connectedness. Are curves also made of tiles? Such a curve would look like this:

If we look closer, however, this “curve” isn't a curve in the usual topological sense! After all, a curve is a continuous image of the $1$-dimensional interval $[a,b]$. In that sense, a curve is supposed to be $1$-dimensional.

The answer comes from our study of graphs: curves should be made of the edges. Then, a “discrete” -- but still Euclidean -- curve will look like this:

This idea isn't entirely abstract; just contrast these two images:

The complete cell decomposition of the pixel is shown below; the edges and vertices are shared with adjacent pixels:

Meanwhile, a mismatch of the dimensions also appears in the $3$-dimensional case if you try to use bricks, or voxels to make surfaces. Surfaces should be made of faces of our bricks, i.e., the tiles. This is what a “discrete” surface looks like:

It's $2$-dimensional!

The cell decomposition of the voxel follows and here, once again, the faces, edges, and vertices are shared:

One can interpret cells as, literally, the building blocks for everything:

• dimension $1$: sticks and wires;
• dimension $2$: tiles and plywood boards;
• dimension $3$: bricks and logs.

Exercise. Sketch this kind of discrete, “cellular”, representation for: a knotted circle, two interlinked circles, the sphere, the torus, the Möbius band.

Two adjacent edges, $1$-cells, share a vertex, i.e., a $0$-cell:

Two adjacent pixels, $2$-cells, share an edge, i.e., a $1$-cell:

Two adjacent voxels, $3$-cells, share a face, i.e., a $2$-cell:

The hierarchy becomes clear.

Thus, our approach to decomposition of space, in any dimension, boils down to the following:

The $n$-dimensional space is composed of cells in such a way that $k$-cells are attached to each other along $(k-1)$-cells, $k=1,2,...,n$.

Exercise. What are the open sets of this space?

Exercise. Explain -- in terms of open, closed sets, etc. -- the topological meaning of adjacency.

## Cubical cells

From many possible decompositions of the plane into “cells” we choose squares:

Here and elsewhere we use the following coloring convention:

• red vertices,
• green edges,
• blue faces,
• orange cubes.

Example (dimension 1). We should start with dimension ${\bf 1}$ though:

Here the cells are:

• a vertex, or a $0$-cell, is $\{ n\}$ with $n=...-2,-1,0,1,2,3,...$;
• an edge, or a $1$-cell, is $[n, n + 1]$ with $n=...-2,-1,0,1,2,3,...$.

Here,

• $1$-cells are attached to each other along $0$-cells.

$\square$

Example (dimension 2). Meanwhile, for the dimension ${\bf 2}$ grid, we define (closed) cubical cells for all integers $n,m$ as products:

• a vertex, or a $0$-cell, is $\{ n\} \times \{ m\}$;
• an edge, or a $1$-cell, is $\{n \} \times [m, m + 1]$ or $[n, n + 1] \times \{m \}$;
• a square, or a $2$-cell, is $[n, n + 1] \times [m, m + 1]$.

Here,

• $2$-cells are attached to each other along $1$-cells and, still,
• $1$-cells are attached to each other along $0$-cells.

$\square$

Example.

Cells shown above are:

• $0$-cell $\{3\}\times \{3\}$;
• $1$-cells $[2,3]\times\{1\}$ and $\{2\}\times [2,3]$;
• $2$-cell $[1,2]\times [1,2]$.

$\square$

We can define open cells also as products:

• a vertex is $\{ n\} \times \{ m\}$;
• an open edge is $\{n \} \times (m, m + 1)$ or $(n, n + 1) \times \{m \}$;
• the inside of a square is $(n, n + 1) \times (m, m + 1)$.

The difference is that under the former approach, the closed cells overlap and, therefore, can be glued together to form objects, while under the latter, the open cells are disjoint and produce a partition of the space. The way we will combine these cells, the open and closed cells will be exactly matched. Therefore, it won't matter which decomposition is used.

Exercise. Show that the union of the bases of all open cells in the Euclidean space ${\bf R}^N$ form its basis. What about the closed cells?

Example (dimension 3). For all integers $n,m,k$ we have:

• a vertex, or a $0$-cell, is $\{ n\} \times \{ m\}\times \{ k\}$;
• an edge, or a $1$-cell, is $\{n \} \times [m, m + 1]\times \{ k\}$ etc;
• a square, or a $2$-cell, is $[n, n + 1] \times [m, m + 1]\times \{ k\}$ etc.
• a cube, or a $3$-cell, is $[n, n + 1] \times [m, m + 1]\times [k, k + 1]$.

$\square$

What we see here is the $N$-dimensional Euclidean space decomposed into $0$-, $1$-, ... $N$-cells in such a way that

• $N$-cells are attached to each other along $(N-1)$-cells,
• $(N-1)$-cells are attached to each other along $(N-2)$-cells,
• ...
• $1$-cells are attached to each other along $0$-cells.

Definition. In the $N$-dimensional grid, ${\bf Z}^N$, a cube is the subset of ${\bf R}^N$ given by the product with $N$ components: $$P:=I_1\times ... \times I_N,$$ such that its $i$th component is either

• an edge $I_i=[m_i,m_i+1],$ or
• a vertex $I_i=\{m_i\},$

in the $i$th coordinate axis of the grid. The cube is $k$-dimensional, $\dim P=k$, and is also called a (cubical) cell of dimension $k$, or a $k$-cell, when there are $k$ edges and $N-k$ vertices on this list. A face of $P$ is also a cube given by the same product as $P$ with some of the edges replaced with vertices.

Notation. The set of all these cubes in ${\bf R}^N$ will be denoted by ${\mathbb R}^N$.

Exercise. Show that any $(k−1)$-dimensional face of a $(k+1)$-dimensional cube $P$ is a common face of exactly two $k$-dimensional faces of $P$.

Exercise. For $k \le 6$, determine the number of vertices and the number of edges of a $k$-cube.

Exercise. Count all faces of a $4$-cube.

## Boundaries of cubical cells

Before we start with the topological analysis of subsets of the Euclidean space made of cubes, let's review what we have learned studying the topology of graphs.

The topology of a graph is determined by what the edges do. The list of what can happen is short:

• some edges connect components of the graph or they don't, and
• some edges form loops or they don't.

To detect these events, we looked at how each edge is attached to the nodes and vice versa. That information is found by detecting which nodes are the end-points of which edges. It is simple:

• the end-points of an edge $e=AB$, a $1$-cell, are the two nodes $A,B$, $0$-cells, that form its boundary $\partial e$.

The idea is fully applicable to our new setting. Starting with the $0$- and $1$-cells of our grid, we are in the exact same situation: the boundary of an edge is still the sum of its end-points:

The algebraic tool we used was the boundary operator: $$\partial (AB)=A+B.$$ The main lesson of our study of the topology of graphs is:

boundaries are chains of cells,

i.e., formal sums of cells. More precisely,

the boundary of a $k$-cell is a chain of $(k-1)$-cells.

Exercise. How do the homology groups of a graph change if we add an edge? In other words, compare $H_0(G),H_1(G)$ with $H_0(K),H_1(K)$, where $H,K$ are two graphs satisfying $N_K=N_G,E_K=E_G\cup \{e\}$. Hint: consider two cases.

Example. Let's see what this looks like in our new, cubical notation. It is simple in ${\mathbb R}^1$: $$\partial([n,n+1])=\{n\}+\{n+1\}.$$ And it looks similar for ${\mathbb R}^2$: $$\begin{array}{ll} \partial([n,n+1]\times \{k\}) &=(\{n\}+\{n+1\})\times \{k\}\\ &=\{n\}\times \{k\}+\{n+1\}\times \{k\}. \end{array}$$ $\square$

Further, our approach is uniform throughout all dimensions:

• The boundary of an edge, $1$-cell, consists of its two end-points, $0$-cells;
• The boundary a square, $2$-cell, consists of its four edges, $1$-cells;
• The boundary of a cube, $3$-cell, consists of its six faces, $2$-cells;
• etc.

The boundary, denoted by $\partial$, can be thought of in three different ways depending on the context:

• if the cell $\sigma$, or the union of cells $\sigma := \cup _i \sigma _i$, is thought of as a subset of the Euclidean space ${\bf R}^N$, then its boundary $\partial \sigma$ is also a subset of ${\bf R}^N$;
• if the cell $\sigma$ (dimension $m$), or cells $\{ \sigma _i \}$, is thought of as a collection of cells, then its boundary $\partial \sigma$ is also a collection of cells (dimension $(m-1)$);
• if the cell $\sigma$, or a sum of cells $\sigma := \sum_i \sigma _i$, is thought of as a chain, then its boundary $\partial\sigma = \sum_i \partial\sigma _i$ is also a chain.

The last interpretation is the one we are after.

Example. Let's compute boundaries of the cells from last subsection (${\mathbb R}^2$):

• $0$-cell $\{3\}\times \{3\}$;
• $1$-cells $[2,3]\times\{1\}$ and $\{2\}\times [2,3]$;
• $2$-cell $[1,2]\times [1,2]$.

The boundary of a vertex is empty. Algebraically, $$\partial \{(3, 3) \} = 0.$$

The boundary of an edge is a combination of its end-points, or algebraically, $$\partial \left([2,3] \times \{1 \}\right) = \{(2,1) \} + \{(3,1) \},$$ $$\partial \left(\{2 \} \times [2,3]\right) = \{(2,2) \} + \{(2,3) \}.$$

Finally, the square: $$\partial \left([1,2] \times [1,2]\right) = [1,2] \times \{1 \} + \{1 \} \times [1,2] + [1,2] \times \{1 \} + \{2 \} \times [1,2].$$ To confirm that this makes sense, let's factor and rearrange the terms: $$\begin{array}{ll} = [1,2] \times \left( \{1 \} + \{2 \} \right) & + \left( \{1 \} + \{2 \} \right) \times [1,2] \\ = [1,2] \times \partial [1,2] & + \partial [1,2] \times [1,2]. \end{array}$$ We have linked the boundary of the product to the boundaries of its factors!

$\square$

The last result may be stated as: $$\partial (a \times b) = a \times \partial b + \partial a \times b.$$ It looks very much like the Product Rule for derivatives, except this time the order of factors matters.

We know how to compute the derivative of the product of, say, three functions. We simply apply the product rule twice, as follows: $$(fgh)'=((fg)h)'=(fg)'h+fgh'=(f'g+fg')h+fgh'=f'gh+fg'h+fgh'.$$ As you can see, there are as many terms as the functions involved and each contains all three, except one of them is replaced with its derivative. Applying the rule for boundaries above will have the exact same effect. This motivates the definition.

Definition. The boundary of a cubical cell $P$ in ${\mathbb R}^N$ given as the product: $$\begin{array}{llllllllll} &&P=&&I_1\times ... \times I_{k-1} \times I_k \times I_{k+1} ... \times I_N,\\ \text{is given by:}\\ &&\partial P :=& \sum _{k=1}^N &I_1\times ... \times I_{k-1} \times \partial I_k \times I_{k+1} ... \times I_N. \end{array}$$

Here, each term in the sum of $\partial P$ has the same components as $P$ except for one that is replaced with its boundary. Each component $I_k$ is either

• a vertex $A$, then $\partial I_k=\partial (A)=0$, or
• an edge $AB$, then $\partial I_k=\partial (AB)=A+B$.

Example. Let's illustrate the formula with an example of a $2$-cell in ${\mathbb R}^3$, below. Suppose $P$ is this horizontal square: $$P:=[a,b]\times [c,d] \times \{e\}.$$

Below, the formula is used, followed by simplification: $$\begin{array}{llll} \partial P&:=& &\partial([a,b]\times [c,d] \times \{e\})\\ &=& &\partial [a,b]\times [c,d] \times \{e\} \\ & &+&[a,b]\times \partial [c,d] \times \{e\}\\ & &+&[a,b]\times [c,d] \times \partial\{e\}\\ &=& &(\{a\}+\{b\})\times [c,d] \times \{e\} \\ & &+&[a,b]\times (\{c\}+\{d\}) \times \{e\}\\ & &+&[a,b]\times [c,d] \times 0\\ &=& &\{a\}\times [c,d] \times \{e\} +\{b\}\times [c,d] \times \{e\}\\ & &+&[a,b]\times \{c\} \times \{e\}+[a,b]\times \{d\} \times \{e\}. \end{array}$$ The last two lines give the two pairs of opposite edges that surround square $P$.

$\square$

Exercise. Compute the boundary of the cube below indicating in your answer its opposite faces:

Exercise. Prove that if $P$ is an $m$-cell, then every non-zero term in $\partial P$ is the sum of two $(m-1)$-cells that are a pair of opposite faces of $P$.

## Binary chains and their boundaries

Now, what about boundaries of more complex objects?

They are still made of cells and we simply think of them as formal sums of cells. Just as with graphs, we will call them chains. Since boundaries of chains of all dimensions can be empty, we adopt the convention that

$0$ is a $k$-chain, for any $k$.

Further, we need to combine their boundaries somehow to form the boundary of the object.

Take a look at these examples of chains that consist of two adjacent $k$-cells, $a$ and $b$, for $k=1,2,3$:

The two $k$-cells share a common face, a $(k-1)$-cell, $s$ (in the middle). This cell is special. In the combined boundary of the chain,

• it appears twice, but
• it shouldn't appear at all!

Our conclusion is that, for computing the boundary, this algebraic rule of cancellation should apply: $$2x = 0.$$ In other words, if a cell appears twice, it is canceled.

The computation is carried out as if we do algebra with binary arithmetic. That's why we can think of our chains both as finite “combinations” and finite binary sums of cells: $$a = \displaystyle\sum_i s_i \sigma_i, s_i \in {\bf Z}_2 .$$

In that case, with the boundary operator defined on each of the cells, one extends this definition to all chains: $$\partial_k(a) := \displaystyle\sum_i s_i \partial_k( \sigma_i ),$$ subject to the cancellation rule.

Let's confirm this idea with examples.

Example. A formal computation of the boundary of the chain representing two adjacent edges is below: $$\begin{array}{llllll} \partial \left( \{n \} \times [m, m + 1] + [n, n + 1] \times \{m \} \right) &= \partial \{n \} \times [m, m + 1] + \partial [n, n + 1] \times \{m \} \\ &= \{(n, m) \} + \{(n, m + 1) \} + \{(n, m) \} + \{(n + 1, m) \} \\ &= \{(n, m + 1) \} + \{(n + 1, m) \}. \end{array}$$ $\square$

We might prefer less complex notation just to give an idea of what is going on.

Example. Compute the boundary of a curve formed by edges:

$$\begin{array}{lllll} \partial (a + b + f + d + c) &= F + A + A + B + B + E + E + D + D + C \\ &\text{...cancellation...} \\ &= F + C. \end{array}$$ Only the end-points of the curve remain, as expected.

$\square$

Exercise. State this conclusion as a theorem and prove it.

Example. Compute the boundary of the union of two adjacent squares:

$$\begin{array}{cccccc} \partial (\alpha+\beta)&=&\partial\alpha& + & \partial\beta\\ & =&(a+f+e+g)& & +(b+c+d+f)\\ & =&a+e+g &+{\bf (f+f)} & + b+c+d\\ & =&a+e+g &+\qquad{\bf 0}& +b+c+d\\ & =&a+b &+c+d & +e+g. \end{array}$$ Only the outside edges appear, as expected.

$\square$

In conclusion, the boundary of a region formed by a collection of squares, i.e., a $2$-chain with $N=2$, is made of its “external” edges. Now, each edge is shared by two squares, but

• an “external” edge is shared by one square in the collection and one not in the collection, while
• an “internal” edge is shared by two squares in the collection.

After application of the boundary operator,

• each “external” edge appears once and stays, while
• each “internal” edge appears twice and cancels:

Exercise. Provide a similar analysis (with sketches) for a collection of edges and a collection of cubes.

Beyond dimension $3$, however, sketches and other visualization becomes impossible and we will have to rely exclusively on algebra.

## The chain groups and the chain complex

Suppose the ambient dimension $N$ is fixed as well as the integer grid ${\bf Z}^N$ of the Euclidean space ${\bf R}^N$. We will use the following notation.

Notation:

• ${\mathbb R}^N$ is the set of all cells (of all dimensions) in the grid,
• $C_k(L)$ is the set of all $k$-chains in a given collection $L\subset {\mathbb R}^N$ of cells, and, in particular,
• $C_k:=C_k({\mathbb R}^N)$ is the set of all $k$-chains in ${\mathbb R}^N$.

We will call $C_k(L)$ the $k$th chain group of $L$ and we call $C_k$ the total $k$-th chain group.

Definition. Given a $k$-chain $s\in C_k$, $$s = a_1 + a_2 + ... + a_n,$$ where $a_1, a_2, ..., a_n$ are $k$-cells, the boundary $\partial s$ of $s$ is given by $$\partial s := \partial a_1 + \partial a_2 + ... + \partial a_n.$$

So, the boundaries of $k$-cells are $(k-1)$-chains, and, moreover, the boundaries of $k$-chains are $(k-1)$-chains as well. Thus, boundaries are found by a well-defined function $$\partial =\partial _k: C_{k} \to C_{k-1}.$$ It is called the $k$th boundary operator.

As before, we notice that this function is simply an extension of a function defined on the generators of a group to the rest of the group -- by additivity. Therefore, we have the following.

Theorem. The boundary operator is a homomorphism.

We now present the big picture of the algebra of chains and their boundaries.

The homomorphisms $\partial _k\: C_{k} \to C_{k-1},\ k=1,2,...$, if written consecutively, form a sequence: $$\newcommand{\ra}{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!} \begin{array}{cccccccccccccccccccc} C_{N} & \ra{\partial_N} & C_{N-1} & \ra{\partial_{N-1}} & ... & \ra{\partial_{k+2}} & C_{k+1} & \ra{\partial_{k+1}} & C_{k} & \ra{\partial_k} & ... & \ra{\partial_1} & C_{0}. \end{array}$$ As always, consecutive arrows are understood as compositions. Since we want all these groups treated uniformly, we append this sequence with two more items, one in the beginning and one at the end. Both are zero groups: $$\newcommand{\ra}{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!} \begin{array}{cccccccccccccccccccc} 0&\ra{\partial_{N+1}}&...&... &... &... &\ra{\partial_0}&0. \end{array}$$ The two groups are attached to the rest of the sequence with homomorphisms that are, of course, zero. The result is this sequence of groups and homomorphisms called the ‘‘chain complex’’ of ${\mathbb R}^N$, or the total chain complex: $$\newcommand{\ra}{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!} \begin{array}{cccccccccccccccccccc} 0&\ra{\partial_{N+1}=0}&C_{N}&\ra{\partial_N}&...&\ra{\partial_{k+1}}&C_{k}&\ra{\partial_k}&...&\ra{\partial_1}&C_{0}&\ra{\partial_0=0}&0. \end{array}$$

As we know, the chain groups $C_k(L),\ k=0,1,2,...$, can be defined for any set $L\subset {\mathbb R}^N$ of $k$-cells. They are subgroups of $C_k=C_k({\mathbb R}^N)$. Moreover, the chain complex comprised of these groups can be constructed in the identical way as the one for the total chain groups -- if we can make sense of how the boundary operators is defined on these groups: $$\partial ^L _{k}:C_{k}(L)\to C_{k-1}(L),\ \forall k=1,2,3,....$$ Of course, these are the same cells and they have the same boundaries. That's why we define these homomorphisms as the restrictions of the boundary operators we have for the whole ${\mathbb R}^N$: $$\partial ^L _{k} :=\partial _k\Big|_{C_{k}(L)}.$$ To make sure that these are well-defined, we need the boundaries of the chains in $C_k(L)$ to be chains in $C_{k-1}(L)$: $$\partial_k(C_k(L)) \subset C_{k-1}(L).$$ This algebraic condition is ensured by a simple completeness requirement on the set $L$ itself, below.

Definition. Suppose a set of cells $L\subset {\mathbb R}^N$ satisfies:

• if $L$ contains a cell $a$, it also contains all of $a$'s faces.

Then $L$ is called a cubical complex.

The appearances of $L$ in the formulas will be routinely omitted and the chain complex of $L$ will look exactly like the one for the total chain complex. These groups and homomorphisms contain all topological information encoded in the cubical complex.

Exercise. For $L={\mathbb R}^N$, find out when $\partial_k$ is surjective or injective.

## Cycles and boundaries

Following the ideas that have arisen from our study of topology of graphs, we introduce the following definitions for a given cubical complex $K$ and each $k=0,1,...$.

Definition.

• A $k$-chain is called a $k$-cycle if its boundary is zero, and the $k$th cycle group is a subgroup of $C_k$ given by

$$Z_k=Z_k(K):=\ker \partial_k.$$

• A $k$-chain is called a $k$-boundary if it's the boundary of a $(k+1)$-chain, and the $k$th boundary group is a subgroup of $C_k$ given by

$$B_k=B_k(K):=\operatorname{Im} \partial_{k+1}.$$

Next, let's see what form the chain complex takes if we limit ourselves to graphs. To do that we simply choose the cubical complex $K$ to consist of all $0$- and $1$-cells.

This is how we visualize boundaries and cycles, in the only two relevant dimensions:

The chain complex is short: $$\newcommand{\ra}{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!} \begin{array}{cccccccccccc} 0 & \ra{\partial_2} & C_{1} & \ra{\partial_1} & C_{0} & \ra{\partial_0} & 0. \end{array}$$ Of course, the diagram immediately leads to these two “triviality” conditions:

• $\partial _0=0,$
• $\partial _2=0.$

This is the reason why, for graphs, we only had to deal with a single boundary operator, i.e., $\partial _1$.

Another consequence of those two identities is these two familiar observations:

• every $0$-chain is a cycle, and
• the only $1$-boundary is $0$.

In other words,

• $Z_0=C_0$, and
• $B_1=0$.

The result would significantly simplify the analysis we are considering in the narrow case of graphs.

Exercise. What happens to the chain complex and these identities if we add to $K$ a single $2$-cell?

In the general case, the last two identities do reappear:

• $Z_0=C_0$, and
• $B_N=0$,

as a result of the triviality of the boundary operators at the ends of the chain complex: $$\newcommand{\ra}{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!} \begin{array}{rrrrrrrrrrr} 0& \ra{\partial_{N+1}=0} &C_N& \ra{\partial_{N}=?}& ... &\ra{\partial_{1}=?} & C_0 &\ra{\partial_{0}=0} &0 . \end{array}$$ The simplification this brings, however, is limited to these extreme dimensions.

Further, both the cycle groups $Z_k$ as the kernels and the boundary groups $B_k$ as the images of the boundary operators can be connected to each other, as shown in this diagram: $$\newcommand{\ra}{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!} \begin{array}{rrrrrrrrrrr} & \ra{\partial_{k+2}} & 0\in Z_{k+1}=\ker \partial _{k+1} & \ra{\partial_{k+1}} & 0\in Z_k =\ker \partial _{k} & \ra{\partial_{k}} & 0\in Z_{k-1}=\ker \partial _{k-1} & \ra{\partial_{k-1}} \\ & & \cap \qquad & & \cap \quad & & \cap \qquad & & \\ & \ra{\partial_{k+2}}& \operatorname{Im} \partial _{k+2}=B_{k+1}\subset C_{k+1} & \ra{\partial_{k+1}} & \operatorname{Im} \partial _{k+1}=B_k \subset C_{k} & \ra{\partial_{k}} & \operatorname{Im} \partial _{k} =B_{k-1}\subset C_{k-1} & \ra{\partial_{k-1}} \end{array}$$

But these pairs of groups have an even more intimate relation...

## Homology is the relation between boundaries and cycles

What is the boundary of a boundary?

Dimension $0$. The boundary of a vertex is zero, so the answer is zero.

Dimension $1$. The boundary of an edge is the sum of its two end-points and the boundaries of those are zero. So the answer is zero again.

Dimension $2$. The boundary of a square is the sum of its four edges. The boundary of each of those is the sum of its two end-points, or the vertices of the square. Each vertex appears twice and... the answer is zero again.

Example. To confirm this algebraically, compute the boundary of the boundary of a $2$-cell: $$\begin{array}{lllllll} \partial _1\partial _2 [n, n + 1] \times [m, m + 1] \\ = \partial _1( [n, n + 1] \times \{m \} + \{n \} \times [m, m + 1] + [n, n + 1] \times \{m + 1 \} + \{n + 1 \} \times [m, m + 1] ) \\ {\rm ... } \\ = 0. \end{array}$$ $\square$

We can go on.

Dimension $3$. The boundary of a cube is the sum of its six square faces. The boundary of each of those is the sum of its four edges. Since these are the edges of the cube and each appears twice,... the answer is zero again:

Exercise. Prove the $n$-dimensional case.

So, at least for the cells, the boundary of the boundary is zero. So, $$\partial _k\partial _{k+1} (x)=0$$ for any $(k+1)$-cell $x$. Colloquially,

the boundary of a boundary is zero.

Since the $(k+1)$-cells are the generators of the chain group $C_{k+1}$ and the values of the homomorphism $\partial _k\partial _{k+1}$ are zeroes, it follows that the whole homomorphism is $0$: $$\partial _k\partial _{k+1} \left(\sum_i s_{i}\right)=\sum_i \partial _k\partial _{k+1} (s_{i})=\sum_i \ 0=0.$$ The composition is trivial!

Theorem (Double Boundary). The composition of two boundary operators $$\partial _{k}\partial _{k+1}:C_{k+1}\to C_{k-1}$$ is zero.

Any sequence of groups and homomorphisms: $$\newcommand{\ra}{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!} \begin{array}{ccccccccccccccccc} G_{N} & \ra{f_N} & G_{N-1} & \ra{f_{N-1}} & ... & \ra{f_2} & G_{1} & \ra{f_1} & G_{0}, \end{array}$$ that satisfies $f_kf_{k+1}=0,\ \forall k=1,...,N-1$, is called a chain complex.

Exercise. Give an example of a chain complex with $f_k \ne 0,\ \forall k=2,...,N-1$.

The compact form of the identity is: $$\begin{array}{|c|} \hline \partial \partial = 0\\ \hline\end{array}$$

The conclusion holds for any cubical complex $K\subset {\mathbb R}^N$.

Corollary. For any cubical complex $K$, $$\partial _{k}\partial _{k+1}=0:C_{k+1}(K)\to C_{k-1}(K),\ \forall k=1,2,3,....$$

Therefore, the answer to the question in the title is

every boundary is a cycle.

In other words, we have the following:

Corollary. For any cubical complex $K$, $$B_k(K)\subset Z_k(K),\ \forall k=0,1,2,...$$

The condition $\operatorname{Im} \partial_{k+1} \subset \ker \partial_k$ is commonly illustrated by this informal diagram:

That's what makes defining homology groups possible.

Definition. The $k$th homology group, $k=0,1,2,3,...$, of a cubical complex $K$ is defined by $$H_k(K):=Z_k(K) / B_k(K).$$

In other words, two $k$-cycles are equivalent, homologous, if they form the boundary of a $(k+1)$-chain.

Exercise. Demonstrate that this definition generalizes the one for graphs.

The chain complex together with the kernels and the images of the boundary operators is given below: $$\newcommand{\ra}{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!} \begin{array}{ccccccccccccc} & \ra{\partial_{k+2}} & C_{k+1}& \ra{\partial_{k+1}} & C_{k}& \ra{\partial_{k}} & C_{k-1}& \ra{\partial_{k-1}} \\ & & \cup & & \cup & & \cup & & \cup \\ & \ra{\partial_{k+2}} & 0\in Z_{k+1}=\ker \partial _{k+1} & \ra{\partial_{k+1}} & 0\in Z_k =\ker \partial _{k} & \ra{\partial_{k}} & 0\in Z_{k-1}=\ker \partial _{k-1} & \ra{\partial_{k-1}} \\ & & \cup & & \cup & & \cup & & \\ & \ra{\partial_{k+2}}& \operatorname{Im} \partial _{k+2}=B_{k+1}\subset C_{k+1} & \ra{\partial_{k+1}} & \operatorname{Im} \partial _{k+1}=B_k \subset C_{k} & \ra{\partial_{k}} & \operatorname{Im} \partial _{k} =B_{k-1}\subset C_{k-1} & \ra{\partial_{k-1}} \end{array}$$

## When is every cycle a boundary?

We have demonstrated that the boundary of every cycle is zero. Indeed, a chain can't possibly enclose something inside if it has a boundary. Informally, this is because at the boundary is where the inside would be connected to the outside and, therefore, there is no inside and outside!

So,

not cycle $\Rightarrow$ not boundary,

or

boundary $\Rightarrow$ cycle,

or $$B_k \subset Z_k.$$

Now, the other way around:

is every cycle a boundary?

Not if there is some kind of a hole in the space! Then, let's limit ourselves to the whole grid ${\mathbb R}^N$, which has no topological features: components, tunnels, voids, etc.; so, it may be true.

We start with $1$-cycles. The question we are asking is illustrated below:

And the picture suggests that the answer is “Yes”. Indeed, a rubber band standing on its edge on a table would surround a certain area:

To make specific what the band bounds, we fill it with water to make it look like an above-the-ground pool:

But what if the rubber band is twisted?

In dimension $3$, it is better to think of this problem as a soap film spanned on a possibly curved frame:

The answer still seems to be Yes, but try to stretch a film on a frame that isn't just curved but knotted too:

We will see that the answer is still “Yes, in a space of any dimension cycles are boundaries”. The conclusion applies equally to chains of all dimensions. For example, an air-balloon when closed (cycle!) will keep the air inside (boundary!). One can think instead of a wrapper bounding something more solid:

Our conclusion affects the chain complex of the entire grid ${\mathbb R}^N$ as follows: $$\operatorname{Im}\partial _{k+1} =\ker \partial _k,\ k>0.$$ In other words, the image isn't just a subset of, but is equal to the kernel, exactly. The diagram is much simpler than in the general case:

Definition. A sequence of groups and homomorphisms $f_k:G_k\to G_{k-1}$ is called exact if $\operatorname{Im}f_{k+1} =\ker f_{k}$.

Exercise. Complete these as exact sequences: $$\newcommand{\ra}{\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!} \begin{array}{ccccccccccccccccc} 0 & \ra{0} & ? & \ra{?} & {\bf R}^n & \ra{projection} & {\bf R}^m & \ra{0} &0,\\ 0 & \ra{0} & 2{\bf Z} & \hookrightarrow & {\bf Z} & \ra{?} & ? &\ra{0} &0, \end{array}$$ where $2{\bf Z}$ is the group of even integers.

In general, the chain complex of a proper subset of the grid is inexact as the presence of topological features causes some cycles not to be boundaries. The degree of this inexactness is measured by means of homology.

But what about the simplest case - chains of dimension $0$?

It's much simpler to visualize:

Mathematically, it's also simple. On the one hand, any one of the vertices on the grid is a cycle. On the other, every two vertices can be connected by a $1$-chain (just go vertical then horizontal). Therefore, any $0$-chain $a$ is the boundary of some $s\in C_1$ if $a$ has an even number of vertices present.

But what about the chains with an odd number of vertices, such as a single-vertex $0$-chain? It's not a boundary! The reason is that the boundary operator of any $1$-chain will always produce an even number of vertices, including the $0$ chain.

So, the answer to our question for $0$-cycles is “No, some of them aren't boundaries”. As it turns out, the $0$ dimension is an exception.

To make the $0$ dimension unexceptional, one can modify the definition of $0$-cycle to reduce them to those that contain an even number of vertices: $$\tilde{Z}_0:=\{z\in Z_0:\ z=r_1c_1+...+r_nc_n,r_1+...+r_n=0\}.$$ The result is the reduced homology that is sometimes more convenient: $$\tilde{H}_0 := \tilde{Z}_0 / B_0.$$ In particular, the homology of the whole space and of a single point is trivial, in all dimensions: $$\tilde{H}_0(\{p\}) =0.$$

Exercise. Prove that that all non-boundaries are homologous to each other.