← back

Syzygies and higher groupoids

August 29, 2026

You might have heard about \(\infty\)-category theory before. This is a subject which seems to have captured the popular imagination to some extent, despite not being used by most mathematicians. However, \(\infty\)-category theory is growing, and many fields -- including our own beloved arithmetic geometry! -- are finding it more and more useful to incorporate it.

The goal of this post is to give a sense of what \(\infty\)-groupoids are, and why they can be useful; \(\infty\)-groupoids are to \(\infty\)-category theory as sets are to ordinary category theory.

Mathematics got on just fine for a very long time without groupoids or \(\infty\)-groupoids, because the first situations where they become essential are a bit technical; in particular, we warn the reader that this post might be a bit more mathematically sophisticated than usual.

However, we did try to find the most basic situations in which \(\infty\)-groupoids could be used. One possible reaction to hearing about these basic uses of \(\infty\)-groupoids -- where we use them to solve problems that can also be solved without them -- is to think they are an overly complicated tool. However, they are quite essential for some purposes, and without them certain theorems would be much trickier to prove (or even correctly state!). We hope that these basic examples can be used to give the reader some idea about what situations \(\infty\)-groupoids help you with, even if it is possible to treat our situations by more elementary means.

One can compare this to the advent of calculus. In a first course on calculus, you might be asked to find the area under a parabola, or the volumes enclosed by various complicated solids. Historically, these sorts of questions arose, and were successfully answered, long before integrals were invented. However, when first learning the subject, it is hard to start with one of calculus's first totally novel applications, like Newton's derivation of Kepler's laws, even if those are what historically motivated people to learn and invent calculus.

With that in mind, let's get to some examples!

Equivalence relations

In mathematics, it is common to quotient a set by an equivalence relation. Roughly, this means declaring two different things to be equal.

At the moment this is a bit philosophical, so let's get concrete.

Equivalence relations often arise when one describes some type of object in a way such that multiple descriptions can correspond to the same object.

Fractions

For example, if you were programming fractions into a computer, it might be tempting to have your computer store each fraction as a pair of two integers -- a numerator and a denominator (top and bottom). Then \(\frac{1}{2}\) would correspond to the pair \((1, 2),\) the fraction \(\frac{3}{7}\) would correspond to the pair \((3, 7),\) and the fraction \(\frac{5}{10}\) would correspond to \((5, 10).\)

However, if you program fractions this way, you have to be careful when defining equality: as fractions, \(\frac{1}{2} = \frac{5}{10},\) but the ordered pairs \((1, 2)\) and \((5, 10)\) look very different! We have two different ways of encoding the same quantity.

