Often when people talk about groups, they say something like: groups are objects that encode the notion of symmetry. After working a bit with groups and group actions, it’s easy to convince yourself this is the case, but this sort of a posteriori explanation might seem a little circular—at least, it does to me.

For those who haven’t heard this, these next few sentences are for you. A group is an object encoding a possible kind of symmetry. The symmetries understood by a group $G$ are seen (or more evocatively, realized or effected) via group actions of $G$ on an object $X$, and sufficiently good actions are branded with adjectives like transitive or faithful or regular. We record that a set enjoys some particular $G$-symmetry by equipping it with a representative $G$-action, and call the result a $G$-set.

What follows is (my attempt at) a more intrinsic explanation. Readers familiar with category theory might accuse me of cheating here, because it looks like I’m just reading off the categorical model of a group, but I claim that that’s just a consequence of category theory being such a natural abstraction. Plus I’m gonna talk about semigroups later and categories can’t handle that so eat it, nerd.

Consider an object $X$. In order not to get too stuck on explaining why objects should be modelled as sets, and to not have to appeal to something like topos theory, I’ll treat this notion as a black box. But objects are almost always modelled as sets, so think of $X$ as a set.

We will say a symmetry of $X$ is a transformation of $X$—for instance, a function from $X$ to itself, if it were a set—such that the image is “the same” as $X$. That is, after we apply the transformation, we recognize that $X$ has remained unchanged in some way. Note that we want “is the same as” to be an equivalence relation, because it would be really weird if it wasn’t. For instance, the identity map $\def\id{\mathrm{id}}\id_X : X \to X$ should be a symmetry, because clearly no change at all has occurred to $X$.

We will ask that the collection of symmetries of $X$ obey two natural rules. First, if $f$ and $g$ are two symmetries of $X$, then their composition $f \circ g$ should also be a symmetry. If $X$ looks the same after applying $g$, we should be able to apply $f$ afterwards, and the result should again not change in any meaningful way. Note that function composition is an associative operation.

Second, we will ask that if the transformation $f$ is a symmetry, then it can be undone, i.e. there exists a symmetry $f^{-1}$ such that $f^{-1} \circ f$ is the identity transformation. This make sense too: if $X$ looks the same as $f(X)$, then we can apply $f^{-1}$ to find that $f^{-1}(X)$ should look the same as $f^{-1}(f(X)) = (f^{-1} \circ f)(X) = \id_X(X) = X$. Since “looks the same as” is an equivalence relation, it’s symmetric, so $X$ looks the same as $f^{-1}(X)$. Observe now that $f \circ f^{-1}$ is a symmetry, so it has an inverse, and then we can prove that

so it doesn’t matter if we undo $f$ beforehand or afterwards.

Let $S(X)$ be the set of symmetries of $X$. $S(X)$ is closed under the associative binary operation $\circ$; and has an identity element $\id_X$ with respect to that operation; and every element has a two-sided compositional inverse. Furthermore, $S(X)$ consists of maps $X \to X$, so there is a natural “action” $\def\End{\mathrm{End}}S(X) \to \End(X)$, which is just an inclusion, that associates each symmetry to the corresponding (endo)transformation of $X$. Denoting with a slight abuse of notation the action of $f \in S(X)$ on $X$ by $\def\act{ {.}}f\act X$, we verify $f\act(g\act X) = f\act g(X) = f(g(X)) = (f \circ g)(X) = (f \circ g)\act X$ and $\id_X\act X = \id_X(X) = X$.

Because we can interface with $S(X)$ through the action, it really doesn’t matter what the elements of $S(X)$ are, so long as we know how to associate them to transformations $\End(X)$ that behave correctly. A group, then, is an abstract version of a collection of symmetries. Namely, it comprises a set $G$ equipped with an associative binary operation $\cdot$, such that there exists an identity $e \in G$, and every element $g \in G$ has an inverse $g^{-1}$. $S(X)$ is a group under the operation of composition.

Likewise, an abstract group action is an operation $G \to \End(X)$ assigning elements of $G$ to transformations of $X$. $S(X)$ acts naturally on $X$ by embedding $S(X)$ into $\End(X)$.

The astute will notice that the action of $S(X)$ on $X$ arising in this way is always effective, i.e. that if two transformations that act the exact same way are equal. Relaxing this in general for our definitions causes no harm, because after some basic group theory, we find that any action $(.)$ can be viewed as a homomorphism of groups, and thus has a kernel $K$. The action is effective—more commonly referred to as faithful—iff $K$ is trivial, but if $K$ is nontrivial, we can excise that redundancy by taking the (faithful) action of the quotient group $G/K$ on $X$.

We can confirm that groups are precisely the objects that arise in this way, because every group acts regularly—and hence faithfully—on itself by left multiplication. Explicitly, we can model $(G,{\cdot})$ as $(S(X),{\circ})$ for $X = G$ as a set, and taking its symmetries to be all and only the translations by elements of $G$. This is precisely the content of Cayley’s theorem.

By relaxing our notion of symmetry, we can obtain more general objects. For instance, if we relax the inverse condition, and replace the ‘same as’ relation by a more nebulous ‘part of’ relation, we end up simply looking at all endotransformations, and obtain monoids and monoid actions.

If we relax even further to merely $\circ$-closed subsets of transformations, then we obtain semigroups and semigroup actions. The only surviving guarantee is the associativity provided by $\circ$.

As in the group case, there exists a Cayley theorem for semigroups, realizing every semigroup $S$ as an effective transformation semigroup of some object. For the curious, the usual choice of object is the image of $S$ under the free functor $\textsf{Semigroup} \to \textsf{Monoid}$, which adjoins a two-sided identity if none is present. (This confirms the sneaking suspicion some of you might have that it doesn’t cause any trouble in general to make sure to include $\id_X$ in the subcollection of transformations.)