Abstract Algebra: Monoids, Groups, Semirings, and Fields
The Hierarchy of Algebraic Structures
Abstract algebra studies mathematical structures by specifying the operations and properties they must satisfy. Each structure adds more requirements, making it more powerful but more restrictive.
Monoids
Definition
A monoid is a triple where:
- is a set
- is a binary operation (closed)
- is the identity element
satisfying:
- Associativity: for all
- Identity: for all
Examples
| Monoid | Operation | Identity |
|---|---|---|
| Addition | ||
| Multiplication | ||
| String concatenation | ||
| Relational composition | ||
| Union | ||
| Intersection |
Commutative Monoid
A monoid is commutative (or abelian) if for all .
Examples: , .
Non-example: is NOT commutative ( in general).
Examinable: Endo-Relations Form a Monoid
Theorem: For any set , the endo-relations form a monoid.
Proof:
- Closure: Composition of relations and yields .
- Associativity: Already proved: .
- Identity: .
Groups
Definition
A group is a monoid where every element has an inverse.
For each , there exists such that:
Examples
| Group | Operation | Identity | Inverse |
|---|---|---|---|
| Addition | |||
| Multiplication | |||
| mod | Addition mod | ||
| Symmetric group | Permutation composition | Identity permutation | Inverse permutation |
Abelian Group
A group is abelian if the operation is commutative.
Key Property
In a group, equations are always solvable: for any , there exists a unique with (namely ).
Non-examples
- is NOT a group (no additive inverses)
- is NOT a group (most elements lack multiplicative inverses)
Semirings
Definition
A semiring is a structure where:
- is a commutative monoid (addition)
- is a monoid (multiplication)
- Distributivity: and
- Annihilation:
Examples
| Semiring | Addition | Multiply | Zero | One |
|---|---|---|---|---|
| Boolean semiring | (OR) | (AND) | ||
| Min-plus (tropical) | ||||
| Max-plus |
The Boolean Semiring
This is the foundation for:
- Relational composition via matrix multiplication
- Reachability in graphs
The Min-Plus Semiring (Tropical)
Applications:
- Shortest path algorithms
- Dynamic programming optimisation
Rings
Definition
A ring is a semiring where is an abelian group.
Every element has an additive inverse.
Examples
- : integers (additive inverse is negation)
- : integers mod
- Polynomials over
Non-example
is NOT a ring (no additive inverses).
Fields
Definition
A field is a commutative ring where every non-zero element has a multiplicative inverse.
satisfies:
- is an abelian group
- is an abelian group
- Distributivity holds
Examples
- : rational numbers
- : real numbers
- : complex numbers
- : integers mod , where is prime
Key Theorem
Theorem: (integers mod ) is a field if and only if is prime.
Proof:
- If is prime and , then .
- By Bézout’s identity, with .
- Thus , so has a multiplicative inverse.
- If is composite, say with , then are zero divisors and cannot have inverses.
Why This Matters for Cryptography
being a field is essential for:
- Diffie-Hellman key exchange: relies on exponentiation in
- RSA: requires computing inverses mod
Summary Table
| Structure | Addition | Multiplication | Key Property |
|---|---|---|---|
| Monoid | Associative + Identity | — | Minimal structure |
| Group | Inverses exist | — | Equations solvable |
| Semiring | Commutative monoid | Monoid | Matrix multiplication works |
| Ring | Abelian group | Monoid | Can subtract |
| Field | Abelian group | Abelian group (except 0) | Can divide |
Tripos Questions
2016 P2 Q6: Prove that the set of all strings over alphabet under concatenation forms a monoid. Is it a group?
2020 P2 Q9: Show that is a field when is prime. Explain why for .
Summary
- Monoid: set + operation + identity + associativity
- Group: monoid + inverses
- Semiring: two operations, distributivity, additive identity annihilates
- Ring: semiring + additive inverses
- Field: ring + multiplicative inverses (except zero)
- is a field iff is prime (foundational for cryptography)