Hypercube Representations


This is first of 2 pages Of illustrations of magic squares, cubes, and tesseracts.

This page covers squares and cubes (2-D and 3-D), Page 2 is about tesseracts (4-D)


Magic Squares

Magic Cubes

Magic Tesseracts (next page}

What does a magic hypercube look like?

Magic squares, being 2 dimensions, are easy to illustrate on a 2 dimension piece of paper.

Magic cubes are 3 dimensional, and therefore more difficult to show on paper or a computer screen.

The magic tesseract is the 4 dimensional hypercube. It is much more difficult to construct a meaningful diagram of this object in two dimensions.

 These objects have also been depicted in other forms. Artwork, models, handicrafts and amulets have all been used for this purpose.

 This, and the next page, will show examples of how these magic hypercubes have been presented from the past to the present.

 Magic Squares

The order-3 magic square is the simplest to construct. It’s history goes back to at least the second millennium BC. It was the subject of much folklore and was called the Luoshu (The Scroll of the river Luo). [1]

The first textual reference to the Luoshu seems to be by Zhuang-Zi (369-286 B.C.E.), However no images are available from those ancient times.

from page 15 Legacy of the Luoshu diagram by Zheng Xuan (906-989)

from page 11 Legacy of the luoshu

from page 92  Legacy of the Luoshu
This is a 17 century Japanese version

Some modern representations of the Luoshu

Ancient legend has it that a tortoise with numbers inscribed on it's shell visited Sage King Yu, (who died in 2197 B.C.E.) the founder of the Xia dynasty. Interpretation of this number array was considered sacred, ritual practice. As a result, the early Chinese had no interest in investigating magic squares of higher orders.

This magic square is the only one possible for order 3, if rotations and reflections are not considered.

It soon appeared in other early civilizations, and in virtually all cases was also considered to have magical and mystical powers. However, these other peoples choose to investigate its features, and device methods of constructing higher order magic squares.

Other spellings sometimes used are Lho-Shu, Loh-Shu or Lo Shu.

Magic squares in other cultures

The higher orders of magic squares started appearing about 1300 A.D. [2]

Three cultures are known to have created magic squares, the Chinese, the Indian, and the Arabic. In each culture they were viewed as having supernatural properties.” [2]

The first order 4 magic square seemingly originated in first century in India by a mathematician named Nagarajuna.

Babylonia, Greece, Egypt  – No record that they knew magic squares prior to the Luoshu, and no development of higher orders.

India – First mention of magic squares ca. 550 C.E. It was a number square of order 4 using 2 sets of the digits 1 to 8. It was pandiagonal magic.  (2  3  5  8:  5  8  2  3:  4  1  7  6:  7  6  4  1)
First documented evidence of the order 3 square was ca. 900 C.E.
Jaina order 4 squares have been dated as from the 12th or 13th century
[1 p.85]. Later, squares as large as order 14 were constructed.

Tibet  - used the luoshu for fortune telling and as an occult charm, starting in about the 7th century. No interest in higher orders.

Japan – The luoshu was introduced to Japan in the year 970. Unlike the Chinese (who considered the luoshu sacred) the Japanese started investigating magic squares in earnest.
In 1697 a book was published that showed methods of construction for all orders from 3 to 30.

Islamic World – The first recorded involvement with magic squares appears in the writings of Jabir ibn Hayyan during the period 875 –975. The first set of magic squares was published in the encyclopedia Rasa’ il about 989.
Possibly the most interesting of these squares was a concentric order 7 (containing also an order 5 and an order 3).
Magic squares (especially the order 3) were also considered by the Muslims to have religious, meditative and occult significance.

Latin Europe – A book, originally written in Spanish and the translated to Latin under the Latin title Picatrix introduced Europe to the Islamic magic squares in 1256. It described how the orders 3 to 7 related to the sun, moon, and planets. The emphasis was still on the astrological  and occult power of magic squares.
Later, investigators began looking at magic squares more from a recreational mathematics point of view.

Back to China - First mention of magic squares greater the 3 in China was in 1275. This because they considered the Luoshu sacred and so did not investigate other orders.
Larger order MS probably came to china from the Arab world via Arab scholars starting from about the 11th century.

