I wanted to do category theory, not geometry, so the idea of studying simplexes didn’t seem very attractive at first. But as I was getting deeper into it, a very different picture emerged. Granted, the study of simplexes originated in geometry, but then category theorists took interest in it and turned it into something completely different. The idea is that simplexes define a very peculiar scheme for composing things. The way you compose lower dimensional simplexes in order to build higher dimensional simplexes forms a pattern that shows up in totally unrelated areas of mathematics… and programming. Recently I had a discussion with Edward Kmett in which he hinted at the simplicial structure of cumulative edits in a source file.

## Geometric picture

Let’s start with a simple idea, and see what we can do with it. The idea is that of triangulation, and it almost goes back to the beginning of the Agricultural Era. Somebody smart noticed long time ago that we can measure plots of land by subdividing them into triangles.

Why triangles and not, say, rectangles or quadrilaterals? Well, to begin with, a quadrilateral can be always divided into triangles, so triangles are more fundamental as units of composition in 2-d. But, more importantly, triangles also work when you embed them in higher dimensions, and quadrilaterals don’t. You can take any three points and there is a unique flat triangle that they span (it may be degenerate, if the points are collinear). But four points will, in general, span a warped quadrilateral. Mind you, rectangles work great on flat screens, and we use them all the time for selecting things with the mouse. But on a curved or bumpy surface, triangles are the only option.

Surveyors have covered the whole Earth, mountains and all, with triangles. In computer games, we build complex models, including human faces or dolphins, using wireframes. Wireframes are just systems of triangles that share some of the vertices and edges. So triangles can be used to approximate complex 2-d surfaces in 3-d.

## More dimensions

How can we generalize this process? First of all, we could use triangles in spaces that have more than 3 dimensions. This way we could, for instance, build a Klein bottle in 4-d without it intersecting itself.

We can also consider replacing triangles with higher-dimensional objects. For instance, we could approximate 3-d volumes by filling them with cubes. This technique is used in computer graphics, where we often organize lots of cubes in data structures called octrees. But just like squares or quadrilaterals don’t work very well on non-flat surfaces, cubes cannot be used in curved spaces. The natural generalization of a triangle to something that can fill a volume without any warping is a tetrahedron. Any four points in space span a tetrahedron.

We can go on generalizing this construction to higher and higher dimensions. To form an n-dimensional simplex we can pick $n+1$ points. We can draw a segment between any two points, a triangle between any three points, a tetrahedron between any four points, and so on. It’s thus natural to define a 1-dimensional simplex to be a segment, and a 0-dimensional simplex to be a point.

Simplexes (or simplices, as they are sometimes called) have very regular recursive structure. An n-dimensional simplex has $n+1$ faces, which are all $n-1$ dimensional simplexes. A tetrahedron has four triangular faces, a triangle has three sides (one-dimensional simplexes), and a segment has two endpoints. (A point should have one face–and it does, in the “augmented” theory). Every higher-dimensional simplex can be decomposed into lower-dimensional simplexes, and the process can be repeated until we get down to individual vertexes. This constitutes a very interesting composition scheme that will come up over and over again in unexpected places.

Notice that you can always construct a face of a simplex by deleting one point. It’s the point opposite to the face in question. This is why there are as many faces as there are points in a simplex.

## Look Ma! No coordinates!

So far we’ve been secretly thinking of points as elements of some n-dimensional linear space, presumably $\mathbb{R}^n$. Time to make another leap of abstraction. Let’s abandon coordinate systems. Can we still define simplexes and, if so, how would we use them?

Consider a wireframe built from triangles. It defines a particular shape. We can deform this shape any way we want but, as long as we don’t break connections or fuse points, we cannot change its topology. A wireframe corresponding to a torus can never be deformed into a wireframe corresponding to a sphere.

The information about topology is encoded in connections. The connections don’t depend on coordinates. Two points are either connected or not. Two triangles either share a side or they don’t. Two tetrahedrons either share a triangle or they don’t. So if we can define simplexes without resorting to coordinates, we’ll have a new language to talk about topology.

But what becomes of a point if we discard its coordinates? It becomes an element of a set. An arrangement of simplexes can be built from a set of points or 0-simplexes, together with a set of 1-simplexes, a set of 2-simplexes, and so on. Imagine that you bought a piece of furniture from Ikea. There is a bag of screws (0-simplexes), a box of sticks (1-simplexes), a crate of triangular planks (2-simplexes), and so on. All parts are freely stretchable (we don’t care about sizes).

You have no idea what the piece of furniture will look like unless you have an instruction booklet. The booklet tells you how to arrange things: which sticks form the edges of which triangles, etc. In general, you want to know which lower-order simplexes are the “faces” of higher-order simplexes. This can be determined by defining functions between the corresponding sets, which we’ll call face maps.

