Reversing a Rubik's Cube algorithm lets you work out, from an algorithm you already know, the algorithm that undoes it, and mirroring it gives you a version for your left hand. Get the hang of one, get four. This post shows two rules, three steps each, with real examples from EasyRubic's 3x3 beginner guide.
Find your case fast
Look at your cube from above and tap the picture that matches it to see how to solve it. Grey cells are stickers you can ignore.
Every algorithm in this post, including the ones we work out, has been tested on EasyRubic's Rubik's Cube simulator. If R, U, the prime mark (') and the number 2 are new to you, see Rubik's Cube notation for beginners first.
What does reversing a Rubik's Cube algorithm mean?
The reverse of an algorithm (cubers call it the inverse) is the sequence of moves that puts the cube back exactly as it was before you did the original algorithm. Do the original, then the inverse, and the cube looks as if it was never turned.
Think of taking off your shoes: you put your foot in, then tie the laces, so to take the shoe off you undo the laces first and pull your foot out after. The last move you made has to be undone first.
The 3-step rule
The guides on speedcubing.com and Ruwix describe the same rule (speedcubing.com, Ruwix). Here it is in an easy-to-remember form:
- Read from the end back to the start.
- Flip the direction of every quarter turn: R becomes R prime, R prime becomes R.
- Leave half turns as they are: U2 stays U2, because a half turn is the same whichever way you go.
How to read the pictures on this page: the cube on the left is the state you have now, and the cube on the right is what you get after the moves. The pieces that matter are coloured, the rest are grey. The first two pictures hold the cube with white on top and green in front.
Here's an example with the sexy move. The original algorithm:
R U R' U'
- You start with (input)
- After the formula
Read it backwards: U prime, R prime, U, R. Flip each move: U, R, U prime, R prime. You get:
U R U' R'
- You start with (input)
- After the formula
That's the reverse sexy move, the algorithm many people practise right after the sexy move.
Notice that the two sequences look almost the same but solve two different states. The inverse isn't "the same algorithm, done faster". It's a completely different algorithm.
What is the inverse useful for?
Undoing a mistake
You're doing the algorithm that places a middle-layer edge to the right, then you realise you were holding the wrong face in front. Don't scramble the whole cube again. Do the inverse to put the cube back where it was, then do it again the right way.
From here on, the pictures hold the cube with yellow on top and green in front, just like the middle-layer and top-layer steps of the guide. The guide's algorithm for placing an edge to the right (step 3, Middle-layer edges):
U R U' R' U' F' U F
- You start with (input)
- After the formula
Its inverse, following the three steps above:
F' U' F U R U R' U'
- You start with (input)
- After the formula
The second picture shows what happens if you do the placing algorithm by mistake on a cube whose middle layer is already done: the edge gets pushed out, and the inverse puts it back exactly as before.
Undoing only works if you haven't made any other moves after the original algorithm. If you have, undo those moves first, using the same rule.
- You start with (input)First layer all correct
- Result you will get after finishing this stepFirst two layers all correct
Setting up a case to practise
Want to practise an algorithm without waiting for its case to come up? Start from a solved cube and do the inverse. The cube will be in exactly the state the original algorithm solves. Do the original and the cube is solved again. Repeat it a few dozen times and your hands will remember it.
Every "what you have now" picture on this page is drawn the same way: the simulator takes a solved cube and does the inverse.
For example, do Antisune on a solved cube and you get the Sune case, as in the left picture below.
R U R' U R U2 R'
See it in 3D, before and after
- You start with (input)
- After the formula
Know one, get a second algorithm for free
Many pairs of cases are the "inverse" of each other, so you only need to remember one algorithm.
Sune and Antisune. Antisune is the inverse of Sune:
R U2 R' U' R U' R'
See it in 3D, before and after
- You start with (input)
- After the formula
Sune is the algorithm in step 5, The yellow face. The guide has you repeat Sune as many times as it takes for every case. If you know Antisune, you solve the "inverse" case in one go.
Ua and Ub. The last step of the guide (step 7) uses one algorithm that moves three yellow edges around:
R U' R U R U R U' R' U' R2
See it in 3D, before and after
- You start with (input)
- After the formula
When the three pieces need to go the other way round, the guide says to do that algorithm twice in a row: 22 moves. Its inverse does the same job in just 11 moves. We checked this on the simulator: doing the original twice and doing the inverse once give exactly the same state.
R2 U R U R' U' R' U' R' U R'
See it in 3D, before and after
- You start with (input)
- After the formula
Cubers call this pair Ua and Ub.
- You start with (input)Yellow corners in place
- Result you will get after finishing this stepCube solved
Algorithms that are their own inverse
Some algorithms put the cube back where it started if you do them twice. Their inverse looks different when you write it down, but it does exactly the same thing as the original. The best-known example is the T-perm, which swaps two corners and two edges:
R U R' U' R' F R2 U' R' U' R U R' F'
See it in 3D, before and after
- You start with (input)
- After the formula
How to spot one: an algorithm that only swaps pieces in pairs (two pieces trade places) without twisting any piece comes back after two goes. An algorithm that moves three pieces round in a loop, like Ua above, doesn't.
Four moves.
One at a time.
Tap each symbol and follow one piece. This is an exercise in watching the movement.
What is a mirror (left-hand) algorithm?
A mirror algorithm is the original algorithm seen in a mirror. If the original solves a case on the right, the mirror solves the same case when it's on the left. You do it with your left hand, with no need to turn the whole cube.
The 3-step rule (left-right mirror)
According to Ruwix, a left-right mirror swaps R with L and reverses the turning direction (Ruwix). speedcubing.com adds that the order of the moves stays the same (speedcubing.com). In short:
- Keep the order, reading from start to end as usual.
- Change R to L and L to R. U, D, F and B keep their letters.
- Flip the direction of every quarter turn, including U, F, D and B. Half turns stay as they are.
Step 3 is where beginners often slip up: it's not just R that changes direction, U does too. In a mirror, a top face turning clockwise turns anticlockwise.
For example, the sexy move R U R' U' in the mirror becomes:
L' U' L U
- You start with (input)
- After the formula
Compare it with the sexy move picture at the start: the same seven pieces, but on the left half.
Example from the guide: placing a middle-layer edge to the left
The guide shows two middle-layer algorithms, one for the right and one for the left. In fact you only need to remember one: the left algorithm is the mirror of the right one. Apply the three steps to U R U' R' U' F' U F: keep the order, R becomes L, flip each move:
U' L' U L U F U' F'
- You start with (input)
- After the formula
It matches the left algorithm in step 3 of the guide letter for letter.
Placing a white corner with your left hand
In step 2, First-layer corners, yellow is on top, the corner sits at the front right of the top layer, and its white sticker faces right. The algorithm is:
R U R'
- You start with (input)
- After the formula
If the corner sits at the front left with its white sticker facing left, use the mirror:
L' U' L
- You start with (input)
- After the formula
- You start with (input)White cross done
- Result you will get after finishing this stepFirst layer all correct
One algorithm becomes four
Put the two rules together and one algorithm gives you four. Take Sune as the example:
- Original: R U R' U R U2 R'
- Inverse: R U2 R' U' R U' R' (Antisune)
- Mirror: L' U' L U' L' U2 L
- Mirror of the inverse: L' U2 L U L' U L
The picture for the mirror:
See it in 3D, before and after
- You start with (input)
- After the formula
And for the mirror of the inverse:
See it in 3D, before and after
- You start with (input)
- After the formula
The mirror is handy when a case feels easier with your left hand: there's nothing new to remember, you just read the algorithm in the mirror.
Special moves: whole-cube turns and wide moves
Both rules work for every move, including whole-cube turns and wide moves. When you mirror left to right:
- Whole-cube turns: x stays the same, because a turn around the left-right axis still goes the same way in the mirror. y becomes y prime, z becomes z prime.
- Wide moves: Rw (turning the two right-hand layers) becomes Lw prime, just as R becomes L prime.
For example, "fat Sune" (done like Sune, but the first and last moves turn two layers):
Rw U R' U R U2 Rw'
See it in 3D, before and after
- You start with (input)
- After the formula
In the mirror it becomes:
Lw' U' L U' L' U2 Lw
See it in 3D, before and after
- You start with (input)
- After the formula
The inverse is even easier: for every move, including x, y, z and wide moves, just read from the end and flip the direction.
Summary
Each pair comes with a picture of the worked-out version.
- The inverse of R U R' U' is U R U' R'
- You start with (input)
- After the formula
- The inverse of the right middle-layer algorithm: F' U' F U R U R' U'
- You start with (input)
- After the formula
- The inverse of Sune is Antisune: R U2 R' U' R U' R'
See it in 3D, before and after
- You start with (input)
- After the formula
- The inverse of Ua is Ub: R2 U R U R' U' R' U' R' U R'
See it in 3D, before and after
- You start with (input)
- After the formula
- The mirror of the sexy move: L' U' L U
- You start with (input)
- After the formula
- The mirror of the right middle-layer algorithm: U' L' U L U F U' F'
- You start with (input)
- After the formula
- The mirror of R U R': L' U' L
- You start with (input)
- After the formula
- The mirror of Sune: L' U' L U' L' U2 L
See it in 3D, before and after
- You start with (input)
- After the formula
| Change | Move order | Letters | Turn direction | Half turns (X2) |
|---|---|---|---|---|
| Inverse | Reversed, read from the end | Same | Flip every move | Same |
| Left-right mirror | Same | R to L, L to R | Flip every move | Same |
| Mirror of the inverse | Reversed, read from the end | R to L, L to R | Same | Same |
The last row of the table: doing both changes flips the direction twice, so it ends up the same as before. speedcubing.com points out the same trick (speedcubing.com).
Common mistakes
- Forgetting to flip U when mirroring. Changing R to L but leaving U alone is wrong. For the sexy move, the wrong sequence L U L' U' isn't the mirror; the right one is L' U' L U, as in the picture below.
- You start with (input)
- After the formula
- Reversing the order when mirroring. The mirror keeps the order. Only the inverse is read from the end.
- Adding a prime to X2. U2 prime and U2 are the same thing. Just write U2.
- Undoing after extra moves. The inverse only puts the cube back if you do it straight after the original algorithm.
How to practise
- There and back. From a solved cube, do an algorithm, then its inverse. The cube should be solved again. If it isn't, you flipped a move the wrong way.
- Write it yourself, then check. Take an algorithm you already know, write its inverse and its mirror on paper, then compare them with the summary above.
- Left-hand practice. For the first week, whenever a middle-layer edge or white corner case shows up on the left, do it with your left hand instead of turning the whole cube. How to place your left fingers for L and L prime is in Rubik's Cube finger tricks.
Want a step-by-step solution for your own cube? The EasyRubic app scans your cube with the camera and shows each move on a 3D cube. Get EasyRubic.
Going further
You don't need this part as a beginner. Read it once you're comfortable with the two rules above.
Diagonal mirror. In step 2, when the corner's white sticker faces the front, the guide uses F' U' F: that's the mirror of R U R' in a mirror placed diagonally through the front-right edge, so R and F swap places and every move flips direction.
- You start with (input)
- After the formula
The mirror of Sune. It makes the top yellow in Antisune's yellow-face case (after one U to line it up), but the corners end up in different places than they do with Antisune. That's enough for step 5, where you only need a yellow top.
Sources
Frequently asked questions
How do you reverse a Rubik's Cube algorithm?
Read the algorithm from the end back to the start, flip the direction of each quarter turn (R becomes R prime and the other way round), and leave half turns such as U2 as they are. For example, R U R' U' reversed is U R U' R'.
What is a left-hand Rubik's Cube algorithm?
It's the mirror of a right-hand algorithm: keep the order, change R to L, and flip the direction of every move. It solves the same case, but when the case is on the left side of the cube.
What's the difference between an inverse and a mirror algorithm?
The inverse undoes the original algorithm, in the same spot on the cube. The mirror does the same job as the original, but on the other half of the cube. One reads the order backwards, the other keeps it.
Do I need to remember a separate left algorithm for the middle layer?
You don't have to. The left algorithm in the EasyRubic guide is the mirror of the right one, so you can work it out yourself with the three steps in this post.
Why does doing the T-perm twice put the cube back?
Because the T-perm only swaps pieces in pairs and doesn't twist any piece. Swap two pieces twice and they're back where they started, so the T-perm is its own inverse.