[1] Much material about this square is taken from Frank J. Swetz, Legacy of the Luoshu, Open Court. 2002
     Other spellings sometimes used are Lho-Shu, Loh-Shu or Lo Shu.
[2] From Mark Swaney’s Magic Square History site at

rule-w.gif (2726 bytes)

Now back to the illustrations (with a minimum of text)

Enlarged view of the magic square.

This Albrecht Dürer  [1] engraving released in 1514, probably did more then any other single event, to popularize magic squares  in Latin Europe.
This was probably the first magic square seen in Europe.
Albrecht Dürer was a renowned and gifted painter and mathematician. He had refined his education by traveling widely.

[1] Albrecht Dürer, Melencolia I, 1514 engraving  9 3/8" x 7 3/8"

About 1315 the Greek schooler, Manual Moschopoulos, wrote a treatise on the construction of magic squares. This is the first known mention of magic squares in Europe. However, his work received little or no notice for over 200 years.

 An early Arabic magic square



H. C. Agrippa von Nettescheim,  De occulta philosophia libri tres, 1531

1651 English translation at http://archive.lib.msu.edu/AFS/dmc/arts/public/all/threebooksoccult/ANL.pdf

Girolamo Cardano, Practica arithmetice et mensurandi singularis, (Magic squares for the heavenly bodies), 1539

Note that the order the squares relate to the heavenly bodies is the reverse of Agrippa's order. The magic squares themselves are the same.
The order 6 square had special significance for the early Christians because the total of all 36 numbers in the square is 666.

Below are thumbnails of the other 5 heavenly body magic squares. Each was also shown using Hebrew characters (not numbers).

By the beginning of the sixteenth century, magic squares were beginning to appear in Western Europe. In 1531, Agrippa's treatise explained his beliefs in the occult significance of magic squares, and their relationship to the heavenly bodies. 8 years later, Cardano published a paper in which he showed the order of the squares reversed from that of Agrippa.
During the rest of the sixteenth and all of the seventeenth centuries medallions, amulets, and coins were all the rage in western Europe. To the left is the thumbnail of an image from an early eighteenth century newspaper.
Below are thumbnails of a series of 7 coins which each show one of the magic squares from 3 to 9. I do not show the reverse of each coin.

These images were kindly supplied to me by Paul Heimbach, a German artist who has worked extensively with magic squares. His website is at http://www.artype.de/quadrate/index.html

Ozanam (1640-1717) and Euler (1707-1783)


Jacques Ozanam  1640-1717    Récréations mathématiques et physiques (1694).

Dr. Hutton’s translation of Montucla’s Edition of Ozanam   Edited by Riddle in 1844.


From Euler's De quadratis magicis. (Latin) St. Petersburg
 Academy, Oct. 17, 1776

Some modern alternative representations of magic squares

1. is an order 5 magic square constructed using dowels and metal washers to represent the numbers. Suspending the model from the center demonstrates that it is in  balance.

2.is an an order 3 square constructed with needlework (cross-stitch).

3.is a model of an order 4 magic square composed of dowels and wood  blocks. (These three all constructed by myself).

4. is one possible presentation of an order-4 magic square using dominoes.

Above is a modern sculpture in 3-D of an order 3 magic square (not normal).





Magic Cubes

In the last section we saw that it was simple to depict a magic square onto a piece of paper (or a computer screen). This is because the square and the paper are both 2 dimensional.
To show a magic cube on a piece of paper is more difficult because the cube is 3 dimensional. In fact, it cannot be done except by introducing distortion. To introduce the subject, I first show several early methods of depicting an ordinary cube.

The outline of a cube may be shown with a schlegel diagram. Here the cube is viewed head-on, with the back face shown smaller. The front and back faces are square (as they should be), but the top, bottom, and sides are distorted.

A second method is the outline on paper of what the cube would look like if we viewed it from an angle. Again, the front and back faces are square, but the top, bottom, and sides are distorted.

Of course, neither method is suitable for illustrating a magic cube, because of the difficulty of placing the numbers in the diagram. A further complication is the fact that the ‘cells’ which contain the numbers are themselves 3 dimensional whereas in the square they are 2 dimensional.

















