I encountered the term "monoid" but I didn't really understand what is it useful for or what's it about.
If I understand correctly a "monoid" is something defined in the context of a set, an element of the set and a binary operation defined on the specific set.
The binary operation has as left and right operators the same element.
So I think it is something like: $1\cdot1=1\cdot1$ where $\cdot$ is the relevant operation on the set $\mathbb{N}$ .
But what does this mean in layman's terms?
Is this some formal way to define a symmetric operation? Then why is it about one element of the set instead of two? I think $1 + 2 = 2 + 1$ on $\mathbb{N}$ is not a "monoid".
Can someone please help me understand this concept?
A monoid is a set $M$ together with an associative binary operation $\ast: M\times M\to M$ with an identity element $1_M\in M$; that is to say that for any $a,b,c\in M$, we have:
Closure: $a\ast b\in M$;
Associativity: $$a\ast(b\ast c)=(a\ast b)\ast c;$$
Identity: There exists a $1_M\in M$ such that $1_M\ast a=a\ast 1_M=a$.