# Definition of a monoid: clarification needed

I'm only in high school, so excuse my lack of familiarity with most of these terms!

A monoid is defined as "an algebraic structure with a single associative binary operation and identity element."

A binary operation, to my understanding, is something like addition, subtraction, multiplication, division i.e. it involves 2 members of a set, a single operation, and the resulting third member within that set. And an identity element is a special type of element of a set, with respect to a binary operation on that set, which leaves other elements unchanged when combined with things. Examples are "$0$" as an additive identity and "$1$" as a multiplicative identity.

How does this definition correspond to a category with a single object? What are some examples of monoids?

• Look this question – Billy Rubina Jun 15 '13 at 16:41
• I took a lot of time to figure out what these structures are - for now, it seems that they're just s set bundled with some rules. For some purposes, it's better to mention a monoid or a group or a field. – Billy Rubina Jun 15 '13 at 16:47

First definition (algebraic): A monoid is a pair $(M,b)$, where $M$ is a set (called the underlying set of the monoid) and $b\colon M\times M\to M$ is a mapping (called the binary operation of the monoid; for $m_1,m_2\in M$ denote $b(m_1,m_2)=m_1\bullet m_2$), which satisfy the following two properties:

1). for any $m_1,m_2,m_3\in M$ the following equality holds (associativity): $$(m_1\bullet m_2)\bullet m_3=m_1\bullet(m_2\bullet m_3).$$

2). there exists such $e\in M$ (called the identity of the monoid), that for any $m\in M$ the following equalities hold: $e\bullet m=m\bullet e=m$.

It is a standard definition of a monoid. There are a lot of examples of monoids; for example, any group is a monoid. However, there are monoids, which are not groups.

You are right, $(\mathbb{Z},+)$, $(\mathbb{Z},\cdot)$ are monoids, but $(\mathbb{Z},-)$ is not (because, for example, $1-(1-1)\ne(1-1)-1$).

If you are familiar with category theory, then you can get a lot of natural examples in different categories. The reason is following:

Let $A$ be a category, $a\in A$ be its object. Then any morphism $f\colon a\to a$ is called an endomorphism of $a$. Thus we can consider the set of all endomorphisms of the object $a$, denote it by $end(a)$. Note, that we can composite any two morphisms in $end(a)$, therefore we get a binary operation on $end(a)$! $$\bullet\colon end(a)\times end(a)\to end(a);\qquad f\bullet g=f\circ g.$$ It is a monoid by the definition of category.

Now you can take any category, for example $\mathbf{Set}$, take any its object -- for example, $\mathbb{N}$ (which is considered without its algebraic structure), -- and you get the monoid $\mathbb{N}^{\mathbb{N}}$ of all functions $f\colon\mathbb{N}\to\mathbb{N}$, which, of course, is not a group (check it).

Now it is easy to believe in the following definition of a monoid:

Second definition (category-theoretic): Monoid is a category with one object.

Indeed, denote by $x$ its single object, then $end(x)$ is a corresponding monoid. Conversely, if you have a monoid $(M,b)$, you can define a category $\mathbf{M}$ with single object, such that $Arr(\mathbf{M})=M$, and composition defined by the following rule: $$\forall f,g\in M:\;f\circ g=f\bullet g.$$

But it was, of course, intuitive reasoning. In order to make an exact statement, I have to give a few more definitions:

1). Let $(M,\bullet_M)$ and $(N,\bullet_N)$ be monoids. Monoid homomorphism is a mapping $f\colon M\to N$, such that for all $m_1,m_2\in M$ the equalities $f(m_1\bullet_M m_2)=f(m_1)\bullet_N f(m_2)$ and $f(e_M)=e_N$ hold. It's easy to check that all small monoids and their homomorphisms form a category, called $\mathbf{Mon}$.

2). Let's denote by $\mathbf{S}$ the full subcategory of $\mathbf{Cat}$, which objects are categories with fixed single object.

Now I can formulate the exact statement (equivalence of two definitions):

Statement: The category $\mathbf{Mon}$ of monoids is isomorphic to the category $\mathbf{S}$.

• I'm not sure $\mathbf{Mon}$ is actually isomorphic to $\mathbf{S}$. I agree that they're equivalent, but I don't see an easy isomorphism – Max Jul 8 '18 at 11:27
• It's very common for $e$ to be taken as part of the structure of a monoid -- I actually think this is the first time I've seen the definition given where it was only asserted existentially. – user14972 Jul 10 '18 at 1:33
• (this is, I think, closely related to the fact that semigroup homomorphisms between monoids are not always monoid homomorphisms -- whereas groups do satisfy the analogous theorem which is why asserting inverses and identities existentially is fairly common for groups) – user14972 Jul 10 '18 at 1:35
• @Max If we reject the requirement for a single object to be fixed, then they are equivalent, but not isomorphic, you are right. I deleted parentheses around the word "fixed" to avoid ambiguity. – Oskar Sep 14 '18 at 20:27
• @Hurkul It's a good reasoning, thanks. From the universal-algebraic point of view, it is indeed better to consider identity as a part of the structure. – Oskar Sep 14 '18 at 20:33

For your first question, if you compare the axioms of a monoid and a category, you will see, they are quite similar (associativity and identities). So if you have a category with a single object, the endomorphism ring of this object will be a monoid. This also holds more generally: For each category, the endomorphism ring of an object is a monoid.

For examples of monoids: First, the ones that are already present in your explanation, e.g. $(\mathbb{R},+)$, $(\mathbb{Q},+)$, $(\mathbb{R},\cdot)$, $(\mathbb{R}\setminus \{0\},\cdot)$, $(\mathbb{N},+)$, etc.

Another, maybe more exotic example for a high school student is the free monoid. It is given by words in some alphabet. An alphabet is just some set, e.g. $\{a,b\}$. In this examples words include e.g. $abaab$ or $baaabbba$. The binary operation is given by concatenating two words, e.g. $abaab\cdot baaabbba=abaabbaaabbba$. The identity element is here given by the empty word.

Or, if you take the answer to your first question, and plug in as an example the category of sets and the object being the real numbers. You get the set of functions from $\mathbb{R}$ to $\mathbb{R}$ form a monoid.

You can define a category as a system that consists of two collections: a collection of objects and a collection of arrows between these objects. These collections must satisfy two requirements each. For the objects these are

1) Every object must have at least one reflexive arrow. (Reflexivity) 2) For every pair of arrows of the form $f:a\rightarrow b$ and $g:b\rightarrow c$, there is a unique arrow identified to these, $g\circ f:a\rightarrow c$. (Composition of arrows is defined as if these objects were sets and arrows were functions).

The set of arrows in turn must satisfy two analogous conditions:

1) Every collection of reflexive arrows has a unique reflexive arrow that is identity under composition, with the other arrows; thus acting as the identity function if the objects are considered as sets. This is like saying that we have an identity function in the category of automorphisms of a set, for example.

2)The composition of arrows is associative.

Once we have defined a category we can proceed to study a category with one object. First observe that every object has at least one arrow, but it is never mentioned that it cannot have more. Thus, arrows are distinguishable even if they have the same domain and codomain (domain being $a$ and codomain being $b$ in $a\rightarrow b$). We have basically described functions between sets which are associative and have identity function, and obviously there is more than one set function for sets with cardinal greater than 1.

Say a small category is one whose collection of arrows has a cardinal number $\alpha$, then we can always find another set $X$ such that its set of automorphisms (meaning functions $X\rightarrow X$) has cardinal $>\alpha$. Thus, we can assign a unique automorphism of $X$ to every arrow in our category, essentially studying the category that has objects as sets and arrows as functions between them.