The Mathematics Behind the Rubik's Cube

April 29, 2022

Noa Essner

9th Grade

Ramaz Upper School



The Rubik’s Cube, originally popular in the seventies and eighties, made a comeback a few short years ago around 2017. In fact, in 2018, a rough estimate of 350 million cubes was sold worldwide. Ranging from 2x2 to 22x22, the Rubik’s Cube has evolved, and now so has the world’s addiction to solving it, from a mere hobby to the basis of international speed-solving competitions. For some, the secret to solving the Rubik's Cube is a mystery, which is why it appears no more significant than an array of moving boxes and sides. For others, it’s much more complex.  By mastering formulas and algorithms, people worldwide have taken solving the Rubik’s Cube to new levels of speed and accuracy that are constantly advancing. The world record for the fastest solving time of a 3x3 is 3.47 seconds, and blindfolded 14.61 seconds; however, arguably the most significant display of precision of the Rubik’s Cube lies not within the solver, but rather in the mathematics with which solving it is rooted. 

(Image credit: Ruwix.com)

Though many have heard of the Rubik’s Cube, a large portion of them owning one themselves, most aren't aware of the history behind it. It was designed in 1974 by Ernő Rubik, a Hungarian inventor using everyday materials such as glue, rubber bands, paperclips, paper, and wood. With them, he was able to design a “magic cube (otherwise known as a “Bűvös Kocka” in Hungarian)."  He later used the "magic cube" to explain and demonstrate three-dimensional activity and motion to his architecture students. The success of this design led to the development of the Rubik’s Cube the world knows and appreciates today. 

Quantitatively, there are precisely 4.3252 x 1019 different combinations to make with a 3x3 Rubik’s Cube, which means 4.3252 x 1019 different combinations to be able to solve, evidently a daunting task. At a bare minimum, a 3x3  could be solved with twenty moves, or fewer, a concept known formally as “God’s Number.” Imagine each move was substituted with a variable, so flipping the right face would be represented as R, moving the upper face would be represented as U, etc. Following this specific pattern, R L U2 F U’ D F2 R2 B2 L U2 F’ B’ U R2 D F2 U R2 U, the Rubik’s Cube can return to its original arrangement, no matter in what way the cube is scrambled, though this sequence may require some repetition for it to work. 

(Image credit: Joe McCormick)

From a mathematical perspective, the Rubik’s Cube is simply a permutation group or a series of different arrangements. Each 3x3 cube has six sides as well as six different colors, which appear nine times on the individual squares. If one were to label the boxes 1-54 from left to right, one could view the entire process of solving the Rubik’s Cube as a math equation. This is just a part of what computers, with AI (artificial intelligence), use to solve a Rubik’s Cube in mere seconds. This computer program called DeepCubeA was developed at the University of California, Irvine. DeepCubeA looked at billions of different scrambled Rubik’s Cubes intending to solve each one in thirty moves or less. As stated by the Washington Post, “DeepCubeA solved 100 percent of test configurations, researchers wrote, and located the shortest path to solving the puzzle more than 60 percent of the time.” 


The Rubik’s Cube is so deeply rooted in mathematics that, according to another study at the University of Berkeley, according to group theory, “If you disassemble the cube and reassemble the cube in a random scrambled position, then there is a 1 in 12 chance that it can be solved.” Furthermore, one could rotate the different faces of the Rubik’s Cube for years, and still never manage to solve it. This illustrates that solving the cube isn’t just random, it is based entirely on numbers, theorems, algorithms, formulas, and statistics. If solving the cube now seems impossible, remember that once understood, you’re on your way to becoming a Rubik’s Cube solver yourself. 

Reference Sources

Holley, Peter. “How Quickly Can Ai Solve a Rubik's Cube? in Less Time than It Took You to Read This Headline.” The Washington Post, WP Company, 18 July 2019, 

https://www.washingtonpost.com/technology/2019/07/16/how-quickly-can-ai-solve-rubiks-cube-less-time-than-it-took-you-read-this-headline/.

Hutchings, Michael. The Mathematics of Rubik's Cube, University of California, Berkeley, 30 Jan. 2011, 

https://math.berkeley.edu/~hutching/rubik.pdf

Reese, Hope. “A Brief History of the Rubik's Cube.” Smithsonian.com, Smithsonian Institution, 25 Sept. 2020, 

https://www.smithsonianmag.com/innovation/brief-history-rubiks-cube-180975911/

Ruwix Editors. “Mathematics of the Rubik's Cube.” Mathematics of Rubik's Cube, Ruwix Group, 

https://ruwix.com/the-rubiks-cube/mathematics-of-the-rubiks-cube-permutation-group/#:~:text=Mathematically%20the%20Rubik's%20Cube%20is,color%20being%20repeated%209%20times