← Back to list

Monoid

For monoid objects in category theory, see Monoid (category theory), Not to be confused with Monad.

Sameer Singh · 2022-06-08 18:18 · 0 claps · 6.4 min read
#monoids #discrete-mathematics #mathematics
Open on Medium ↗
Wiki topics: 📐 · Mathematics

Monoid

For monoid objects in category theory, see Monoid (category theory), Not to be confused with Monad.

Algebraic structures between magmas and groups. For example, monoids are patented semigroups.

In abstract algebra, a branch of mathematics, a monoid is a set equipped with integrated binary functions and a proprietary feature.

Monoids are patented semigroups. Such algebraic structures occur in several branches of mathematics.

For example, functions from a set in which they create a monoid in relation to the structure of the function. In general, in phase theory, the morphisms of the object itself form a monoid, and, conversely, a monoid may be considered a single-phase phase.

In computer science and computer programming, a set of strings built from a specific set of characters is a free monoid. Transition monoids and syntactic monoids are used to describe machines of a limited form. Trace monoids and historical monoids provide the basis for process calculation and the same computer.

In computer science theory, the study of monoids is the basis of automata theory (Krohn-Rhodes theory), as well as structured language theory (star-length problem).

See semigroup for title history and other common monoid features.

Definition

Set S installed with binary function S × S → S, which we will describe •, is monoid when it satisfies the following two axioms:

Meeting

For all a, b, and c in S, the number (a • b) • c = a • (b • c) is minus.

Identity feature

There is an e-element in S so that for every part of an in S, the numbers e • a = a and a • e = hold.

In other words, a monoid is a semigroup with a distinctive feature. It can also be thought of as magma with associativity and identity. The monoid identity element is unique.1 For this reason patents is considered immutable, i. e. 0-ary performance (or nullary). The monoid is therefore characterized by a three-dimensional specification (S, •, e).

Depending on the context, the binary function symbol may be omitted, so that the function is displayed in combination; for example, monoid axioms may be written (ab) c = a (bc) and ea = ae = a. This does not mean repeated numbers.

A monoid where each element has an inverse group.

Monoid structures

Submonoids

A submonoid of a monoid (M, •) is a subset N of M that is closed under the monoid operation and contains the identity element e of M.2 3 Symbolically, N is a submonoid of M if NM, xyN whenever x, yN, and eN. In this case, N is a monoid under the binary operation inherited from M.

On the other hand, if N is a subset of a monoid that is closed under the monoid operation, and is a monoid for this inherited operation, then N is not always a submonoid, since the identity elements may differ. For example, the singleton set {0} is closed under multiplication and is not a submonoid of the (multiplicative) monoid of the nonnegative integers.

Generators

A subset S of M is said to generate M if the smallest submonoid of M containing S is M. If there is a finite set that generates M, then M is said to be a finitely generated monoid.

Commutative monoid

A monoid whose operation is commutative is called a commutative monoid (or, less commonly, an abelian monoid). Commutative monoids are often written additively. Any commutative monoid is endowed with its algebraic preordering ≤, defined by xy if there exists z such that x + z = y.4 An order-unit of a commutative monoid M is an element u of M such that for any element x of M, there exists v in the set generated by u such that xv. This is often used in case M is the positive cone of a partially ordered abelian group G, in which case we say that u is an order-unit of G.

Partially commutative monoid

A monoid for which the operation is commutative for some, but not all elements is a trace monoid; trace monoids commonly occur in the theory of concurrent computation.

