Get AI summaries of any video or article — Sign up free
Algebra 2 | Semigroups thumbnail

Algebra 2 | Semigroups

5 min read

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.

TL;DR

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?

A binary operation on S is a rule that takes two elements from S and returns a single element in S. Formally, it can be viewed as a function F: S × S → S. Notation varies: it may be written as a ◦ b, or sometimes as a ⋆ b, or even as multiplication or addition symbols in special contexts. The crucial point is that the output must land back in S.

Why does closure matter when restricting an operation to a subset?

Closure ensures that combining any two allowed elements still produces an allowed element. If an operation is defined on a larger set but you restrict it to a subset T ⊆ S, then T only supports a binary operation if for every a, b in T, the result a ◦ b remains in T. If some combination falls outside T, the restricted rule no longer qualifies as a binary operation on T.

How can operation tables show that order and parentheses can matter?

For a finite set, an operation table lists the output for every ordered pair (a, b). Because the table depends on the ordered pair, it can show that a ◦ b may differ from b ◦ a (commutativity is not guaranteed). It also reveals that different parenthesizations of a ◦ b ◦ c can yield different results when associativity fails.

What is the precise associativity condition for a semigroup?

Associativity requires that for all a, b, c in S, (a ◦ b) ◦ c equals a ◦ (b ◦ c). This equality must hold for every triple of elements, not just some cases. When it holds, parentheses can be omitted because grouping no longer changes the final result.

Why is function composition associative for functions R → R?

Take three functions F1, F2, F3 and evaluate both (F1 ◦ F2) ◦ F3 and F1 ◦ (F2 ◦ F3) at an arbitrary real number x. In both cases, the value ends up being F1(F2(F3(x))). Since both parenthesizations produce the same output for every x, the composed functions are identical, so composition is associative.

Review Questions

  1. In a semigroup (S, ◦), what two properties must ◦ satisfy, and how do they differ?
  2. Give an example of how an operation table can demonstrate non-commutativity or non-associativity.
  3. 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. 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. 2

    Closure is the non-negotiable requirement: for all a, b in S, the result a ◦ b must lie in S.

  3. 3

    Binary operations need not be commutative; a ◦ b can differ from b ◦ a.

  4. 4

    Associativity is the condition that makes parentheses irrelevant: (a ◦ b) ◦ c = a ◦ (b ◦ c) for all a, b, c in S.

  5. 5

    A semigroup is exactly a pair (S, ◦) where ◦ is associative (and therefore closed) on S.

  6. 6

    Function composition on the set of all functions R → R is closed and associative, so it forms a semigroup.

Highlights

Associativity is what turns a messy expression like (a ◦ b) ◦ c vs. a ◦ (b ◦ c) into a single unambiguous result.
A semigroup is just a set plus an associative binary operation—no extra structure is required.
Operation tables reveal both non-commutativity (a ◦ b ≠ b ◦ a) and non-associativity when parentheses change outcomes.
Composing functions R → R always stays within the same set, and the order of application F1(F2(F3(x))) stays consistent regardless of parentheses.

Topics