• Out of the 16 possible
binary Boolean operators, four have a two-sided identity that is also commutative and associative. These four each make the set a commutative monoid. Under the standard definitions,
AND and
XNOR have the identity while
XOR and
OR have the identity . 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 (number)|) or multiplication (identity element 1 (number)|). A submonoid of under addition is called a
numerical monoid. • The set of
positive integers is a commutative monoid under multiplication (identity element ). • Given a set , the set of subsets of is a commutative monoid under intersection (identity element is itself). • Given a set , the set of subsets of 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 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 a commutative monoid. • Any
semigroup may be turned into a monoid simply by adjoining an element not in and defining for all . This conversion of any semigroup to the monoid is done by the
free functor between the category of semigroups and the category of monoids. • Thus, an idempotent monoid (sometimes known as
find-first) may be formed by adjoining an identity element to the
left zero semigroup over a set . The opposite monoid (sometimes called
find-last) is formed from the
right zero semigroup over . • Adjoin an identity to the left-zero semigroup with two elements . Then the resulting idempotent monoid 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 .) • The
integers,
rational numbers,
real numbers or
complex numbers, with addition or multiplication as operation. • The set of all by
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 if has at least two elements. • Given any monoid , the
opposite monoid has the same carrier set and identity element as , and its operation is defined by . Any commutative monoid is the opposite monoid of itself. • Given two sets and endowed with monoid structure (or, in general, any finite number of monoids, ), their
Cartesian product , with the binary operation and identity element defined on corresponding coordinates, called the
direct product, is also a monoid (respectively, ). • Fix a monoid . The set of all functions from a given set to is also a monoid. The identity element is a
constant function mapping any value to the identity of ; the associative operation is defined
pointwise. • Fix a monoid with the operation and identity element , and consider its
power set consisting of all
subsets of . A binary operation for such subsets can be defined by . This turns into a monoid with identity element . In the same way the power set of a group is a monoid under the
product of group subsets. • Let be a set. The set of all functions forms a monoid under
function composition. The identity is just the
identity function. It is also called the
full transformation monoid of . If is finite with elements, the monoid of functions on is finite with elements. • Generalizing the previous example, let be a
category and an object of . The set of all
endomorphisms of , denoted , forms a monoid under 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 denotes the class of the
torus, and denotes the class of the projective plane, then every element of the monoid has a unique expression in the form where is a positive integer and , or . We have . • Let be a cyclic monoid of order , that is, . Then for some . Each such gives a distinct monoid of order , and every cyclic monoid is isomorphic to one of these.Moreover, can be considered as a function on the points given by \begin{bmatrix} 0 & 1 & 2 & \cdots & n-2 & n-1 \\ 1 & 2 & 3 & \cdots & n-1 & k\end{bmatrix} or, equivalently f(i) := \begin{cases} i+1, & \text{if } 0 \le i Multiplication of elements in is then given by function composition. When then the function is a permutation of , and gives the unique
cyclic group of order . == Properties ==