Examples

  • Out of the 16 possible binary Boolean operators, each of the four that has a two-sided identity is also commutative and associative and thus makes the set {False, True} a commutative monoid. Under the standard definitions, AND and XNOR have the identity True while XOR and OR have the identity False. The monoids from AND and OR are also idempotent while those from XOR and XNOR are not.
  • The set of natural numbers is a commutative monoid under addition (identity element 0) or multiplication (identity element 1). A submonoid of N under addition is called a numerical monoid.
  • The set of positive integers is a commutative monoid under multiplication (identity element 1).
  • Given a set A, the set of subsets of A is a commutative monoid under intersection (identity element is A itself).
  • Given a set A, the set of subsets of A is a commutative monoid under union (identity element is the empty set).
  • Generalizing the previous example, every bounded semilattice is an idempotent commutative monoid.
  • In particular, any bounded lattice can be endowed with both a meet- and a join- monoid structure. The identity elements are the lattice’s top and its bottom, respectively. Being lattices, Heyting algebras and Boolean algebras are endowed with these monoid structures.
  • Every singleton set {x} closed under a binary operation • forms the trivial (one-element) monoid, which is also the trivial group.
  • Every group is a monoid and every abelian group is a commutative monoid.
  • Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining es = s = se for all sS. This conversion of any semigroup to the monoid is done by the free functor between the category of semigroups and the category of monoids.5
  • Thus, an idempotent monoid (sometimes known as find-first) may be formed by adjoining an identity element e to the left zero semigroups over a set S. The opposite monoid (sometimes called find-last) is formed from the right zero semigroups over S.
  • Adjoin an identity e to the left-zero semigroup with two elements {lt, gt}. Then the resulting idempotent monoid {lt, e, gt} models the lexicographical order of a sequence given the orders of its elements, with e representing equality.
  • The underlying set of any ring, with addition or multiplication as the operation. (By definition, a ring has a multiplicative identity 1.)
  • The integers, rational numbers, real numbers, or complex numbers, with addition or multiplication as operation.6
  • The set of all n by n matrices over a given ring, with matrix addition or matrix multiplication as the operation.
  • The set of all finite strings over some fixed alphabet Σ forms a monoid with string concatenation as the operation. The empty string serves as the identity element. This monoid is denoted Σ∗ and is called the *free monoid* over Σ. It is not commutative.
  • Given any monoid M, the opposite monoid Mop has the same carrier set and identity element as M, and its operation is defined by x •op y = yx. Any commutative monoid is the opposite monoid of itself.
  • Given two sets M and N endowed with monoid structure (or, in general, any finite number of monoids, M1, …, Mk), their Cartesian product M × N is also a monoid (respectively, M1 × ⋯ × Mk). The associative operation and the identity element are defined pairwise.7
  • Fix a monoid M. The set of all functions from a given set to M is also a monoid. The identity element is a constant function mapping any value to the identity of M; the associative operation is defined pointwise.
  • Fix a monoid M with the operation • and identity element e, and consider its power set P(M) consisting of all subsets of M. A binary operation for such subsets can be defined by ST = { st : sS, tT }. This turns P(M) into a monoid with identity element {e}. In the same way the power set of a group G is a monoid under the product of group subsets.
  • Let S be a set. The set of all functions SS forms a monoid under function composition. The identity is just the identity function. It is also called the *full transformation monoid of S. If S is finite with n elements, the monoid of functions on S is finite with nn* elements.
  • Generalizing the previous example, let C be a category and X an object of C. The set of all endomorphisms of X, denoted and(X), forms a monoid under the composition of morphisms. For more on the relationship between category theory and monoids see below.
  • The set of homeomorphism classes of compact surfaces with the connected sum. Its unit element is the class of the ordinary 2-sphere. Furthermore, if a denotes the class of the torus, and b denotes the class of the projective plane, then every element c of the monoid has a unique expression the form c = na + mb where n is a positive integer and m = 0, 1, or 2. We have 3b = a + b.
  • Let be a cyclic monoid of order n, that is, Then for some. In fact, each such k gives a distinct monoid of order n, and every cyclic monoid is isomorphic to one of these. Moreover, f can be considered as a function of the points given by or, equivalently
  • Multiplication of elements is then given by function composition. When then the function f is a permutation of and gives the unique cyclic group of order n.

메타데이터
post_id
4e4e2c7a144b
slug
monoid-4e4e2c7a144b
url
https://medium.com/@sameergr20/monoid-4e4e2c7a144b
canonical_url
https://medium.com/@sameergr20/monoid-4e4e2c7a144b
author_url
https://medium.com/@sameergr20
status
ok
fetched_at
2026-07-10 13:32:34