Homology Calculator

To use this calculator, consider a shape (cell complex) and give a name to each face (cell) of the shape. For example, the diagram to the right represents a torus constructed with one 0-cell (named v), three 1-cells (named a, b, and c), and two 2-cells (named U and L).

In the first input box below, list the cells of each dimension. In the second input box, specify the boundary of each face in terms of the cells one dimension lower. The output box will list the (integral, cellular) homology or cohomology of the resulting shape, algebraic structures representing how the holes in each dimension fit together.

Click through the buttons under Example Inputs for a demo.

Torus Cell Structure
From Hatcher, p.102
Direct link to this computation

Example Inputs






Torus and Real Projective Plane simplicial complexes are based on SageMath's sage.topology.simplicial_complex_examples.
Interface Details

The Cell Names by Dimension box should consist of a number of lines, each line consisting of an integer, followed by a colon, followed by a comma-separated list of names in that dimension. Cell names can include ascii letters or digits or underscores, but cannot start with a digit.

Each line in the Boundary box should consist of a cell name, followed by a colon, followed by a chain of cells one dimension lower. A chain consists of a list of cell names, perhaps preceded by integer coefficients, separated by + and - signs. Semicolons (;) are treated the same as line breaks, so multiple cell boundaries can be specified in the same physical line. Whitespace other than line breaks is generally ignored.

The Homology Result box will display not only the isomorphism type of the homology in each dimension, but also specific chains representing homology classes that generate the direct summands of the Abelian group. The result will be be computed from dimension 0 (or lower) up to the dimension of the highest-dimensional cell. All groups not listed are trivial.

If the cohomology checkbox is checked, cohomology is computed instead of homology. For the listed generators, a cell a is identified with its dual cochain, so a(a)=1, but a(x)=0 for any cell x other than a.

How It Works

For an introduction to homology, see Hatcher's free textbook. Homology is defined as "(kernel of boundary) modulo (image of boundary)", often using the terminology "cycles modulo boundaries". More explicitly, if we define Ci to be chains (i.e. formal sums) of i-dimensional-cells, and let ∂i : CiCi−1 be the Abelian group homomorphism that maps a cell to its boundary, then we define Hi to be the quotient (ker ∂i) / (im ∂i+1) of Abelian groups.

Example 1

Suppose that x, y, z are 1-cells and each with boundary pq and that F is a 2-cell with boundary 2x − 2y. We'll compute H1.

First, ker ∂1 is

If we write u = xy and v = zy then ker ∂1 = 〈 u, v 〉 is the free Abelian group generated by u and v.

But since im ∂2 is generated by 2x − 2y = 2u, this shows that H1 = (ker ∂1) / (im ∂2) has the Abelian group presentation u, v | 2u = 0 〉, so H1 ≅ ℤ/2ℤ ⊕ ℤ. Click to compute Example 1.

Example 2

It's always true that ker ∂i is a free Abelian group because it's a subgroup of the free Abelian group Ci. This lines up with what we saw in Example 1. So beyond translating into new variables like in Example 1, the heart of the calculator must manipulate Abelian group presentations with several potentially complicated relations to get to a normalized form. We can do this with the Abelian group version of Tietze transformations.

Here's an example:

The above sort of Euclidean algorithm can be done systematically for many variables and relations simultaneously by working with matrices and using row and column operations to compute the Smith Normal Form of the matrices. See the source code here.

Click to compute the equivalent of Example 2. Generalizing from this example, you could treat this page as an Abelian group simplifier!