Free monoid Created 2026-10-03 Updated 2026-10-14
The free monoid on an alphabet consists of all finite words over an alphabet, including the empty word , with concatenation as its binary operation. Distinct strings represent distinct elements: there are no imposed equalities between different sequences of letters. The empty word is its identity element, and concatenation has the associative property.[ref]
For , the elements begin . Both and give the same word , but , so this monoid is not commutative. The length of a word over an alphabet obeys ; it is a monoid homomorphism to the nonnegative integers with addition. A nonempty word has no inverse element, since joining it to any other word cannot decrease its length to zero.
The defining benefit of being free is that letters can stand for arbitrary elements of another monoid. Choose a value for each letter ; then , with , is the unique monoid homomorphism extending those choices. Associativity and the identity element make this evaluation consistent for every finite word. For example, interpreting the letters as self-maps evaluates a word as a composed transformation; interpreting them as nonnegative counts evaluates it by addition.
The full transformation monoid consists of every self-map of , with function composition as its binary operation. For , there are four functions: the identity function , the swap , and the constant functions . Their composition order matters: , whereas . Thus associativity does not imply commutativity.
Figure 1. . The arrow diagrams show each function. The Cayley table reads row , column as , applying first. Only and have inverse elements. The constant functions lose information and satisfy idempotence. Details.
Only and are bijections, and their inverse elements are themselves. They form a two-element group within this monoid. The constant functions instead satisfy and , so they are idempotent elements of a semigroup. Such irreversible transformations explain why the monoid setting is useful even when a group would be too restrictive.
Function composition Created 2026-09-24 Updated 2026-10-14
For functions and , their function composition is , defined by . The rightmost function is applied first. Matching the intermediate codomain and domain of a function makes the expression well-defined.
For self-maps of the real numbers, take and . Then , whereas . Thus function composition need not be commutative. It does have the associative property: both and evaluate to whenever each intermediate codomain matches the next domain of a function. The identity function leaves composition unchanged, making self-maps particularly useful as a monoid of transformations.
Identity element Created 2026-09-24 Updated 2026-10-14
An identity element for a binary operation satisfies for every element of the underlying set. It is a two-sided identity: merely satisfying one of the two equations is insufficient. It is unique when it exists, since two candidates satisfy . This uniqueness does not require the associative property.
Inverse element Created 2026-09-24 Updated 2026-10-14
An inverse element of in a monoid is an element satisfying , where is the identity element. Its notation is . Some elements of a monoid can lack an inverse element; a group requires one for every element. Associativity makes a two-sided inverse element unique: if both invert , then .
For the full transformation monoid, a self-map has an inverse element exactly when it is a bijection; that element is its inverse function. On , the swap is its own inverse element, while a constant function has none because it merges the two inputs.
Monoid Created 2026-09-28 Updated 2026-10-14
A monoid is a semigroup with a two-sided identity element : for every element . Associativity handles the grouping of a nonempty sequence; the identity element also supplies the result for an empty sequence. This makes the same rules apply to combining zero, one, or many contributions. [ref].
The nonnegative integers with addition form a commutative monoid, with identity element zero. They do not form a group: a positive integer has no additive inverse in that set. All words over an alphabet with concatenation form a free monoid, whose identity element is the empty word. The full transformation monoid consists of all self-maps of a set, with function composition and the identity function.
These examples explain why monoids are useful: accumulation needs an operation and a starting value, but it need not be reversible. Adding counts, joining strings, and composing transformations all share the same grouping and identity laws. Requiring every element to have an inverse element gives a group, a stronger structure suitable for reversible operations.
Self-map 2026-10-14
A self-map is a function whose domain of a function and codomain are the same set. It need not be a bijection: a constant function on a two-element set is a self-map that merges its inputs. Self-maps can always be composed with one another, and all self-maps of a specified set form its full transformation monoid.
Transformation monoid 2026-10-14
A transformation monoid is a collection of self-maps of a fixed set that contains the identity function and is closed under function composition. The associative property comes from function composition. A monoid action describes transformations of a set that obey a monoid's multiplication and identity laws.