Practice and troubleshoot / 16

How to Reverse a Cube Algorithm: Inverses and Undo

Reverse the move order and invert each turn to return to a known state. Learn why adding primes alone is not enough.

To undo a whole cube sequence, do two things: reverse the order of its moves, then invert each move. Adding primes while keeping the original order usually does not restore the starting state.

Start with the inverse of one move

The inverse of R is R', and the inverse of U' is U. Half turns are special: F2 followed by F2 restores the original orientation, so its inverse is still F2. This compares the final cube state, regardless of which direction you physically take through the half turn.

In free practice, make R followed by R' and confirm restoration. Then try two F2 turns. Once the single-move inverses make sense, move on to a short sequence.

A concrete three-move example

Start from a solved cube and make R U F2. Since F2 was the last move, it must be the first move you undo. Reverse the order to F2, U, R, then invert each one:

F2 U' R'

The original sequence followed by this inverse should return to the start. This also explains why undo acts on the most recent turn. Undoing the earliest R first would apply it after later moves had already changed the cube; that is not the original context.

Known history is different from an unknown state

If a scramble began from a solved cube, its complete move history is known, and no further moves were made, the inverse scramble restores the solved state. That does not mean you can recognize and solve any arbitrary cube position. It uses a known history.

If you made your own turns after scrambling, reversing only the initial scramble is not guaranteed to solve the cube. Undo the added moves first, or reverse and invert the full history. Algorithms likewise depend on their starting case; they are not unconditional strings of letters.

Use this idea in Cube Room

Free practice keeps the scramble and your own moves. Undo reverses completed turns one at a time. The guided lesson can also return to the current stage's start. A demonstration uses a separate copy, so closing it requires no inverse on your original cube: that cube never followed the demonstration.

Begin with the three-move example and wait for each animation to finish. Then write the inverse of F R2 U' and test it. The answer is U R2 F'. Explaining that order is more useful than remembering only “add a prime.” If you lose your place, use the troubleshooting checklist to inspect the record before making more moves.

CUBE ROOM / PRACTICE

Now, make it click.

Open the related exercise. Check the case and orientation before making the moves. Reading does not change your cube; practice progress is saved in this browser.

Open the exercise →

Sources and further reading

Cube Room wrote this guide around its own practice examples. The sources below help verify basic concepts or provide further study; this is not a verbatim translation of their material. Cube Room is not affiliated with these providers.