This is our first example of something called an equivalence relation: an equivalence relation is just when you start with some set \(X,\) and declare that distinct elements in it are the same. Here, our set \(X\) is the set of all ordered pairs \((a, b)\) (maybe with \(b\neq 0,\) since 0 isn't a valid fraction denominator), and the equivalence relation says things like \[(1, 2) \sim (5, 10),\] \[(2, 3) \sim (8, 12),\] and so on, encoding the fact that, if we want to interpret the elements of \(X\) as a fractions, then distinct points of \(X\) correspond to the same fraction.

We could have just encoded fractions as pairs \(a,b\) such that \(a\) and \(b\) have no common factors. This also makes sure there are no "duplicate" encodings. While this approach is equally valid, some things are easier in Approach 1 than in Approach 2.

For example, how do you encode the multiplication of two fractions? Since \[\frac ab\cdot\frac cd=\frac{ac}{bd},\] we would like to define \[(a,b)\cdot(c,d)=(ac,bd).\] While this is an entirely valid formula in Approach 1, it does not make sense in Approach 2. For example, while \((1,2)\) and \((2,1)\) are both valid fractions in Approach 2, their product, \[(1,2)\cdot(2,1)=(2,2)\] is not a valid fraction. We would need to reduce the fraction to its lowest form, \((1,1)\). This is the advantage of Approach 1! In Approach 2 you only keep track of one valid representation of a fraction, but equivalence relations keep track of all valid representations of a fraction simultaneously!

Squares

As another example, let's say I have triangular pieces -- some amber and some teal -- and I want to build a square out of them.

A square is built out of four of my trianglular pieces, as shown below. If I was giving instructions to a robot on how to build the squares, I might give it just a string of 4 characters -- maybe I'd give the string ATAT to mean "make the left triangle amber, the top triangle teal, the right triangle amber, and the bottom triangle teal."

When a square is assembled in the real world, though, it can be rotated or flipped around, and so different strings of instructions correspond to the same finished square. In the widget below, you can flip through all the 16 possible instructions I could give the robot, and see how there are only 6 possible squares.

Interactive widget stepping through the 6 equivalence classes of square side-colorings under rotation, showing every member of each class at equal size, labeled with its 4-letter amber/teal string.

This is another situation where we might want to use an equivalence relation: our set is \[X = \{AAAA, AAAT, AATA, AATT, ATAA, ATAT, ATTA, ATTT, \\ TAAA, TAAT, TATA, TATT, TTAA, TTAT, TTTA, TTTT\},\] but we want to declare \[ATAT \sim TATA,\] \[AATT \sim TAAT \sim TTAA \sim ATTA,\] \[AAAT \sim AATA \sim ATAA \sim TAAA,\] \[TTTA \sim ATTT \sim TATT \sim TTAT,\] to represent how different instruction strings encode the same square.

The formal definition of an equivalence relation

Generally, an equivalence relation on a set \(X\) is the data of a subset \(E \subseteq X\times X,\) obeying some conditions we'll state in a moment. For now, to get a sense of what this means, let's revisit the square example; as we said before, there we have \[X = \{AAAA, AAAT, AATA, AATT, ATAA, ATAT, ATTA, ATTT, \\ TAAA, TAAT, TATA, TATT, TTAA, TTAT, TTTA, TTTT\},\] the set of all instruction strings.

The set \(X \times X\) is the set of all possible pairs of instruction strings. For example, \[(AAAA, AAAT), (TTTT, TTTT), \text{ and }(ATTA, ATTT)\] are all possible pairs. The full set \(X \times X\) has \(16 \times 16 = 256\) elements, though, so we won't write them all down.

The subset \(E\) which defines our equivalence relation is thought of as the set of pairs of elements which should be made equal. Thus, in our square example, the set \(E\) contains pairs like \[(AAAT, ATAA)\text{ and } (ATAT, TATA),\] because the instruction strings AAAT, ATAA both correspond to the same square, as do ATAT and TATA.

Now that we've made sense of the data -- an equivalence relation on \(X\) consists of a subset \(E\) of \(X\times X\) -- we can make sense of the constraints this data must obey to be dubbed an equivalence relation. Equality has three basic properties: it is reflexive (\(x = x\)), symmetric (if \(x = y,\) then \(y = x\)), and transitive (if \(x = y\) and \(y=z,\) then \(x=z\)). An equivalence relation is required to obey the analogous properties.

For reflexivity, we demand that, for every \(x \in X,\) (this symbol means \(x\) is an element of \(X\)) we have \((x, x) \in E.\) In other words, \(x\) and \(x\) should encode the same object; in our square example, \((AAAA, AAAA) \in E,\) for instance.

For symmetry, we say that if \((x, y) \in E,\) then \((y, x) \in E\) as well. For transitivity, we say that if \((x, y)\in E\) and \((y, z) \in E,\) then \((x, z) \in E\) as well.

Groupoids

Equivalence relations are an incredibly common, and useful, mathematical construct. However, over time, it was realized that they have a certain defect, which can make them inconvenient in some applications.

The key problem of the equivalence relation is that it just remembers whether or not two elements of \(X\) are the same; but it doesn't remember why they are the same.

To see why this causes trouble, let's think back to our example of building squares out of triangle. There, our set \(X\) has 16 elements (corresponding to the four letter strings TATA, ATTA, etc.). Each square has 8 symmetries (4 rotational symmetries and 4 reflections), and so you might expect there to be \[\frac{16}{8} = 2\] total 'finished' squares. Yet we found six different types above! What's going on?

The trouble is that, sometimes, a symmetry does nothing. For example, if you rotate the square labelled TATA by a quarter turn counterclockwise, then you'd get the square labelled ATAT. But if you rotated TATA by a half turn instead of a quarter turn, then you'd get TATA again! And if you rotated TATA by a quarter turn clockwise, then you'd get ATAT -- something we've already seen!

Indeed, instead of all four rotations of the TATA square getting distinct labels, two of them are called TATA and two of them are called ATAT. This makes our naive \(16/8\) count from before go wrong: not every string has the full 8 symmetries.

There is another way of thinking about this: TATA and TATA encode the same square for multiple reasons. For example, \(ATAT \sim TATA\) for four reasons: these strings encode the same square, because you can go from the ATAT square to the TATA square by either a quarter turn clockwise, a quarter turn counterclockwise, or by flipping the square along the diagonal from bottom left to top right, or by flipping the square along the diagonal from top left to bottom right.

Similarly, \(TATA \sim TATA\) for four reasons: because any two strings encode the same square, or because the TATA square and the TATA square can be made the same by flipping the square horizontally, flipping it vertically, or rotating a half-turn.

Our \(\frac{16}{8}\) computation from before has a kernel of truth to it: there eight reasons for TATA to be equivalent to something else, its just that some of those reasons make TATA equivalent to the same thing!

To account for this, mathematicians invented the groupoid. This is a variant of equivalence relation, in which you're allowed to encode the multiple reasons two elements can be equivalent. The key change in the definition is that, instead of requiring \(E\) to be a subset of \(X\times X,\) we allow our set \(E\) of equivalences to be arbitrary.

So, for example, when \(X\) is our set of strings ATTA, AAAA, etc., again, the groupoid encoding equivalence is now a set of triples of two equal strings, plus a reason for equality: while our equivalence relation had the pair \((TATA, ATAT),\) our groupoid now has four triples \[(TATA, ATAT, \text{quarter turn clockwise}),\] \[(TATA, ATAT, \text{quarter turn counterclockwise}),\] \[(TATA, ATAT, \text{flipping along top left to bottom right diagonal}),\] \[(TATA, ATAT, \text{flipping along bottom left to top right diagonal}).\]

The formal definition of a groupoid

The formal definition of a groupoid is only slightly more complicated than an equivalence relation. Let \(X\) be a set. A groupoid on \(X\) is another set \(E,\) together with the following extra operations.

An element of \(E\) should be thought of as two elements of \(X,\) plus a reason they are equivalent. Thus we make a groupoid have two extra functions \[s\colon E \to X,\] \[t\colon E \to X\] (often called source and target) which just send an element of \(E\) to the two elements it is equating. In other words, any element \(e\in E\) tells you \(s(e)\sim t(e)\).

Remember that equivalence relations were required to be reflexive. In other words, any element \(x\) should be equivalent to itself: \(x \sim x.\) The analogue of reflexivity for groupoids is that, for every \(x \in X,\) there should be some element \(\operatorname{id}(x) \in E\) so that \(s(\operatorname{id}(x)) = x\) and \(t(\operatorname{id}(x)) = x.\) We encode this as a function \[\operatorname{id}\colon X \to E,\] which we think of as the function sending every element \(x\) to the element of \(E\) encoding the fact that "\(x\sim x\) because \(x\) is itself." We require this function \(\operatorname{id}\) to obey \[s(\operatorname{id}(x)) = t(\operatorname{id}(x)) = x.\]

A groupoid also has symmetry: if \(x \sim y,\) then \(y \sim x.\) In groupoids, we encode this with an extra function \[\iota\colon E \to E,\] obeying the condition that \[s(\iota(e)) = t(e)\] and \[t(\iota(e)) = s(e).\] In other words, given any reason \(e \in E\) that \(s(e) \sim t(e),\) we can apply \(\iota\) to get a reason \(\iota(e)\) that \(t(e) \sim s(e).\)

The last axiom of equivalence relations was transitivity: if \(x\sim y\) and \(y\sim z,\) then \(x \sim z.\) For groupoids, we encode this as a binary function \[\mu \colon \{(e_1, e_2) \in E \times E \mid t(e_1) = s(e_2)\} \to E.\] That is, \(\mu\) is a function whose input is pair \((e_1, e_2)\) of two elements of \(E\), such that \(t(e_1) = s(e_2),\) and whose output is a new element of \(E.\) We require \(\mu\) to obey \[s\big(\mu(e_1, e_2)\big) = s(e_1),\] \[t\big(\mu(e_1, e_2)\big) = t(e_2).\] This way, if \(e_1\) is a reason that \(x\sim y,\) and \(e_2\) is a reason that \(y \sim z,\) then \(\mu(e_1, e_2)\) is a reason that \(x \sim z.\) This \(\mu\) is also required to be associative: \[\mu\big(e_1, \mu(e_2, e_3)\big) = \mu\big(\mu(e_1, e_2), e_3\big).\] This just means that, if you have reasons that \(x\sim y, y\sim z,\) and \(z\sim w,\) then the final transitive reason that \(x\sim w\) doesn't depend on if you start by using \(\mu\) to generate a reason that \(x\sim z,\) or if you start by using \(\mu\) to generate a reason that \(y\sim w.\)

These operations must obey some last compatibilities. Recall our function \[\operatorname{id}\colon X \to E\] implementing reflexivity. We don't want \(e\) to just send \(x\) to any random reason that \(x\sim x,\) though; we really want it to pick out the 'trivial' reason that \(x\sim x.\) For this reason, we require \(\operatorname{id}\) and \(\mu\) to interact: whenever \(e, e' \in E\) are such that \(t(e) = x\) and \(s(e') = x,\) we have \[\mu\big(\operatorname{id}(x), e\big) = e,\] \[\mu\big(e', \operatorname{id}(x)\big) = e'.\] We think of \(\operatorname{id}(x)\) as the trivial reason that \(x \sim x,\) and \(e\) as some reason that \(x\sim y.\) Transitivitity applied to the trivial reason that \(x\sim x\) and the reason \(e\) that \(x\sim y\) should just give us \(e\) back again. This is the reason for these two compatibilities.

For the last compatibility, recall that \(\iota\) is supposed to implement symmetry. We require that \[\mu\big(e, \iota(e)\big) = \operatorname{id}\big(s(e)\big),\] \[\mu\big(\iota(e), e\big) = \operatorname{id}\big(t(e)\big).\] This is because, if \(e\) is some reason that \(x \sim y,\) then \(\iota(e)\) is the symmetric reason that \(y\sim x.\) Thus, when we apply transitivity to these two to get a reason that \(x\sim x,\) we shouldn't expect anything exciting to happen: \(e\) and \(\iota(e)\) are 'the same reason,' but just with opposite source and target, and so composing them should never result in anything interesting.

An advanced example: action groupoids

This subsection is intended for people who know a little group theory; those who don't can safely skip it.

As an example of a groupoid, let \(X\) be a set, and suppose \(G\) is a group acting on \(X.\) The action groupoid associated to this group action, often denoted by \([X/G],\) is the groupoid on \(X\) given by \[E = G \times X.\]

The source and target functions are \[s(g, x) = x,\ t(g, x) = g \cdot x.\] In other words, we think of \((g, x)\) as a 'reason' that \(x \sim g \cdot x.\) Thus, the action groupoid \([X/G]\) is an enhancement of the usual set-theoretic quotient \(X/G,\) the set of \(G\)-orbits of our action.

The identity function is of course \[\operatorname{id}(x) = (1, x),\] where \(1 \in G\) denotes the identity element of our group.

The function \[\iota\colon G \times X \to G\times X\] is given by \[\iota(g, x) = (g^{-1}, gx).\]

Finally, the transitivity operation \(\mu\) is given by \[\mu\big((g_1, x), (g_2, g_1x)\big) = (g_2g_1, x).\]

The primary difference between the set-theoretic quotient \(X/G\) and the action groupoid \([X/G]\) is that the action groupoid can remember that two elements might be in the same orbit for multiple reasons. That is, two points \(x, x' \in X\) lie in the same \(G\)-orbit whenever there is some \(g \in G\) so that \(x' = g \cdot x.\) We think of this element \(g\) as being a reason that \(x, x'\) lie in the same orbit; group actions can have stabilizers, though, and so there can be distinct reasons that two points lie in the same orbit. The action groupoid is very good at encoding these distinct reasons!

Groupoid-based mathematics

Once you are convinced of the utility of groupoids, it can be tempting to re-define various basic mathematical objects, but trying to replace any equivalence relations involved with groupoids.

One common example of equivalence relations in mathematics come from quotient spaces. As an example, suppose you want to study even functions -- these are functions \[f\colon \mathbb{R} \to \mathbb{R}\] obeying the property that \[f(x) = f(-x).\] The functions \(x^2\), \(\cos(x),\) and \(|x|\) are all examples.

At the moment, studying even functions might seem a little strange, but actually studying functions obeying some invariance property comes up all the time in mathematics; this study of even functions is a special case of discrete Fourier theory, for instance, as we elaborated on in Infinitely many primes end in a 7. As a more sophisticated example, modular forms (which also came up at the end of What is \(\sqrt{-1}\) modulo 5?) occupy a central role in modern number theory, and are just functions obeying some (rather complicated!) invariance properties.

Observe that, if \(f(x) = f(-x),\) then the values of \(f\) on negative real numbers are determined by its values on negative reals; that is, \(f(-1) = f(+1), f(-2.3) = f(+2.3),\) and so on. Thus, even functions are equivalent to arbitrary functions with domain \([0, \infty).\)

Said another way, instead of studying even functions, it is enough to study functions on the shape positive number line (\([0, \infty)\) is just notation for "the collection of all numbers greather than or equal to zero").

There is a more principled way to discover this: because \(f(x) = f(-x),\) it is natural to form the quotient space of the real number line \(\mathbb{R}\) by the equivalence relation \[x \sim -x.\]

That is, we start with the set \(X\) of all real numbers, and then quotient by the equivalence relation identifying each real number with its negative; you can visually imagine this as folding the negative half of the real number line onto the positive, as depicted in the widget below.

Folding R at 0 to form R/(x~-x) Negative half of the real line rotates up and over the origin, landing on the positive half, illustrating the quotient space. 0
unfolded

Odd functions

Recall that an odd function is a function obeying \(f(x) = -f(-x).\) Examples include \(\sin(x)\) and \(x^3.\)

As with even functions, an odd function is completely determined by its values on non-negative numbers: if you know \(f(0),\) and if you know \(f(x)\) for every \(x \gt 0,\) then you can determine \(f\): on a negative input like \(f(-7.32),\) you can just use the rule \(f(-7.32) = -f(7.32)\) and the fact that you know the values on positive inputs.

Unfortunately, unlike with even functions, it is not the case that that odd functions are equivalent to functions from \([0, \infty)\) to \(\mathbb{R}.\) This is because odd functions have one peculiarity: if we plug in \(x=0\) to our odd function rule, then we find \[f(0) = -f(0),\] so that \(f(0)\) is forced to be zero.

You can think that, in the quotient of \(\mathbb{R}\) by the equivalence relation \(x\sim -x,\) we add an extra reason that \(0 = 0.\) So, from the point of view of groupoids 0 of the quotient set is slightly different than the other points: \(0 = 0\) for two different reasons.

In the next subheading, we explore this a little more, but use the language of group theory. A reader who doesn't know group theory should feel free to skim (or skip entirely!) that subheading.

Even and odd functions, with group theory

Even and odd functions are both special cases of the same setup, which group theory and groupoids can enlighten. Let \(X\) be some shape (in our example, \(X\) was the real number line), and let \(G\) be a group acting on \(X\) (in our example, \(G\) was the group \(\{1, -1\},\) and the group action was \(1 \cdot x = x, -1 \cdot x = -x\)).

Similarly, take \(Y\) another shape with an action of \(G.\)

A \(G\)-equivariant function \[f\colon X \to Y\] is any function obeying \[f(g \cdot x) = g \cdot f(x).\]

Odd functions are just \(\{\pm 1\}\)-equivariant functions \(\mathbb{R} \to \mathbb{R}.\)

Even functions are also a type of equivariant function; if we let \(\mathbb{R}_{\operatorname{triv}}\) denote "the real numbers, but where the group \(\{\pm 1\}\) acts in the trivial way \(1 \cdot x = -1 \cdot x = x\)", then even functions are \(\{\pm 1\}\)-equivariant functions \(\mathbb{R} \to \mathbb{R}_{\operatorname{triv}}.\)

Recall from earlier that we can form the action groupoid associated to the action of \(G\) on \(X.\) This is the groupoid \[G \times X \rightrightarrows X,\] where \(s(g, x) = x\) and \(t(g, x) = g \cdot x.\)

Similarly, we can form an action groupoid for the action of \(G\) on \(Y.\) A morphism of groupoids between these two action groupoids is the data of a function \(f \colon X\to Y,\) together with a function \(\phi \colon G \times X \to G\times Y,\) obeying various compatibilities: for example, we should have \[\operatorname{id}(f(x)) = \phi(\operatorname{id}(x)),\] and \[s(\phi(g, x)) = f(s(g, x)),\] and similar compatibilities between targets, composition, and inverses.

Any \(G\)-equivariant function \(f\colon X\to Y\) can be upgraded in a unique way to a morphism of the corresponding action groupoids; indeed, we can define \[\phi\colon G \times X \to G \times Y\] to be \[\phi(g, x) = (g, f(x)).\] The \(G\)-equivariance of \(f\) ends up implying that \(\phi\) and \(f\) obey all the compatibilities needed to give a morphism of groupoids. And, for experts, we will remark that every morphism of groupoids compatible with the natural maps to \(BG\) gives rise to a \(G\)-equivariant function \(X \to Y.\)

From this groupoid picture, the distinction between even and odd functions just becomes the distinction between the action groupoids associated to \(\mathbb{R}\) and \(\mathbb{R}_{\operatorname{triv}}.\) To be even more precise: the action groupoid associated to \(\mathbb{R}\) with its usual \(\{\pm 1\}\) action has the amusing property that there are two reasons that \(0 \sim 0.\)

A morphism of action groupoids \(\mathbb{R}/\{\pm 1\} \to \mathbb{R}/\{\pm 1\}\) over \(\pt/\{\pm 1\}\) therefore must send 0 to some object which has two reasons to equal itself. However, the only object of \(\mathbb{R}/\{\pm 1\}\) which equals itself for two reasons is zero! So, odd functions -- which, as we discussed, are equivalent to groupoid morphisms \(\mathbb{R}/\{\pm 1\} \to \mathbb{R}/\{\pm 1\}\) over \(\pt/\{\pm 1\}\) -- must send 0 to 0.

But even functions are groupoid maps \(\mathbb{R}/\{\pm 1\} \to \mathbb{R}_{\operatorname{triv}}/\{\pm 1\}.\) And in this new action groupoid \(\mathbb{R}_{\operatorname{triv}}/\{\pm 1\},\) every point is equal to itself for two reasons! When we take the trivial action and quotient by it, we're just saying that every \(g\in G\) gives a reason that \(x = x.\)

So, even functions do not have any restriction about sending zero to zero. Thus, if you want to understand functions obeying some symmetry, like even or odd functions, groupoids are the way to go! In fact, one of the first 'concrete situations' where mathematicians needed groupoids were in the study of modular curves. As we mentioned above, modular forms -- an important part of modern number theory -- are defined as functions obeying a certain invariance property. Similarly to even and odd functions, this invariance property can be phrased as \(G\)-equivariance for the hyperbolic plane and some complicated group \(G.\) The resulting quotient space of the hyperbolic plane is called a modular curve, and to understand modular curves completely, one needs to remember the orbifold or stacky points -- that is, the points which are equal to themselves for multiple reasons under the quotient!

The inadequacy of groupoids

The longer you do certain types of algebraic geometry or algebraic topology, the more convinced you might be that groupoids occupy a fundamental role in mathematics. This lead to mathematicians trying to redo various mathematical concepts, but replacing all the sets involved in their definition with groupoids.

For example, algebraic geometers replaced the sets used in the definition of a scheme (this is the basic type of shape studied in algebraic geometry) with groupoids, leading to stacks. You can also define ring groupoids, which are like rings, but the set of numbers is replaced by a groupoid of numbers!

But if you take groupoid-based mathematics seriously enough, groupoids then seem inadequate because they are based on sets! And this inadequacy is not purely academic, although the trouble you run into is hard to explain without assuming some more advanced algebra background. The next subheading gives a 'concrete' situation where the fact that groupoids are defined using sets instead of groupoids causes trouble, though a reader unfamiliar with abstract algebra can safely skim or skip that section.

An advanced example: syzygies

Let \(M\) be a \(\mathbb{C}[x,y]\)-module. Consider the quotient \(M/xM.\) Quotients are a prime signal that you should use groupoids, and indeed something quite nice happens if you model this quotient as a groupoid.

In this quotient \(M/xM,\) we say \(m = m'\) whenever \(m' - m \in xM,\) or equivalently whenever we can find some \(n \in M\) such that \(m' - m = xn.\)

Thus the groupoid replacement for the quotient \(M/xM\) is \[M \times M \rightrightarrows M,\] \[s(m, n) = m,\ t(m, n) = m + xn.\]

In particular, the reasons that \(m = m\) in this quotient groupoid are just the pairs \((m, n)\) for which \(xn = 0.\) In other words, this quotient groupoid sees the \(x\)-torsion in \(M.\)

Torsion is a very important concept in homological algebra, so this is good!

You might even hope that groupoids can help you concretely access the higher \(\operatorname{Tor}\)-functors. Unfortunately, there is a big problem here. If we wanted to look at a quotient like \(M/(x, y)M,\) where we might see \(\operatorname{Tor}\) functors, groupoids aren't enough: we'd compute the higher tors using a complex like \[\mathbb{C}[x, y] \to \mathbb{C}[x, y] \oplus \mathbb{C}[x, y] \to \mathbb{C}[x, y],\] where the third term comes from the syzygy between the two relations \(x = 0\) and \(y = 0.\) That is, when we quotient by \((x, y),\) we set \(xy = 0\) for two reasons: once because we set \(x\) to 0, and once because we set \(y\) to 0.

Groupoids can handle that perfectly well; indeed, there is a groupoid version of the quotient \(M/(x,y)M\), where \(xy \cdot m = 0\) for two separate reasons.

However, the third time in the free resolution used to calculate tor functors kills the syzygy, making it so \(xy = 0\) for a unique reason again. Or, in other words, this third term in our resolution adds a 'reason' that the two reasons that \(xy = 0\) should be the same. Homological algebra is very successful, and it is a point against groupoids that they cannot handle this three time complex!

However, if you simply replace the set of reasons with a groupoid of reasons in the definition of groupoid, then you solve this problem: you can add a reason that two reasons are equivalent!

2-groupoids

If you try to reformulate the definition of groupoid, but replacing the two sets \(E, X\) by groupoids, then you get an object called a 2-groupoid.

The final definition of 2-groupoid is actually quite a bit subtle, because there are many many equivalent-but-not-obviously-equivalent ways to define 2-groupoids.

\(\infty\)-groupoids; or, anima

You might have noticed something: 2-groupoids were defined because groupoids are not groupoid-y enough; their definition involves sets. But 2-groupoids are also not 2-groupoid-y: their definition involves ordinary groupoids.

This leads to \(3\)-groupoids, which are defined by replacing all the groupoids in the definition of 2-groupoid by 2-groupoids. Similarly, you can define 4-groupoids, 5-groupoids, etc., and even a limiting object of \(\infty\)-groupoids.

Much modern mathematics -- at least in certain fields like algebraic geometry -- uses \(\infty\)-groupoids in fundamental ways. These \(\infty\)-groupoids go by another name: anima, coined by Dustin Clausen, inspired by Sasha Beilinson referring to an \(\infty\)-groupoid version of a theorem about sets as an animation of the theorem about sets.

Why did Beilinson use the word animation, though? For this, we explain Grothendieck's homotopy hypothesis.

Groupoids arose by generalizing equivalence relations. One common equivalence relation is path-equivalence: for any shape \(X,\) we can make an equivalence relation on \(X\) by saying \(x \sim y\) whenever there is a path from \(x\) to \(y.\)

To upgrade this to a groupoid, one can just replace the relation of path equivalence by the set of paths.Although there end up being some complications to this -- in order to make composition of paths associative (remember, groupoids require this associativity of composition!), you need to consider something called homotopy classes of paths.

But, using these homtopy classes of paths, one can associate to every shape \(X,\) one can associate a groupoid called its fundamental groupoid.

It turns out that every groupoid is the fundamental groupoid of some shape. We can think of this shape associated to a groupoid as an animation of it, in the following sense: if we took the quotient set associated to the groupoid, we'd get the set of connected components of our shape \(X\); we think that this shape \(X\) gives each point of the quotient set a playground to move around in -- these playgrounds are just the different connected pieces of the shape \(X.\)

Grothendieck's homotopy hypothesis is the assertion (which, depending on how you define \(\infty\)-groupoid, is either a theorem or an axiom!) that \(\infty\)-groupoids are just homotopy classes of shapes. So, in some sense, every groupoid comes just by trying to understand the equivalence relation of path connectedness in some shape!