Magic cube

Last updated
An example of a 3 x 3 x 3 magic cube. In this example, no slice is a magic square. In this case, the cube is classed as a simple magic cube. Simple Magic Cube.svg
An example of a 3 × 3 × 3 magic cube. In this example, no slice is a magic square. In this case, the cube is classed as a simple magic cube.

In mathematics, a magic cube is the 3-dimensional equivalent of a magic square, that is, a number of integers arranged in a n × n × n pattern such that the sums of the numbers on each row, on each column, on each pillar and on each of the four main space diagonals are equal to the same number, the so-called magic constant of the cube, denoted M3(n). [1] [2] It can be shown that if a magic cube consists of the numbers 1, 2, ..., n3, then it has magic constant (sequence A027441 in the OEIS )


If, in addition, the numbers on every cross section diagonal also sum up to the cube's magic number, the cube is called a perfect magic cube; otherwise, it is called a semiperfect magic cube. The number n is called the order of the magic cube. If the sums of numbers on a magic cube's broken space diagonals also equal the cube's magic number, the cube is called a pandiagonal cube.

Alternative definition

In recent years, an alternative definition for the perfect magic cube has gradually come into use. It is based on the fact that a pandiagonal magic square has traditionally been called perfect, because all possible lines sum correctly. That is not the case with the above definition for the cube.

Multimagic cubes

As in the case of magic squares, a bimagic cube has the additional property of remaining a magic cube when all of the entries are squared, a trimagic cube remains a magic cube under both the operations of squaring the entries and of cubing the entries. [1] (Only two of these are known, as of 2005.) A tetramagic cube remains a magic cube when the entries are squared, cubed, or raised to the fourth power.

Magic cubes based on Dürer's and Gaudi Magic squares

A magic cube can be built with the constraint of a given magic square appearing on one of its faces Magic cube with the magic square of Dürer, and Magic cube with the magic square of Gaudi

See also

Related Research Articles

Cube A geometric 3-dimensional object with 6 square faces

In geometry, a cube is a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex.

Tesseract Four-dimensional analogue of the cube

In geometry, the tesseract is the four-dimensional analogue of the cube; the tesseract is to the cube as the cube is to the square. Just as the surface of the cube consists of six square faces, the hypersurface of the tesseract consists of eight cubical cells. The tesseract is one of the six convex regular 4-polytopes.

Hypercube Convex polytope, the n-dimensional analogue of a square and a cube

In geometry, a hypercube is an n-dimensional analogue of a square and a cube. It is a closed, compact, convex figure whose 1-skeleton consists of groups of opposite parallel line segments aligned in each of the space's dimensions, perpendicular to each other and of the same length. A unit hypercube's longest diagonal in n dimensions is equal to .

In mathematics, Pascal's triangle is a triangular array of the binomial coefficients that arises in probability theory, combinatorics, and algebra. In much of the Western world, it is named after the French mathematician Blaise Pascal, although other mathematicians studied it centuries before him in India, Persia, China, Germany, and Italy.

Magic square Sums of each row, column, and main diagonals are equal

In recreational mathematics, a square array of numbers, usually positive integers, is called a magic square if the sums of the numbers in each row, each column, and both main diagonals are the same. The order of the magic square is the number of integers along one side (n), and the constant sum is called the magic constant. If the array includes just the positive integers , the magic square is said to be normal. Some authors take magic square to mean normal magic square.

In geometry, a cuboid is a convex polyhedron bounded by six quadrilateral faces, whose polyhedral graph is the same as that of a cube. While mathematical literature refers to any such polyhedron as a cuboid, other sources use "cuboid" to refer to a shape of this type in which each of the faces is a rectangle ; this more restrictive type of cuboid is also known as a rectangular cuboid, right cuboid, rectangular box, rectangular hexahedron, right rectangular prism, or rectangular parallelepiped.

In mathematics, a perfect magic cube is a magic cube in which not only the columns, rows, pillars, and main space diagonals, but also the cross section diagonals sum up to the cube's magic constant.

In mathematics, a magic hypercube is the k-dimensional generalization of magic squares and magic cubes, that is, an n × n × n × ... × n array of integers such that the sums of the numbers on each pillar as well as on the main space diagonals are all the same. The common sum is called the magic constant of the hypercube, and is sometimes denoted Mk(n). If a magic hypercube consists of the numbers 1, 2, ..., nk, then it has magic number

Unit cube Cube with edge length one

A unit cube, more formally a cube of side 1, is a cube whose sides are 1 unit long. The volume of a 3-dimensional unit cube is 1 cubic unit, and its total surface area is 6 square units.

Magic constant

The magic constant or magic sum of a magic square is the sum of numbers in any row, column, or diagonal of the magic square. For example, the magic square shown below has a magic constant of 15. In general where is the side length of the square.

Most-perfect magic square

A most-perfect magic square of doubly even order n = 4k is a pan-diagonal magic square containing the numbers 1 to n2 with three additional properties:

  1. Each 2×2 subsquare, including wrap-round, sums to s/k, where s = n(n2 + 1)/2 is the magic sum.
  2. All pairs of integers distant n/2 along any diagonal are complementary.
Space diagonal

In geometry, a space diagonal of a polyhedron is a line connecting two vertices that are not on the same face. Space diagonals contrast with face diagonals, which connect vertices on the same face as each other.

Every magic cube may be assigned to one of six magic cube classes, based on the cube characteristics.

A Diagonal Magic Cube is an improvement over the simple magic cube. It is the second of six magic cube classes when ranked by the number of lines summing correctly.

In recreational mathematics, a pandiagonal magic cube is a magic cube with the additional property that all broken diagonals have the same sum as each other. Pandiagonal magic cubes are extensions of diagonal magic cubes and generalize pandiagonal magic squares to three dimensions.

Hypercube graph

In graph theory, the hypercube graphQn is the graph formed from the vertices and edges of an n-dimensional hypercube. For instance, the cubical graph Q3 is the graph formed by the 8 vertices and 12 edges of a three-dimensional cube. Qn has 2n vertices, 2n−1n edges, and is a regular graph with n edges touching each vertex.

A Nasik magic hypercube is a magic hypercube with the added restriction that all possible lines through each cell sum correctly to where S = the magic constant, m = the order and n = the dimension, of the hypercube.

A magic hyperbeam is a variation on a magic hypercube where the orders along each direction may be different. As such a magic hyperbeam generalises the two dimensional magic rectangle and the three dimensional magic beam, a series that mimics the series magic square, magic cube and magic hypercube. This article will mimic the magic hypercubes article in close detail, and just as that article serves merely as an introduction to the topic.

In mathematics, an orthogonal array is a "table" (array) whose entries come from a fixed finite set of symbols, arranged in such a way that there is an integer t so that for every selection of t columns of the table, all ordered t-tuples of the symbols, formed by taking the entries in each row restricted to these columns, appear the same number of times. The number t is called the strength of the orthogonal array. Here is a simple example of an orthogonal array with symbol set {1,2} and strength 2:


  1. 1 2 W., Weisstein, Eric. "Magic Cube". Retrieved 2016-12-04.
  2. "Magic Cube". Retrieved 2021-04-20.