Category Theory – Monoid as a Single Object Category

category-theorymonoid

I'm struggling with comprehending what monoids are in terms of category theory.

In examples they view integer numbers as a monoid. I think I get the set theoretic definition. We have a set and a associative binary operator (addition) and the neutral element (zero).

Then they are saying something like that – view the whole set as a single object and binary operator as bunch of morphisms for every element of the set.

Like add0 is an identity morphism. Which would really give us the same object i.e. the same set of all integer numbers. I think I understand this.

But let's view the morphism add1. After applying it to the our single object (the set of all integers) we would have a set {1,2,3…} not the {0,1,2,3…}. Aren't domain and codomain different in that case?

That's what's bothering me. Can someone clarify that to me?

Here is the text that gives me problems.

The text

Best Answer

No, that's not the way to view it. In order to view a monoid as a category, you have a single object $\mathsf{Andreas}$, and each element of the monoid is one morphism $\mathsf{Andreas}\to\mathsf{Andreas}$ in the category. The monoid operation is the composition in the category.

So for the integers, you don't have a morphism "add 1", but a morphism that is simply called $1$. And composition in the category works such that $1$ composed with $1$ is the morphism called $2$.

This is an example of a category where the morphisms are not functions.