AnyLearn
All lessons
Mathintermediate

What a Group Is, and Why the Axioms Are So Bare

A group is a set with one operation obeying four rules, and that deliberate poverty is the point: anything proved about groups holds for rotations, permutations, integers, XOR and Rubik's cube at once. This lesson builds the definition from symmetry, works through the symmetries of a square, and shows where groups already sit in code.

Updated · AI-authored, review-gated · how lessons are made

Not signed in: your progress and quiz score won't be saved.
Progress1 / 10

Symmetry is a thing you do, not a property you have

Ask what makes a square symmetric and the useful answer is not "it looks the same on both sides". It is that there is a list of things you can do to it which leave it looking identical: rotate a quarter turn, flip it about a diagonal, and so on.

That shift, from symmetry as an adjective to symmetry as a collection of actions, is what makes it mathematics. And the collection has structure of its own. Do two symmetries in a row and you get a symmetry. Every symmetry can be undone. Doing nothing is a symmetry.

Key idea: Groups are what you get when you take that observation seriously. The subject studies the set of allowed actions rather than the object they act on, which is why the same theorem covers a crystal, a shuffle, and an error-correcting code.

Full lesson text

All 10 steps on one page, for reading, reference, and search.

Show

1. Symmetry is a thing you do, not a property you have

Ask what makes a square symmetric and the useful answer is not "it looks the same on both sides". It is that there is a list of things you can do to it which leave it looking identical: rotate a quarter turn, flip it about a diagonal, and so on.

That shift, from symmetry as an adjective to symmetry as a collection of actions, is what makes it mathematics. And the collection has structure of its own. Do two symmetries in a row and you get a symmetry. Every symmetry can be undone. Doing nothing is a symmetry.

Key idea: Groups are what you get when you take that observation seriously. The subject studies the set of allowed actions rather than the object they act on, which is why the same theorem covers a crystal, a shuffle, and an error-correcting code.

2. Four rules, and nothing else

A group is a set GG with one operation, written as juxtaposition, satisfying exactly four conditions:

  1. Closure. a,bG    abGa, b \in G \implies ab \in G. Combining two elements never leaves the set.
  2. Associativity. (ab)c=a(bc)(ab)c = a(bc). Grouping does not matter.
  3. Identity. There is an ee with ea=ae=aea = ae = a for all aa. Doing nothing is available.
  4. Inverses. Every aa has an a1a^{-1} with aa1=ea a^{-1} = e. Everything is undoable.

Notice what is absent. No requirement that ab=baab = ba. No second operation. No numbers, no ordering, no notion of size or distance.

Definition: A group is a set with an associative operation that has an identity and in which every element is invertible. A group where ab=baab = ba always holds is called abelian, after Niels Abel, who appears again at the end of this course.

3. The symmetries of a square

Number the corners 1 to 4. Every symmetry of the square permutes them, and there are exactly eight:

ElementActionOrder
eedo nothing1
rrrotate 90 degrees4
r2r^2rotate 180 degrees2
r3r^3rotate 270 degrees4
ssflip about the vertical axis2
rsrsflip about a diagonal2
r2sr^2 sflip about the horizontal axis2
r3sr^3 sflip about the other diagonal2

This is the dihedral group D4D_4, of order 8. Every element is built from two generators, one rotation and one reflection, and the whole group collapses into two relations: r4=er^4 = e and s2=es^2 = e, plus one more that says how they interact.

The order of an element is how many times you apply it to get back to the identity. Rotating by 90 degrees four times returns the square to start, so rr has order 4.

4. Order matters, and that is the interesting part

Predict first

Take a square. Rotate it 90 degrees clockwise, then flip it about the vertical axis. Now start again from the original and do the flip first, then the rotation. Do you end up in the same place?

That failure of commutativity is not an awkwardness to be worked around. It is the source of nearly everything interesting in group theory. Abelian groups are, broadly, well understood and finitely classified. Non-abelian groups contain the whole subject: the symmetric groups, the Rubik's cube, the symmetries of physical law, and the obstruction that kills the quintic formula.

5. You have been using groups all along

SetOperationIdentityInverseAbelian?
Integersaddition0a-ayes
Non-zero rationalsmultiplication11/a1/ayes
Zn\mathbb{Z}_naddition mod nn0nan - ayes
Bit stringsXORall zerositselfyes
Permutations of nn itemscompositionleave in placeundo the shuffleno, for n3n \geq 3
Invertible matricesmultiplicationIIA1A^{-1}no
Rotations of a spherecompositionno rotationrotate backno

The XOR row is worth pausing on. Every bit string is its own inverse, since aa=0a \oplus a = 0, which is exactly why XOR encryption decrypts with the same operation and why XOR-based checksums cancel cleanly.

The integers under multiplication are not a group: 2 has no integer inverse. One missing axiom is enough to disqualify.

6. Generators: describing a big group with a few elements

A single element generates everything you can reach by repeating it. In Z12\mathbb{Z}_{12} under addition, starting from 5 gives 5,10,3,8,1,6,11,4,9,2,7,05, 10, 3, 8, 1, 6, 11, 4, 9, 2, 7, 0: all twelve. Starting from 4 gives only 4,8,04, 8, 0.

def generated(start, n):
    seen, x = [], 0
    while True:
        x = (x + start) % n
        seen.append(x)
        if x == 0:
            return seen

generated(5, 12)   # 12 elements: 5 generates all of Z_12
generated(4, 12)   # 3 elements:  4, 8, 0

A group generated by one element is cyclic. Which elements generate Zn\mathbb{Z}_n? Exactly those coprime to nn, which is the same condition that governed modular inverses in the discrete mathematics course. That is not a coincidence, and the next lesson explains why the two facts are the same fact.

7. How many symmetries do familiar objects have?

