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 length of a word over an alphabet is the number of symbol positions in that finite string, counting repetitions. Thus and for the empty word. Concatenation satisfies . This differs from the word length of a group element, which minimizes over representing words using a chosen generating set of a group.