For instance, there should be two function from the set of segments to the set of points; one assigning the beginning, and the other the end, to each segment. There should be three functions from the set of triangles to the set of segments, and so on. If the same point is the end of one segment and the beginning of another, the two segments are connected. A segment may be shared between multiple triangles, a triangle may be shared between tetrahedrons, and so on.

You can compose these functions–for instance, to select a vertex of a triangle, or a side of a tetrahedron. Composable functions suggest a category, in this case a subcategory of Set. Selecting a subcategory suggests a functor from some other, simpler, category. What would that category be?

## The Simplicial category

The objects of this simpler category, let’s call it the simplicial category $\Delta$, would be mapped by our functor to corresponding sets of simplexes in Set. So, in $\Delta$, we need one object corresponding to the set of points, let’s call it $[0]$; another for segments, $[1]$; another for triangles, $[2]$; and so on. In other words, we need one object called $[n]$ per one set of n-dimensional simplexes.

What really determines the structure of this category is its morphisms. In particular, we need morphisms that would be mapped, under our functor, to the functions that define faces of our simplexes–the face maps. This means, in particular, that for every $n$ we need $n+1$ distinct functions from the image of $[n]$ to the image of $[n-1]$. These functions are themselves images of morphisms that go between $[n]$ and $[n-1]$ in $\Delta$; we do, however, have a choice of the direction of these morphisms. If we choose our functor to be contravariant, the face maps from the image of $[n]$ to the image of $[n-1]$ will be images of morphisms going from $[n-1]$ to $[n]$ (the opposite direction). This contravariant functor from $\Delta$ to Set (such functors are called pre-sheaves) is called the simplicial set.

What’s attractive about this idea is that there is a category that has exactly the right types of morphisms. It’s a category whose objects are ordinals, or ordered sets of numbers, and morphisms are order-preserving functions. Object $[0]$ is the one-element set $\{0\}$, $[1]$ is the set $\{0, 1\}$, $[2]$ is $\{0, 1, 2\}$, and so on. Morphisms are functions that preserve order, that is, if $n < m$ then $f(n) \leq f(m)$. Notice that the inequality is non-strict. This will become important in the definition of degeneracy maps.

The description of simplicial sets using a functor follows a very common pattern in category theory. The simpler category defines the primitives and the grammar for combining them. The target category (often the category of sets) provides models for the theory in question. The same trick is used, for instance, in defining abstract algebras in Lawvere theories. There, too, the syntactic category consists of a tower of objects with a very regular set of morphisms, and the models are contravariant Set-valued functors.

Because simplicial sets are functors, they form a functor category, with natural transformations as morphisms. A natural transformation between two simplicial sets is a family of functions that map vertices to vertices, edges to edges, triangles to triangles, and so on. In other words, it embeds one simplicial set in another.

## Face maps

We will obtain face maps as images of injective morphisms between objects of $\Delta$. Consider, for instance, an injection from $[1]$ to $[2]$. Such a morphism takes the set $\{0, 1\}$ and maps it to $\{0, 1, 2\}$. In doing so, it must skip one of the numbers in the second set, preserving the order of the other two. There are exactly three such morphisms, skipping either $0$, $1$, or $2$.

And, indeed, they correspond to three face maps. If you think of the three numbers as numbering the vertices of a triangle, the three face maps remove the skipped vertex from the triangle leaving the opposing side free. The functor is contravariant, so it reverses the direction of morphisms.

The same procedure works for higher order simplexes. An injection from $[n-1]$ to $[n]$ maps $\{0, 1,...,n-1\}$ to $\{0, 1,...,n\}$ by skipping some $k$ between $0$ and $n$.

The corresponding face map is called $d_{n, k}$, or simply $d_k$, if $n$ is obvious from the context.

Such face maps automatically satisfy the obvious identities for any $i < j$:

$d_i d_j = d_{j-1} d_i$

The change from $j$ to $j-1$ on the right compensates for the fact that, after removing the $i$th number, the remaining indexes are shifted down.

These injections generate, through composition, all the morphisms that strictly preserve the ordering (we also need identity maps to form a category). But, as I mentioned before, we are also interested in those maps that are non-strict in the preservation of ordering (that is, they can map two consecutive numbers into one). These generate the so called degeneracy maps. Before we get to definitions, let me provide some motivation.

## Homotopy

One of the important application of simplexes is in homotopy. You don’t need to study algebraic topology to get a feel of what homotopy is. Simply said, homotopy deals with shrinking and holes. For instance, you can always shrink a segment to a point. The intuition is pretty obvious. You have a segment at time zero, and a point at time one, and you can create a continuous “movie” in between. Notice that a segment is a 1-simplex, whereas a point is a 0-simplex. Shrinking therefore provides a bridge between different-dimensional simplexes.

