红色花朵开在海边花园中,远处是蓝色海湾
浅滩群岛的罂粟花 · Childe Hassam / National Gallery of Art

Associativity makes a sequence of operations unambiguous once its input order is fixed. This is the common feature behind concatenating strings, composing functions, and adding integers.

1. From Magmas to Monoids

A magma (S,∗)(S,\ast) is a nonempty set with a binary operation. A semigroup is a magma whose operation is associative. A monoid is a semigroup with a two-sided identity. Commutativity is an additional property at each level.

StructureClassificationReason
Integers under subtractionMagmaThe two groupings of 5−3−15-3-1 give 11 and 33
Positive integers under additionSemigroupAddition is associative and the candidate identity 00 is outside the set
Nonnegative integers under additionMonoid00 is an identity
Functions S→SS\to S under compositionMonoidBoth groupings evaluate at xx to f(g(h(x)))f(g(h(x))), and the identity is the identity function
Relations on SS under compositionMonoidRelation composition is associative and the identity is {(x,x):x∈S}\{(x,x):x\in S\}

For a nonempty alphabet AA, let A+A^+ be the nonempty finite words and A∗=A+∪{ε}A^*=A^+\cup\{\varepsilon\} all finite words. Concatenation preserves the character sequence under regrouping. Thus A+A^+ is the free semigroup and A∗A^* the free monoid on AA. The empty word ε\varepsilon is the identity. With two distinct letters, abab and baba exhibit failure of commutativity.

2. Consecutive Products and Powers

Associativity implies that all full parenthesizations of a1∗⋯∗ana_1\ast\cdots\ast a_n give the same value. Induct on nn. Every parenthesization splits the word into a prefix and suffix. By induction, each part takes a fixed value. If the suffix has more than one term, its value can be written as its initial product followed by ana_n. One application of associativity moves that final factor outside the product of the first n−1n-1 terms. Induction makes that prefix independent of the original split.

Define a1=aa^1=a and an+1=an∗aa^{n+1}=a^n\ast a. Joining two runs of aa gives am∗an=am+na^m\ast a^n=a^{m+n} and repeating an ama^m block gives (am)n=amn(a^m)^n=a^{mn} for positive m,nm,n. In a monoid, setting a0=ea^0=e extends both formulas to nonnegative exponents. For different factors, (a∗b)2=a∗b∗a∗b(a\ast b)^2=a\ast b\ast a\ast b. Rearranging the middle factors to obtain a2∗b2a^2\ast b^2 requires a reason such as a∗b=b∗aa\ast b=b\ast a.

3. Subsemigroups and Submonoids

A nonempty subset T⊆ST\subseteq S is a subsemigroup if a∗b∈Ta\ast b\in T for all a,b∈Ta,b\in T. Associativity is inherited. A submonoid of a monoid also contains the identity of the ambient monoid. A nonempty intersection of subsemigroups is closed because a product of two common elements belongs to each set. An intersection of submonoids also contains the common ambient identity.

Worked example. Classify the even integers under multiplication as a subset of (Z,⋅)(\mathbb Z,\cdot). Then classify {0}\{0\} in the same ambient monoid.

Show the classification

The even integers are nonempty, and (2a)(2b)=2(2ab)(2a)(2b)=2(2ab) remains even. They form a subsemigroup. Their identity would have to satisfy 2e=22e=2, forcing e=1e=1, which is outside the subset. The singleton {0}\{0\} is closed and has its own identity 00, since its only product is 0⋅0=00\cdot0=0. The ambient identity is 11, so this singleton fails the submonoid condition.

4. Generated Subsemigroups

The subsemigroup generated by aa is ⟨a⟩+={an:n≥1}\langle a\rangle_+=\{a^n:n\ge1\}. It is closed by the power law. Every subsemigroup containing aa also contains every positive power by induction, which proves minimality. A generated submonoid includes a0a^0 as well.

Self-check. In (Z/6Z,⋅)(\mathbb Z/6\mathbb Z,\cdot), compute the subsemigroup and submonoid generated by [2][2].

Show the powers

The first powers are [2],[4],[2][2],[4],[2]. Multiplication by [2][2] alternates between the first two values, so the generated subsemigroup is {[2],[4]}\{[2],[4]\}. Its ambient monoid has identity [1][1], so the generated submonoid is {[1],[2],[4]}\{[1],[2],[4]\}.

Sources

  • Bernard Kolman, Robert C. Busby, and Sharon Cutler Ross, Discrete Mathematical Structures, 6th edition, Section 9.2.
  • Course slides.

Updated:

AlgebraSemigroupsMonoids