I have read two definitions of Monoid:
wiki link In category theory, a monoid (or monoid object) $(M, μ, η)$ in a monoidal category $(C, ⊗, I)$ is an object $M$ together with two morphisms
$μ: M ⊗ M → M$ called multiplication,
$η: I → M$ called unitwiki link Suppose that $S$ is a set and $•$ is some binary operation $S × S → S$, then $S$ with $•$ is a monoid if it satisfies the following two axioms:
Associativity:
For all $a, b, c \in S$, the equation $(a • b) • c = a • (b • c)$ holds.
Identity element:
There exists an element $e \in S$ such that for every element $a \in S$, the equations $e • a = a • e = a$ hold.
I know the 1st definition is from category theory's perspective, the 2nd one is from abstract algebra's. In my opinion, these two definitions defines the same concept from different way, but how could a monoid $(S, •)$ be consider as a category $(M, μ, η)$?