# Monoids as Categories With One Object of Specific Type

I was reading David Spivak's excellent book on category theory, where he uses a category to define a monoid. Another text by Tom Leinster defines monoids in the same way (I've only read through the "Motivation for Topologists"):

A monoid $\mathcal{M}$ is a category with a single object $@$, where the morphisms are the elements of $\mathcal{M}$ and the binary map is given by composition of morphisms. Leinster goes on to describe usage of monoids with this definition in Braid Theory and other parts of topology. I have only ever seen monoids defined in this way where the object $@$ is trivial, and the specific nature of the morphisms is usually quite vague.

Is there an example where the definition of $@$ in a monoid is rigorous and interesting, where $@$ is some algebraic object like a magma, group, or ring, and where the morphisms represent something quite literal outside of their use as objects of $\mathcal{M}$? Please do not give any examples where $@$ is only a set.

• The main point is that the actual nature of @ doesn't matter at all, - the monoid structure lives in arrows and composition. Jul 10, 2018 at 15:16
• By the Yoneda lemma, you can take @ to be $M$ regarded as a right $M$-set. But @ is just an abstract entity; it's exactly like a vertex in a graph. Jul 10, 2018 at 16:57

In algebra, a monoid is defined as a pair $(M, *)$ where $M$ is a set and $*$ is a binary operation on $M$ satisfying associativity and having an identity element.

A category with a single object, on the other hand, is given by a triple $(O, M, *)$ where $O$ is a set with a single element (the class of objects), $M$ is a set (the set of morphisms from the single object to itself is the only hom-set) and $*$ is a binary operation on $M$ satisfying associativity and having an identity element (the composition of morphisms turns out to be a binary operation because there is only one hom-set).

Notice that in the definition of a category with a single object there is no relationship between $O$ and $(M, *)$, because the properties that need to hold involve only $(M, *)$. Since those properties are exactly the same as those in the definition of monoid, we can say that a category with a single object consists of a monoid together with a set with a single element.

Therefore, if you want to get a monoid from a category with a single element, you just have to discard the useless set with a single element. Conversely, if you want to get a category with a single element from a monoid, you just have to come up with a set with a single element. Since that element won't play any role in the category, one usually puts a placeholder like $@$ to mean that any object will do.

Two categories with a single element are isomorphic (not just equivalent) whenever the corresponding monoids are isomorphic. Indeed, if $f\colon M \to M'$ is a monoid isomorphism, then the functor $F \colon \mathcal C \to \mathcal C'$ defined by $F(@)=@'$ and $F(m) = f(m)$ for any $m \in M$ (that is $m \colon @ \to @$ as a morphism) is clearly an isomorphism of categories, its inverse $F^{-1} \colon \mathcal C' \to \mathcal C$ being given by $F^{-1}(@') = @$ and $F^{-1}(m')=f^{-1}(m')$ for any $m' \in M'$ (i.e., $m' \colon @' \to @'$).

Now, if you still think that it makes more sense to define a monoid as a category with a single object, and that in order for a monoid defined in this way to be interesting its object should be some algebraic object as well, then you could consider the monoid of endomorphisms of a given algebraic object.

For example, if $(R, +, *)$ is a ring, then you could consider the full subcategory of the category of rings having $(R, +, *)$ as its only object. In this way there is indeed a relationship between the object and the morphisms, since the morphisms are precisely the ring homomorphism from $(R, +, *)$ to itself.

In fact, this construction can be applied to any category, not just a category of algebraic objects (e.g., you could also consider the full subcategory of the category of topological spaces having a given topological space as its only object, and so on).