Similarly, you can shrink a triangle to a segment–in particular the segment that is one of its sides.

You can also shrink a triangle to a point by pasting together two shrinking movies–first shrinking the triangle to a segment, and then the segment to a point. So shrinking is composable.

But not all higher-dimensional shapes can be shrunk to all lower-dimensional shapes. For instance, an annulus (a.k.a., a ring) cannot be shrunk to a segment–this would require tearing it. It can, however, be shrunk to a circular loop (or two segments connected end to end to form a loop). That’s because both, the annulus and the circle, have a hole. So continuous shrinking can be used to classify shapes according to how many holes they have.

We have a problem, though: You can’t describe continuous transformations without using coordinates. But we can do the next best thing: We can define degenerate simplexes to bridge the gap between dimensions. For instance, we can build a segment, which uses the same vertex twice. Or a collapsed triangle, which uses the same side twice (its third side is a degenerate segment).

## Degeneracy maps

We model operations on simplexes, such as face maps, through morphisms from the category opposite to $\Delta$. The creation of degenerate simplexes will therefore corresponds to mappings from $[n+1]$ to $[n]$. They obviously cannot be injective, but we may chose them to be surjective. For instance, the creation of a degenerate segment from a point corresponds to the (opposite) mapping of $\{0, 1\}$ to $\{0\}$, which collapses the two numbers to one.

We can construct a degenerate triangle from a segment in two ways. These correspond to the two surjections from $\{0, 1, 2\}$ to $\{0, 1\}$.

The first one called $\sigma_{1, 0}$ maps both $0$ and $1$ to $0$, and $2$ to $1$. Notice that, as required, it preserves the order, albeit weakly. The second, $\sigma_{1, 1}$ maps $0$ to $0$ but collapses $1$ and $2$ to $1$.

In general, $\sigma_{n, k}$ maps $\{0, 1, ... k, k+1 ... n+1\}$ to $\{0, 1, ... k ... n\}$ by collapsing $k$ and $k+1$ to $k$.

Our contravariant functor maps these order-preserving surjections to functions on sets. The resulting functions are called degeneracy maps: each $\sigma_{n, k}$ mapped to the corresponding $s_{n, k}$. As with face maps, we usually omit the first index, as it’s either arbitrary or easily deducible from the context.

Two degeneracy maps. In the triangles, two of the sides are actually the same segment. The third side is a degenerate segment whose ends are the same point.

There is an obvious identity for the composition of degeneracy maps:

$s_i s_j = s_{j+1} s_i$

for $i \leq j$.

The interesting identities relate degeneracy maps to face maps. For instance, when $i = j$ or $i = j + 1$, we have:

$d_i s_j = id$

(that’s the identity morphism). Geometrically speaking, imagine creating a degenerate triangle from a segment, for instance by using $s_0$. The first side of this triangle, which is obtained by applying $d_0$, is the original segment. The second side, obtained by $d_1$, is the same segment again.

The third side is degenerate: it can be obtained by applying $s_0$ to the vertex obtained by $d_1$.

In general, for $i > j + 1$:

$d_i s_j = s_j d_{i-1}$

Similarly:

$d_i s_j = s_{j-1} d_i$

for $i < j$.

All the face- and degeneracy-map identities are relevant because, given a family of sets and functions that satisfy them, we can reproduce the simplicial set (contravariant functor from $\Delta$ to Set) that generates them. This shows the equivalence of the geometric picture that deals with triangles, segments, faces, etc., with the combinatorial picture that deals with rearrangements of ordered sequences of numbers.

## Monoidal structure

A triangle can be constructed by adjoining a point to a segment. Add one more point and you get a tetrahedron. This process of adding points can be extended to adding together arbitrary simplexes. Indeed, there is a binary operator in $\Delta$ that combines two ordered sequences by stacking one after another.

This operation can be lifted to morphisms, making it a bifunctor. It is associative, so one might ask the question whether it can be used as a tensor product to make $\Delta$ a monoidal category. The only thing missing is the unit object.

The lowest dimensional simplex in $\Delta$ is $[0]$, which represents a point, so it cannot be a unit with respect to our tensor product. Instead we are obliged to add a new object, which is called $[-1]$, and is represented by an empty set. (Incidentally, this is the object that may serve as “the face” of a point.)

With the new object $[-1]$, we get the category $\Delta_a$, which is called the augmented simplicial category. Since the unit and associativity laws are satisfied “on the nose” (as opposed to “up to isomorphism”), $\Delta_a$ is a strict monoidal category.

