Software! Math! Data! The blog of R. Sean Bowman
The blog of R. Sean Bowman

# Modules, Barcodes, and Applications

September 18 2015

I’d love to write more about persistent homology, and eventually I’ll get around to it, but right now I wanted to talk about some math that undergraduate math majors who know a little algebra can understand. Although this is prerequisite stuff for really understanding persistent homology, you’ll certainly be able to understand the basics of persistent homology without understaing this. You might not ever decide to, but you could also come back later, after you’ve learned a bit about persistent homology, to get an idea of how the details work. (I should mention that this stuff is worth studying because it’s cool in its own right, and one reason I’m writing it is as an opportunity for me to try to remember some of it!)

### PIDs and Modules

In an introductory algebra course (or perhaps a more advanced one, depending on your institution), you learn about the structure theorem for modules over a PID. Let’s remember what all that is. A PID is a ring $R$ for which every ideal is principal. These include rings like $\mathbb{Z}$, any field, and (most importantly for us here) any polynomial ring over a field. So if $F$ is a field and $x$ is a formal variable, $F[x]$ is a PID. Elements of $F[x]$ are polynomials with coefficients in $F$. For example, $-x^2 + 3x + 1$ is an element of $\R[x]$.

Now a module is a thing that’s a bit like a vector space, except instead of scalars belonging to a field, they belong to a ring. This turns out to make modules much richer in structure than vector spaces (or less well behaved, depending on your perspective). But, when the ring is a PID, things turn out much nicer. Earlier I alluded to a “structure theorem.” This means a theorem that tells us exactly what a mathematical object can look like, and usually gives a procedure for finding some canonical form for such an object.

### The usual structure theorem

So let $R$ be a PID and $M$ be an $R$–module. By various arguments which you can find in your algebra books, $M$ is isomorphic to some number of copies of $R$ together with some torsion subrings (rings of the form $R/(q)$, with $(q)$ being the ideal generated by $q$). In symbols,

#### Structure theorem for modules over a PID

If $R$ is a PID and $M$ is an $R$–module, then $M\cong R^n\oplus R/(q_1)\oplus\dots\oplus R/(q_m).$

This is a great theorem with lots of corollaries: the classification of finite dimensional vector spaces and the structure theorem for abelian groups are two. But let’s take a look at a more specific situation.

### A more specific structure theorem

What if $R$ is actually a polynomial ring over a field, $F[x]$ as above? We know that $F[x]$ is a PID, and so the structure theorem holds. But more is true here: $F[x]$ has the structure of a graded ring. A ring $R$ is graded if it decomposes as a direct sum of abelian groups under $+$,

$R = \bigoplus_i R_i$

and this decomposition is compatible with multiplication in the sense that if $a\in R_n$ and $b\in R_m$, then $ab\in R_{n+m}$. A graded module is defined similarly; see Wikipedia for a good summary. In any case,

$F[x] = F \oplus xF \oplus x^2F \oplus\dots,$

and it’s not difficult to see that this defines a grading on $F[X]$. As an example, if $F=\R$ and $R_i = x^i\R$, then $3x^2\in R_2$ and $-5x^3\in R_3$. Their product, $-15x^5$, belongs to $R_5 = R_{2+3}$.

Now I haven’t checked each one, but I suspect that if you go through your favorite proof of the structure theorem keeping in mind the graded structure your ring and module possess, you obtain a similar result where the decomposition of $M$ looks something like this:

#### Structure theorem for modules over a graded PID

Suppose $F$ is a field and $M$ is an $F[x]$–module. Then $M\cong \bigoplus x^{t_i}F[x] \oplus x^{r_1}(F[x]/x^{s_1}F[x]) \oplus\dots\oplus x^{r_m}(F[x]/x^{s_m}F[x])$ for nonnegative integers $t_1,\dots,t_n$, $r_1,\dots, r_m$, and $s_1,\dots, s_m$.

Similar, except the constituents are shifted by a power of the formal variable. Just as we can encode all the information for the case when $R=\mathbb{Z}$, say, by the numbers $n$ and all the $q_i$, here we can record the $t_i$, $r_j$, and $s_j$ parameters. This is often represented as a barcode, a graphical representation of horizontal lines. Some start at $t_i$ and to all the way to the right, and the rest start at $r_j$ and end at $r_j+s_j$. A barcode encodes all the information contained in a module over $F[x]$. Here’s an example. Try to think of the $F[x]$ module this represents. Did you guess $xF[x]\oplus x(F[x]/xF[x])\oplus x(F[x]/xF[x])\oplus x(F[x]/x^4F[x])$? If so, good job!

Barcodes are used in topological data analysis as a way of visualizing the persistent homology of a space. An excellent survery by Rob Ghrist explains this and much, much more. Barcodes can give us an idea of what properties a space has (such as how many “holes” are in it), can be used to distinguish spaces from one another, and can be used for many more exciting things. This is a very active area of research, and if you’re interested I encourage you to learn more!

Approx. 868 words, plus code