Algebra 2 | Semigroups
Based on The Bright Side of Mathematics's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
A binary operation on S is a rule F: S × S → S that combines two elements of S into a single element of S.
Briefing
Semigroups are built from the simplest ingredients: a set S together with a binary operation ◦ that combines any two elements of S into another element of S. The key requirement is closure—whenever a and b lie in S, the result a ◦ b must also lie in S. From there, the central upgrade over a generic binary operation is associativity, which guarantees that parentheses can be dropped when combining three (or more) elements.
A binary operation is any function F: S × S → S, but it’s usually written in operation form like a ◦ b (or sometimes with symbols such as ⋆, multiplication, or +, depending on the context). For finite sets, an operation can be fully specified by an operation table listing the output for every ordered pair (a, b). Importantly, order can matter: in general, a ◦ b need not equal b ◦ a, and different parenthesizations of a ◦ b ◦ c can produce different results.
Associativity is the property that prevents that parenthesis problem. For all a, b, c in S, associativity requires (a ◦ b) ◦ c = a ◦ (b ◦ c). When this holds, the operation becomes “parenthesis-free” in practice: the overall order of the elements stays the same, but the grouping no longer changes the outcome. That’s the defining feature of a semigroup.
Formally, a semigroup is the pair (S, ◦) where S is a set and ◦ is an associative binary operation on S. The video emphasizes that this structure isn’t complicated—there are only two components, and the whole point is enforcing associativity on top of closure.
A concrete example comes from functions. Take the set S to be all functions from R to R. Define the binary operation ◦ as function composition: for functions f and g, the composition f ◦ g is the function that applies g first and then f. The operation is closed because composing two functions R → R always produces another function R → R.
To check associativity, pick three functions F1, F2, F3. Consider two ways to compose them: (F1 ◦ F2) ◦ F3 and F1 ◦ (F2 ◦ F3). Evaluating either composite at an arbitrary real number x shows both constructions yield the same output: the nested application of F3 to x, then F2, then F1, occurs in the same order regardless of how parentheses are placed. Since the resulting functions match for every x in R, composition is associative.
With that, (S, ◦) becomes a semigroup: the set of all real-to-real functions under composition. The payoff is that associativity makes longer compositions unambiguous without constant bookkeeping, setting the stage for exploring what semigroups can do next.
Cornell Notes
A semigroup is a set S equipped with a binary operation ◦ that is closed and associative. Closure means that for any a, b in S, the result a ◦ b is still in S. Associativity means parentheses don’t affect the outcome: (a ◦ b) ◦ c = a ◦ (b ◦ c) for all a, b, c in S. This property lets expressions like a ◦ b ◦ c be written without specifying grouping, as long as the left-to-right order of elements stays the same. Function composition on the set of all functions from R to R is the main example: composing functions is closed and associative, so it forms a semigroup.
What exactly counts as a binary operation on a set S?
Why does closure matter when restricting an operation to a subset?
How can operation tables show that order and parentheses can matter?
What is the precise associativity condition for a semigroup?
Why is function composition associative for functions R → R?
Review Questions
- In a semigroup (S, ◦), what two properties must ◦ satisfy, and how do they differ?
- Give an example of how an operation table can demonstrate non-commutativity or non-associativity.
- For functions from R to R, write the associativity equation using ◦ and explain what happens when you evaluate it at a real number x.
Key Points
- 1
A binary operation on S is a rule F: S × S → S that combines two elements of S into a single element of S.
- 2
Closure is the non-negotiable requirement: for all a, b in S, the result a ◦ b must lie in S.
- 3
Binary operations need not be commutative; a ◦ b can differ from b ◦ a.
- 4
Associativity is the condition that makes parentheses irrelevant: (a ◦ b) ◦ c = a ◦ (b ◦ c) for all a, b, c in S.
- 5
A semigroup is exactly a pair (S, ◦) where ◦ is associative (and therefore closed) on S.
- 6
Function composition on the set of all functions R → R is closed and associative, so it forms a semigroup.