Note: Some authors prefer to name the objects of $\Delta_a$ starting from zero, rather than minus one. They rename $[-1]$ to $\bold{0}$, $[0]$ to $\bold{1}$, etc. This convention makes even more sense if you consider that $\bold{0}$ is the initial object and $\bold{1}$ the terminal object in $\Delta_a$.

Monoidal categories are a fertile breeding ground for monoids. Indeed, the object $[0]$ in $\Delta_a$ is a monoid. It is equipped with two morphisms that act like unit and multiplication. It has an incoming morphism from the monoidal unit $[-1]$–the morphism that’s the precursor of the face map that assigns the empty set to every point. This morphism can be used as the unit $\eta$ of our monoid. It also has an incoming morphism from $[1]$ (which happens to be the tensorial square of $[0]$). It’s the precursor of the degeneracy map that creates a segment from a single point. This morphism is the multiplication $\mu$ of our monoid. Unit and associativity laws follow from the standard identities between morphisms in $\Delta_a$.

It turns out that this monoid $([0], \eta, \mu)$ in $\Delta_a$ is the mother of all monoids in strict monoidal categories. It can be shown that, for any monoid $m$ in any strict monoidal category $C$, there is a unique strict monoidal functor $F$ from $\Delta_a$ to $C$ that maps the monoid $[0]$ to the monoid $m$. The category $\Delta_a$ has exactly the right structure, and nothing more, to serve as the pattern for any monoid we can come up within a (strict) monoidal category. In particular, since a monad is just a monoid in the (strictly monoidal) category of endofunctors, the augmented simplicial category is behind every monad as well.

## One more thing

Incidentally, since $\Delta_a$ is a monoidal category, (contravariant) functors from it to Set are automatically equipped with monoidal structure via Day convolution. The result of Day convolution is a join of simplicial sets. It’s a generalized cone: two simplicial sets together with all possible connections between them. In particular, if one of the sets is just a single point, the result of the join is an actual cone (or a pyramid).

## Different shapes

If we are willing to let go of geometric interpretations, we can replace the target category of sets with an arbitrary category. Instead of having a set of simplexes, we’ll end up with an object of simplexes. Simplicial sets become simplicial objects.

Alternatively, we can generalize the source category. As I mentioned before, simplexes are a good choice of primitives because of their geometrical properties–they don’t warp. But if we don’t care about embedding these simplexes in $\mathbb{R}^n$, we can replace them with cubes of varying dimensions (a one dimensional cube is a segment, a two dimensional cube is a square, and so on). Functors from the category of n-cubes to Set are called cubical sets. An even further generalization replaces simplexes with shapeless globes producing globular sets.

All these generalizations become important tools in studying higher category theory. In an n-category, we naturally encounter various shapes, as reflected in the naming convention: objects are called 0-cells; morphisms, 1-cells; morphisms between morphisms, 2-cells, and so on. These “cells” are often visualized as n-dimensional shapes. If a 1-cell is an arrow, a 2-cell is a (directed) surface spanning two arrows; a 3-cell, a volume between two surfaces; e.t.c. In this way, the shapeless hom-set that connects two objects in a regular category turns into a topologically rich blob in an n-category.

This is even more pronounced in infinity groupoids, which became popularized by homotopy type theory, where we have an infinite tower of bidirectional n-morphisms. The presence or the absence of higher order morphisms between any two morphisms can be visualized as the existence of holes that prevent the morphing of one cell into another. This kind of morphing can be described by homotopies which, in turn, can be described using simplicial, cubical, globular, or even more exotic sets.

## Conclusion

I realize that this post might seem a little rambling. I have two excuses: One is that, when I started looking at simplexes, I had no idea where I would end up. One thing led to another and I was totally fascinated by the journey. The other is the realization how everything is related to everything else in mathematics. You start with simple triangles, you compose and decompose them, you see some structure emerging. Suddenly, the same compositional structure pops up in totally unrelated areas. You see it in algebraic topology, in a monoid in a monoidal category, or in a generalization of a hom-set in an n-category. Why is it so? It seems like there aren’t that many ways of composing things together, and we are forced to keep reusing them over and over again. We can glue them, nail them, or solder them. The way simplicial category is put together provides a template for one of the universal patterns of composition.

## Bibliography

1. John Baez, A Quick Tour of Basic Concepts in Simplicial Homotopy Theory
2. Greg Friedman, An elementary illustrated introduction to simplicial sets.
3. N J Wildberger, Algebraic Topology. An excellent series of videos.

## Acknowledgments

I’m grateful to Edward Kmett and Derek Elkins for reviewing the draft and for providing helpful suggestions.