Chapter 01 — Group Theory

The Math Behind
the Cube

The Rubik's Cube is one of the richest objects in combinatorics and group theory. Understanding the numbers makes solving feel less like memorization and more like science.

43 quintillion
Distinct permutations of a standard 3×3×3 cube
20
Maximum moves needed to solve any position (God's Number)
43,252,003,274,489,856,000
The exact number of possible states
6
Independent face layers — each a generator of the cube group

How many positions exist?

A cube has 8 corners, each with 3 orientations, and 12 edges, each with 2 orientations. Not all combinations are reachable, so we divide out invalid states.

(8! × 3⁸ × 12! × 2¹²) / 12 = 43,252,003,274,489,856,000

The ÷12 accounts for three constraints: you can never have exactly one pair of swapped edges, exactly one pair of swapped corners, or a single flipped edge in isolation. These are the parity rules.

The Cube Group

In abstract algebra, every valid sequence of moves forms a mathematical group called G — the Rubik's Cube group. Its order (size) is exactly the 43 quintillion number above.

Each face turn is a permutation of 20 moving pieces. Composing two moves means applying one permutation after another — this is group multiplication. The identity element is the solved state (do nothing).

G = < U, D, F, B, R, L > |G| = 43,252,003,274,489,856,000

Parity

Parity is why you can never swap just two pieces. Every legal move is an even permutation overall — so the set of reachable positions is a subgroup of the symmetric group. This halves the number of valid corner states and halves the edge states, and a third constraint halves the orientation states, giving the ÷12 divisor.

Parity explains the classic frustration: getting 99% solved only to find two edges swapped — that configuration is simply unreachable from a fully assembled cube without disassembling it.

God's Number — the diameter of the group

In 2010, a team using 35 CPU-years of computation proved that every one of the 43 quintillion positions can be solved in at most 20 moves (in the Half-Turn Metric). This upper bound is called God's Number — the maximum distance from the solved state across the entire group graph.

There are exactly 490 million positions that require exactly 20 moves. The average position requires about 18 moves to solve optimally.

Commutators & Conjugates

Most human speedsolving algorithms are built from two algebraic structures:

Commutator [A, B] = A B A⁻¹ B⁻¹ — applies A, then B, then undoes A, then undoes B. The result targets a small set of pieces while leaving the rest untouched.

Conjugate A B A⁻¹ — sets up a piece into position (A), does an operation (B), then restores (A⁻¹). This is the backbone of intuitive F2L and corner-insertion techniques.

[R, U] = R U R' U' — 3-cycle of corners [M, U] = M U M' U' — edge 3-cycle in M-slice
Chapter 02 — Method

Learn to Solve
the Cube

The beginner layer-by-layer method breaks an impossible puzzle into seven manageable steps. Each step has a clear goal and a small set of moves to learn.

Notation Reference

UTop clockwise
U'Top counter-CW
DBottom CW
FFront CW
F'Front counter-CW
RRight CW
R'Right counter-CW
LLeft CW
BBack CW
2Half turn (180°)

Hold the cube with green facing you and white on top throughout.

01

White Cross

Build a cross on the white face — four edge pieces with white on top and each side colour matching its centre. Solve intuitively by rotating each white edge from the bottom layer up.

Intuitive
02

White Corners (F2L bottom layer)

Insert the four white corner pieces to complete the first layer. Find a white corner in the bottom layer beneath its target slot, then use the Right Trigger: R U R' U'. Repeat until the corner drops in.

1 algorithm
03

Middle Layer Edges

Insert the four middle-layer edges (they have no yellow). Align the edge on the top, then use either the Right Insert or Left Insert depending on whether the piece goes right or left.

Right: U R U' R' U' F' U F
Left: U' L' U L U F U' F'
2 algorithms
04

Yellow Cross (OLL part 1)

Orient the top layer edges to make a yellow cross. Look at the top face: if you see a dot, line, or L-shape, apply F R U R' U' F'. Repeat as needed — at most 3 times.

F R U R' U' F'
1 algorithm
05

Orient Yellow Corners (OLL part 2)

Get all yellow stickers facing up. Hold any non-yellow corner in the front-right position, then spam the Sune algorithm until that corner is correct, then turn U to bring the next misoriented corner to front-right. Never turn U while mid-algorithm.

R U R' U R U2 R' (Sune)
1 algorithm
06

Permute Yellow Corners (PLL part 1)

Get all corners in their correct positions (colors matching sides, even if top still needs fixing). Look for two corners that are already correct relative to each other — hold them in the back, then apply the headlights algorithm.

R U' R U R U R U' R' U' R2
1 algorithm
07

Permute Yellow Edges (PLL part 2)

Cycle the top-layer edges into place. One face will likely already be solved — hold it toward you, then apply the edge cycle below. If no face is solved, apply the algorithm once first.

F2 U L R' F2 L' R U F2
1 algorithm — you're done!

Next: CFOP Speedsolving

Once comfortable with the beginner method, speedsolvers move to CFOP (Cross, F2L, OLL, PLL). Instead of steps 2–3 above, all four middle pairs are solved simultaneously using 41 pattern-recognition cases. Full OLL has 57 cases and full PLL has 21 — but you can learn just 2-look versions first.

Visit the Cube Algorithms page for the full OLL and PLL algorithm sets.

Chapter 03 — Reference

Cube Algorithms

A curated reference of essential move sequences for CFOP solving. Click any algorithm to copy it to your clipboard.

Fundamentals
Right TriggerCornerstone of F2L
R · U · R' · U'
Left TriggerMirror of right trigger
L' · U' · L · U
Sexy Move4-move commutator
R · U · R' · U' ×6 = identity
SledgehammerR'-D'-R-D family
R' · F · R · F'
OLL — Orient Last Layer (2-look)
Cross OLLDot → Line → Cross
F · R · U · R' · U' · F'
Anti-Cross OLLBack cross variant
f · R · U · R' · U' · f'
SuneOrient corners CW
R · U · R' · U · R · U2 · R'
Anti-SuneOrient corners CCW
R · U2 · R' · U' · R · U' · R'
OLL 21 — HeadlightsAll corners bad
R · U2 · R' · U' · R · U · R' · U' · R · U' · R'
OLL 57 — All edges flipPi / H case
R · U · R' · U' · M' · U · R · U' · M
PLL — Permute Last Layer (essential cases)
T-PermSwap 2 corners + 2 edges
R U R' U' R' F R2 U' R' U' R U R' F'
Y-PermSwap 2 corners + 2 edges (diagonal)
F R U' R' U' R U R' F' R U R' U' R' F R F'
U-Perm (a)3-cycle edges clockwise
R U' R U R U R U' R' U' R2
U-Perm (b)3-cycle edges counter-CW
R2 U R U R' U' R' U' R' U R'
A-Perm (a)3-cycle corners CW
x R' U R' D2 R U' R' D2 R2 x'
E-PermSwap opposite edges + corners
x' R U' R' D R U R' D' R U R' D R U' R' D' x
Z-PermSwap all 4 edges (opposite)
M' U M2 U M2 U M' U2 M2
H-PermSwap all 4 edges (adjacent)
M2 U M2 U2 M2 U M2
F2L — First Two Layers (key insertions)
Basic Right InsertCorner + edge aligned
U R U' R'
Basic Left InsertMirror case
U' L' U L
Split & Insert RightEdge in slot, corner on top
U R U2 R' U R U' R'
F2L #4 — Hiding trickCorner in slot, edge on top
R U' R' U2 F' U' F
Pair already pairedBoth pieces together, wrong slot
R U2 R' U' R U R'

What is a Rubik's Cube Solver?

Learn how to solve a Rubik's Cube step by step, understand cube notation, and explore the mathematics behind the world's most famous puzzle.