Monoid

It is a category with only one object.

A monoid is a triple (M,,e) where:

  1. M is a set,
  2. is a binary operation (called multiplication or composition) mapping M×MM,
  3. e is an element of M (called the identity),
    satisfying the following axioms:
  4. Associativity:
    For all a,b,cM,(ab)c=a(bc).
  5. Identity:
    For all aM,ea=ae=a.

Examples of Monoids:

  1. Natural numbers under addition:
    (N,+,0) where N={0,1,2,}, + is addition, and 0 is the identity.
  2. Strings under concatenation:
    (Σ,,ϵ) where Σ is the set of all strings over an alphabet Σ, is concatenation, and ϵ is the empty string.
  3. Non-zero real numbers under multiplication:
    (R,×,1) where R=R{0} and × is multiplication.
  4. Functions from a set to itself under composition:
    (XX,,idX) where XX is the set of all functions XX, is function composition, and idX is the identity function.