# The Unapologetic Mathematician

## Groups and group actions — categorically

The theory of group actions looks really nice when we translate it into the language of categories. That’s what I plan to do today.

We know that a monoid is essentially the same thing as a category with one object, and a group is a special kind of monoid. So any group $G$ can be considered as a category with one object in which every morphism has an inverse. So what’s a (left) group action? Well, it’s descibed by choosing a set $S$ for $G$ to act on, and a homomorphism from $G$ to the group of bijections on $S$. But $S$ is an object in the category $\mathbf{Set}$ of sets, and bijections from $S$ to itself are just the invertible morphisms in $\hom_\mathbf{Set}(S,S)$. What we’re describing here is a functor from $G$ to $\mathbf{Set}$! A (left) action of $G$ is an object of the category $\mathbf{Set}^G$ of (covariant) functors from $G$ to $\mathbf{Set}$. We know it’s a category because $G$ has (for our purposes) just a set of morphisms — it’s small.

Now I was adding these parentheticals above, since there’s also a notion of a right $G$-action. This is pretty much the same, but it satisfies $s\cdot(gh)=(s\cdot g)\cdot h$ instead of $(gh)\cdot s=g\cdot(h\cdot s)$. That is, it switches the order of composition. But we know how to do that! A right $G$-action is a contravariant functor — an object of $\mathbf{Set}^{G^\mathrm{op}}$.

So these actions form categories. What are the morphisms? Since these are functor categories, they’re natural transformations. Let’s say we have (left) actions $A_1:G\rightarrow\mathbf{Set}$ and $A_2:G\rightarrow\mathbf{Set}$, and that $A_1$ and $A_2$ send the single object $\bullet$ of $G$ to the sets $S_1$ and $S_2$, respectively. Now, what’s a natural transformation $\eta:A_1\rightarrow A_2$?

Well, there’s only one object in $G$, so a transformation only has one component: $\eta_\bullet:S_1\rightarrow S_2$. For any morphism (group element) $g\in G$ it must satisfy the naturality condition $\eta_\bullet(g\cdot s)=g\cdot\eta_\bullet(s)$ for all $s\in S_1$. Note that the dot on the left denotes the action of $G$ on $S_1$, and the one on the right denotes that on $S_2$. So we see that $\eta_\bullet$ must be a function which “intertwines” the two actions of $G$. That is, it preserves the $G$-action, just like homomorphisms of monoids preserve the composition and so on — a very natural notion of morphism of $G$-actions indeed! As a special case, a natural transformation from $A_1$ to itself is a permutation of the elements of $S_1$ which commutes with the actions of all the elements of $G$.

Okay, so we can translate this theory into categorical language and it looks pretty. So what? Hold on tight, because now I’m going to hit it with Yoneda’s Lemma (and its meaning).

Since there’s only one object in $G$ we only get one covariant functor $h_\bullet$ and one contravariant functor $h'_\bullet$. The covariant one gives us the group $G$ acting on its set of elements by left-multiplication, and the contravariant one gives the same set with the action of right-multiplication. Now given any other left $G$-action (covariant functor) on $S$ Yoneda’s Lemma tells us that the set $S$ is in bijection with the set of functions $f:G\rightarrow S$ satisfying $f(gh)=g\cdot f(h)$. In particular, we must have $f(g)=f(ge)=g\cdot f(e)$, where $e$ is the identity of the group, so the image of the identity element specifies the function completely. That is, if we have a left $G$-action on a set $S$ then every element $s\in S$ gives us an intertwining function satisfying $f_s(e)=s$, and every intertwining function sends $e$ to some element of $S$, giving us our bijection. A similar situation holds for right $G$-actions.

What about the Yoneda embedding $\mathbf{y}:G\rightarrow\mathbf{Set}^{G^\mathrm{op}}$? Well as we noted above, this sends the single object of $G$ to the set of elements of $G$ acting on itself on the right (because the target is the category of contravariant functors). But $\mathbf{y}$ is a functor, so it sends morphisms of $G$ (group elements) to morphisms of $\mathbf{Set}^{G^\mathrm{op}}$ ($G$-intertwining functions). Specifically, a group element $g$ gets sent to a function $\mathbf{y}(g):G\rightarrow G$ satisfying $\left[\mathbf{y}(g)\right](h_1h_2)=\left[\mathbf{y}(g)\right](h_1)h_2$.

Even better, we can compose these natural transformations! Since $\mathbf{y}$ is a functor we have $\mathbf{y}(g_1g_2)=\mathbf{y}(g_1)\circ\mathbf{y}(g_2)$. Also, $\mathbf{y}(e)$ must be the identity function on $G$$\left[\mathbf{y}(e)\right](h)=h$. Putting this all together, we see that $\left[\mathbf{y}(g)\right](h)=gh$, and indeed multiplying by $g$ on the left commutes with multiplying by another element of $G$ on the right, since group composition is associative! So we have a function sending $G$ to the group of permutations of the elements of $G$, and this function preserves group multiplication and identities. Then it must also preserve inverses, and we have a group homomorphism from $G$ to $\mathrm{Bij}(G)$.

And now for the coup de grâce: the Yoneda embedding $y$ is fully faithful! Firstly, this means that the homomorphism $G\rightarrow\mathrm{Bij}(G)$ is injective — its kernel is trivial — so every group is isomorphic to a subgroup of a permutation group. Secondly, this means that every permutation of the elements of $G$ which commutes with right-multiplication is given by left-multiplication by some element of $G$.

As a coda, we’re always more interested in representable functors than in represented functors, since we only care about things up to isomorphism. It turns out that there’s a special name for representable functors in this setup: torsors. I’ll be mentioning these again, to be sure, but a basic definition is that a $G$-torsor is a (left) $G$-action on a set, which is isomorphic to the action of $G$ on itself by left-multiplication. That link will take you to an excellent explanation (with great examples) by John Baez.