TITLE: Are Monoids a category inside a category?
QUESTION [6 upvotes]: Looking at the definition of Monoids, it looks like they are an object inside a category with one object. I have also noticed that they have operations like composition and identity which must be associative. Is a monoid a kind of category hidden in an object of another category?

REPLY [10 votes]: The connection between monoids and categories is as follows:

To every monoid $M$ we can associate a category $BM$ with exactly one object $\star$ and $\mathrm{End}_{BM}(\star)=M$. The identity and composition comes from $M$.
In fact, a category with one object is the same as a monoid, and a functor between such categories is the same as a monoid homomorphism.
Given a category $C$ and an object $x \in C$, then $\mathrm{End}_C(x)$ is a monoid.

Inside joke: Therefore categories are just monoidoids. ;)