← All animations

🧊 Rubik's Cube

Six faces, nine stickers each, six colours. Twist any face and the whole puzzle re-shuffles β€” yet under the surface it's pure mathematics: a finite group of about 43 quintillion reachable states. Every twist is reversible, every scramble is solvable, and remarkably 20 moves is always enough. Turn the cube below, then see why structure β€” not brute force β€” is what cracks it.

1. Turn it β€” every twist is a real permutation

On the left is a 2.5-D view of the three faces nearest you; on the right is the unfolded net showing all six faces at once. Press a face button β€” U D L R F B for a clockwise quarter-turn, the primed Uβ€² … for counter-clockwise. The right stickers move, and a move followed by its prime cancels exactly, because each turn is a genuine permutation of the 54 stickers. The net always stays a valid, reachable cube state.

SOLVED
Moves:β€”

2. 43 quintillion states Β· "God's number" is 20

Count every position the cube can reach and you get 43,252,003,274,489,856,000 β‰ˆ 4.3 Γ— 1019 states β€” more than the number of grains of sand on Earth. And yet there's a hard ceiling: from any scramble, an optimal solution exists in 20 moves or fewer. That maximum is called God's number, proved by exhaustive computer search in 2010.

Reachable states: 0
A blind random walk can't find the solved state β€” it's one position in 43.2 quintillion. Humans and computers don't search; they build the solution layer by layer.

The animation below sketches a layer-by-layer solve: first the white cross, then the first-layer corners, the middle edges, and finally the last layer. Each stage shrinks the part of the cube that's still scrambled β€” turning one impossible search into four small, structured ones.

Stage 1 of 4 β€” White cross
It's a permutation group: moves compose (do one then another = a single new permutation), every move is reversible (its prime undoes it), and solving is simply finding a path back to the identity β€” the "do-nothing" position we call solved.

3. The group theory: generators, the cube group & commutators

Mathematically the cube is a group β€” a set of "moves" you can combine, where every move can be undone. The whole puzzle is built from just six generators: the face turns U D L R F B. Compose them in any order and you reach all 4.3Γ—1019 states; that set is the Rubik's cube group, written <U,D,L,R,F,B>.

  • Closed & reversible. Any sequence of turns is itself a single permutation in the group, and it has an inverse β€” read the moves backwards and prime each one. Solving = applying that inverse.
  • The identity. The solved cube is the do-nothing element. A move times its prime (e.g. R Rβ€²) returns to it. R repeated four times also returns: R has order 4.
  • Commutators β€” the solver's scalpel. The expression A B Aβ€² Bβ€² is a commutator. When A and B overlap in just a few pieces, it disturbs only those β€” letting you fix three corners or flip two edges while leaving everything else untouched.

Why brute force is hopeless. At a billion positions checked per second, scanning all 43 quintillion states would take over 1,000 years. No one solves the cube by searching. Instead they exploit structure: subgroups (states fixed by certain pieces), conjugation A B Aβ€² to "aim" a known trick at a new spot, and commutators to make tiny surgical changes. Layer-by-layer methods, CFOP, and Kociemba's two-phase algorithm all win the same way β€” by treating the cube as the elegant, reversible group it is, and walking a short path back to the identity.