1. Par B. Violle, Traité complet des Carrés Magiques, 1837
2. Dr. Theod. Hugel,Das Problem der Magischen Systeme, 1876
3. A. H. Frost, Frost, Descriptions of plates, 1878
4. Frost constructed 1877 consists of 9 vertical glass plates, each with the numbers placed on each side.
   This image is supplied courtesy of Christian Boyer's A. H. Frost Biography page
    Much more updated information on my cube-update-6 page
5. A.H. Frost, On the General Properties of Nasik Cubes,1878. An order 4 pantriagonal magic cube.
6. J.A.P Barnard, Theory of Magic Squares and Cubes, 1888, p.266
7. One plane of an order 17 magic cube by Gabriel Arnoux deposited April 17, 1887 in the Académie des Sciences.
8. Fermat's cube (1640). From E. Lucas, L'Arithmetique amusante, 1895, page 226
9. 10. 11. Emile Fourrey, Recreations arithmetiques, 8th edition, Vuibert, 2001. Originally published in 1899.
   Three different methods of portraying a magic cube.
12. W.S. Andrews, Magic Squares and Cubes, 1908 (and 1917), p. 65
13. W.S. Andrews, Three orientations of the planes of the previous cube (p.66)
14. H.A, Sayles, General Notes on the Construction of Magic Squares and Cubes With Prime Numbers, The Monist, 
    vol. 28, January 1918, p. 156  Note the one composite number in his order-3 cube example.
15. Ingenieur Weidemann, Zauberquadfrate und andre magische Zahlen figuren der Ebene und des Raumes, 1922, p. 56
    (Magic Squares and Other Plane and Solid figures)
16. Max Lehmann, Der geometrische Aufbau Gleichsumiger Zahlenfiguren, 1932, p.285
    (Geometric Construction of Magic Figures)
17. R.V. Heath, A Magic Cube With 6n^3 cells, American Mathematical Monthly, vol. 50, 1943, pp 288-291
  Many of the above cubes are described in more detail elsewhere on my site.

In January 1972, these two illustrations were published in the Journal of Recreational Mathematics. This was a new way to illustrate a magic cube.
I have not been able to locate an earlier example of a published illustration of this type.

This new method may be the result of two earlier papers published by John Hendricks in The Canadian Mathematical Bulletin and The American Mathematical Monthly in 1962 and 1968 (see section on 4-D). Ironically, those dealt with depicting a 4-dimensional object in two dimensions!

The numbers now appear at the intersection of grid lines. Previous illustrations of magic squares and cubes had always shown the numbers placed in cells between the grid lines. This is now the preferred method of illustrating the composition of a magic cube. Admittedly, though, this is really only practical for cube orders up to 5 or 6. For larger orders, and for occasions when an illustration is not required, the numbers are usually just presented (normally horizontal) plane by plane.

The above order-4 cube in text form
01  32  49  48      62  35  14  19      04  29  52  45      63  34  15  18
56  41  08  25      11  22  59  38      53  44  05  28      10  23  58  39
13  20  61  36      50  47  02  31      16  17  64  33      51  46  03  30
60  37  12  21      07  26  55  42      57  40  09  24      06  27  54  43
top layer            second layer          third layer            bottom layer

Of course, sometimes special circumstances require special diagrams.
I conclude this section on 3-dimensional illustrations with several of an order-8 inlaid magic cube constructed by John Hendricks in 1999.




4. (click on image to  enlarge)

[1] Clifford A. Pickover, The Zen of Magic Squares, Circles, and Stars, Princeton Univ. Pr., 2002, 2001027848, p. 179
[2] [3] [4] John R. Hendricks, Inlaid Magic Squares and Cubes, 2nd Edition, Self Published, 1999, 0-9684700-3-3, pages 155, 158, 166.
Edited and illustrated by Holger Danielsson
A color illustration plus full listing and description of the order-8 inlaid magic cube is is at hendricks.htm.

Now, on to 4-dimensional hypercube illustrations.

This page was originally posted November 2007
It was last updated October 22, 2010
Harvey Heinz   harveyheinz@shaw.ca
Copyright © 1998-2009 by Harvey D. Heinz