Size of the full symmetry group, including reflections
number of symmetries05010015068122448120trianglesquarehexagontetrahedroncubeicosahedron
Source: Standard results: dihedral group of order 2n for a regular n-gon; 24, 48 and 120 for the tetrahedral, octahedral and icosahedral groups

A regular nn-gon has 2n2n symmetries: nn rotations and nn reflections. In three dimensions the counts jump, because rotation axes multiply.

The cube and the octahedron both have 48, and the dodecahedron and icosahedron both have 120. That is not an accident of counting: each pair is dual, one's vertices sitting at the other's face centres, so a symmetry of either is a symmetry of both. Two objects that look nothing alike have literally the same symmetry group, which is exactly the kind of statement the bare definition was built to support.

8. Rubik's cube is a group, and the number is the point

Take the moves of a Rubik's cube as elements: closure holds (a sequence of moves is a move), associativity holds, doing nothing is the identity, and every sequence can be undone. It is a group, and its order can be counted directly:

G=8!3712!2112=43,252,003,274,489,856,000|G| = \frac{8! \cdot 3^7 \cdot 12! \cdot 2^{11}}{2} = 43{,}252{,}003{,}274{,}489{,}856{,}000

The 8!8! and 12!12! are arrangements of corners and edges; the powers of 3 and 2 are their orientations, each with one degree of freedom removed because the last piece's twist is forced; the final division by 2 is because corner and edge permutations cannot have opposite parity.

In practice: Every one of those constraints is a group-theoretic fact, and each is why certain "impossible" cube states exist. A single twisted corner or a single swapped pair of edges cannot be reached by legal moves, which is how you can tell a cube has been prised apart and reassembled rather than scrambled.

9. Why the definition was made so weak

A stronger definition would prove more about fewer things. The four axioms were chosen to be the smallest set that still supports substantial theorems, and the payoff is reach.

When you prove that every element of a finite group has an order dividing the group's size, you have simultaneously proved a fact about clock arithmetic, a fact about card shuffles, a fact about crystal symmetries, and Fermat's little theorem. Nobody has to notice the connection; it is forced by the axioms.

Key idea: Abstraction here is not decoration. It is a compression scheme for theorems. The cost is that a group on its own tells you almost nothing about the object it came from, so the practical skill is recognising when a situation is a group, and then reading the results off the shelf.

The next lesson proves the theorem just described, and the one after it shows how physics and chemistry read their results off that same shelf.

10. Checking whether something is a group

Given a set and an operation, four questions settle it, and the failures are more informative than the successes.

  1. Is it closed? Odd integers under addition fail immediately: two odds sum to an even.
  2. Is it associative? Subtraction fails: (53)1=1(5 - 3) - 1 = 1 but 5(31)=35 - (3 - 1) = 3. Function composition and matrix multiplication always pass.
  3. Is there an identity? Positive integers under addition have none, since 0 is excluded.
  4. Does every element have an inverse? This is the usual failure. Integers under multiplication, square matrices under multiplication, and strings under concatenation all fall here.

Structures that fail only the last test are common enough to have their own name, monoids, and they are what you have whenever an operation composes and has a unit but cannot be undone: string concatenation, list append, and the merge step of a MapReduce.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. Which of these is NOT a group?
    • Integers under multiplication
    • Integers under addition
    • Bit strings under XOR
    • Permutations of 5 items under composition
  2. In D4, the symmetries of a square, what is sr (flip then rotate) equal to?
    • rs, since composition of symmetries commutes
    • e, since a flip and a rotation cancel
    • r^3 s, since the group is non-abelian
    • s, since the rotation has no effect after a flip
  3. Why do the cube and the octahedron have the same symmetry group of order 48?
    • They both have 12 edges
    • They are dual: one's vertices sit at the other's face centres, so any symmetry of one is a symmetry of the other
    • Both are inscribed in the same sphere
    • It is a coincidence of the counting formula
  4. String concatenation is associative and has an identity (the empty string), but is not a group. What fails?
    • Closure, since concatenating strings can exceed the type's length
    • Associativity, since the order of concatenation matters
    • It is a group, since all four axioms hold
    • Inverses: no string can be concatenated onto "abc" to yield the empty string
  5. Which elements of Z_12 under addition generate the whole group?
    • Only 1 and 11
    • Exactly those coprime to 12: 1, 5, 7, and 11
    • All non-zero elements
    • The even elements, since they cycle through 0

Related lessons

Math
advanced

Why There Is No Quintic Formula

Quadratics, cubics and quartics all have formulas in radicals. The general fifth-degree equation has none, and not because nobody clever enough has tried. This lesson explains how permuting the roots turns an algebra question into a group question, and why the answer changes at degree five when a group of order 60 refuses to break down.

10 steps·~15 min
Math
intermediate

Symmetry Groups: Crystals, Conservation Laws, and Neural Networks

Group theory earns its keep when a symmetry argument settles a physical question no calculation was going to answer. This lesson covers group actions and counting up to symmetry, why crystals cannot have five-fold rotation and what happened when one did, Noether's link between symmetry and conservation, and how the same idea is built into modern networks.

10 steps·~15 min
Math
intermediate

Subgroups, Cosets, and Lagrange's Theorem

Cosets cut a group into equal-sized blocks, and one counting argument then forces every subgroup's size to divide the group's. This lesson proves that, derives Fermat's little theorem from it as a corollary, and introduces the maps that let you compare two groups and say precisely when they are the same object.

10 steps·~15 min
Math
intermediate

Convexity: the property that decides what is solvable

Convexity is what separates optimization problems you can solve with a guarantee from ones you can only hope about. This lesson defines convex sets and functions, proves why every local minimum is global, and gives you the operations that let you recognise convexity without touching a Hessian.

11 steps·~17 min