![]()
Editors note:
This page is a result of material I found when I was reviewing John Hendricks
notes (after he passed away). Presumably he had intended to publish this when it
was completed. I have edited and added to his basic material, having received
permission from him to use his notes as I saw fit. Images are my creation. hdh
![]()
WELCOME TO THE WORLD OF MAGIC HYPERCUBES - (AN OVERVIEW)
Hypercubes are an extension of magic squares and cubes into higher dimensions. It is also the general name for the family of objects such as point, a line segment, a square, a cube, a tesseract, etc. A cube (3-dimensions) may be projected onto a piece of paper by introducing some distortion. Likewise, one can show the projection of a 4-dimensional object onto a piece of paper by introducing even more distortion.
A four dimensional open lattice, shown in Figure 1, of a tesseract ready to place the numbers 1, 2, ..., 81 at each intersection of lines, so that every line will sum the same sum S, which is called the magic sum. S = 123.
Figure 1 shows the open lattice of a 3-dimensional cube and a 4-dimensional tesseract. In both cases, the outline is shown in black. Numbers are placed at the intersections of the lines. Magic tesseracts are often shown without the center lines, resulting in a clearer image.
See my Hypercube Presentations 1 and 2 pages for more on illustrating these objects. hh

Figure 1, A cube and tesseract illustrating the Lattice.
![]()
Some new words have had to be introduced into the mathematical language and some words may not be well-known. One keeps track of where any given number is in the hypercube by means of either a set of {w, x, y, z} style coordinates for smaller dimensional spaces, or a set like (X1, X2, X3, ..., xp, Xq, ..., xn) for the higher dimensions.
One appreciates that rows and columns, etc. of a square, or cube can be made to run parallel to a set of coordinate axes, But as the diagonals of a cube, for example, can never be perpendicular to each other (true in any odd-dimensional space), they will run obliquely across the diagram. One tends to align the edges of the hypercube along the coordinate axes.
The term "n-agonal" is a shortened version of "n-dimensional diagonal" So that you would find in a 3-dimensional structure a 1-agonal, or monagonal; a 2-agonal, or diagonal; and a 3-agonal, or triagonal. If 5 coordinates change in an 8-dimensional hypercube, while the others remain constant, as you travel along it, then this would constitute a pentagonal, or 5-agonal. A monagonal is customarily known as a row, a column, a file, or a pillar. One soon runs out of names. A monagonal is sometimes called an I-row.

Figure 2. A Magic Square of Order four. (torus and continuous field)
An assumption is made that readers understand that the mathematics involved is not in the conventional infinite space taught in high schools, but is instead a modular space which is bounded by the order (m). A magic square, for example is best represented on the surface of a donut because all the broken diagonals become continuous. Higher spaces are on hyper-donuts.
A 1-dimensonal line and a 2-dimensional square can be shown on a sheet of paper (or computer screen) with no distortion. A 3-dimensional cube can also be shown on a sheet of paper, but as it is a projection from three to two dimensions, distortion is required. I f we show the cube as a wire-frame lattice, our minds can visualize the physical location of the numbers at the intersections of the lattice.
In 1950, John R, Hendricks designed the open lattice system of visualizing a 4-dimensional tesseract on a sheet of paper [1]. This was finally published in a mathematical journal in 1962, and is now the accepted way of illustrating magic tesseracts.
Presumably higher dimension hypercubes could also be projected onto a flat surface in a similar manner. However the complexity of the resulting diagram would make it too difficult to comprehend. The only practical way of illustrating these higher dimension hypercube is by listing the numbers in square arrays (which is still often done for cubes and tesseracts).
[1]John R. Hendricks,
The Five and Six Dimensional Magic Hypercubes of Order 3, Canadian
Mathematical Bulletin, vol. 5, no. 2, 1962, pp 171-189
![]()
DIMENSIONS FROM ZERO TO
INFINITY
(Instead of order)
When one extends the notion of a magic square and cube to higher dimensional spaces, one is literally at a loss for words. One used to talk about the long and short diagonals of a square. That is no longer adequate.
For this attempt to illustrate the comparison between dimensions, we will use two examples, the simple magic hypercube and the perfect magic hypercube.
The simple magic hypercube is just that. It contains only the minimum requirements to qualify it as being magic. The order 3 normal magic cube associated. Because of this, and the fact that it is an odd order, it contains 3 central magic squares. Because not all squares are magic, it is still classed as simple. Likewise for the higher dimension hypercubes.
The perfect
magic hypercube is required to sum to the Magic Constant (S) in all possible
ways. Perfect also means that you may sum the Magic Sum in 3n - 1
possible directions through every point in modular space. Perfect is the most
magical because all the hyperplanes are also perfect. The differences are shown
in a side-by-side comparison.
PS In the study of hypercubes, the term perfect persists in
being ambiguous. Recently the term nasik has been adopted to apply
to a hypercube where all possible lines sum to the magic constant.
Nasik was
first defined by A. H .Frost in 1866 and redefined with a narrower meaning by C.
Planck in 1905.
Of course there are other classes in between those two (except for the magic square). Also, within each class of hypercube are special features such as multimagic, inlaid, bordered. These features (and other classes) are not considered in this comparison.
Let us examine what kinds of changes occur as the dimension increases by looking at the specifications.
![]()
IN A ZERO DIMENSIONAL SPACE
The simplest regular and perfect magic hypercubes reduce to a point with the number "1" assigned and it is considered to be a trivial case.
![]()
IN A ONE-DIMENSIONAL SPACE
The SIMPLE MAGIC HYPERCUBE is a Magic Line of Order 2, containing the numbers 1 and 2 and the Magic Sum is 3.
|
Fig. 3-A. 1(-1) + 2(.5)= 0 |
Fig. 3-B. 2(-1.5) + 4(-.5) + 1(.5)+3(1.5) = 0 |
Figure 3a illustrates what may be considered the REGULAR MAGIC (Dimension 1) HYPERCUBE of order 2. It contains the numbers 1 and 2 placed at positions along a line so that they are balanced. One is at -1 and Two is at + ½ and 1(-1) + 2(.5)= 0 .
The PERFECT MAGIC (Dimension 1) HYPERCUBE (Figure 3b) is an evenly balanced Magic Line of Order 4. It contains the numbers 1,2,3, 4 and are so arranged so that if the numbers were considered as weights, then the balance is achieved. The Magic sum is 10. This has an extra feature in that it is bimagic, meaning that if one squares all the numbers, where the sum is 30, it still balances. The interval shown on the scales is ½ so we have:
2(-1.5) + 4(-.5) + 1(.5)+3(1.5) = 0 and 4(-1.5) + l6(-.5) + 1(.5) + 9(1.5) = 0
Not withstanding the above examples, the smallest magic hypercube is normally considered to be the magic square.
IN A TWO DIMENSIONAL SPACE
|
The SMALLEST SIMPLE MAGIC SQUARE is Order 3. This goes back to the first Emperor of China and sums 15 in 8 ways. There is only one such square, but it has 8 aspects (variations) due to rotation and/or reflection. 3 rows (parallel to x-axis) |
|
The SMALLEST PERFECT (NASIK) MAGIC SQUARES are Order 4. They are now commonly called pandiagonal. They were well-known to the Jaina priests at Nasik, India around 1100 A.D. All the numbers from 1 to 16 are arranged in such a way that the Magic Sum is 34 in,
4 rows (parallel to
x-axis)
4 columns (parallel y-axis)
8 diagonals (both
continuous & broken) Altogether, 16 ways
4 correctly summing lines of m numbers pass through each cell of a
perfect square.
| Figure 5 is an attempt to
show the broken diagonal pairs. In a perfect magic square these sum
correctly. In a simple magic square they do not. Of course, the two main
diagonals must sum correctly for the square to be magic. A. H. Frost coined the term Nasik in 1878 [1] for what we now call a pandiagonal magic square or cube. C. Planck refined the term Nasik in 1905 to mean any dimension of magic hypercube where all possible lines sum correctly. We now call such a hypercube perfect. (A pandiagonal magic square is perfect, but a pandiagonal magic cube is not.) These are the only 2 main classes of magic squares. |
Figure 5 a & b. Diagonals including broken ones |
![]()
IN A THREE DIMENSIONAL SPACE
The SMALLEST SIMPLE MAGIC CUBE is
Order-3.
There are 4 basic magic cubes of order 3, each has 48 aspects (variations) due
to rotation and/or reflection

Figure 6. There
are 4 basic magic cubes of order 3.
All the numbers from 1 to 27 are arranged in such a way that the Magic Sum is 42 in 31 ways,
9 rows (parallel
to x-axis).
9 columns (parallel y-axis)
9 pillars (parallel to z-axis)
4 triagonals (continuous)
The blue numbers in Figure 7 indicate one of the
three magic squares contained in each order 3 magic cube.
All order-3 hypercubes are center- symmetric (associated), so must contain n
order-3 magic hypercubes in their central planes (n = dimension).
It is
believed that Fermat discovered the first magic cube, but it was of order 4 (and
not fully magic by present day definitions).
It is believed that Kurushima discovered the first true magic cube (and it was
order 3) in 1757.
The SMALLEST PERFECT (NASIK) MAGIC CUBE is Order
8.
F.A.P. Barnard (USA) [3] published the first one in 1888 (he also published a
perfect magic order 11 cube). However, A. H. Frost (England) [1] published an
order 9 perfect magic cube in 1878 but it did not use consecutive numbers.
Gabriel Arnoux (France) [4] constructed
an order 17 cube in 1887, but he never published it.
The perfect magic cube of order-8 uses all the numbers from 1 to 512, arranged in such a way that the Magic Sum is 2,052 in 832 ways.
64 rows (parallel to x-axis)
64 columns (parallel y-axis)
64 pillars
(parallel to z-axis)
384 diagonals (both continuous & broken)
256 triagonals (both continuous & broken))
Altogether, 832 ways
13 correctly
summing lines of m numbers pass through each cell of a perfect cube.
It includes 24 Pandiagonal Magic Squares
of Order 8.
There are 6 main classes of magic cubes. See the table at the end of this page for more information.
[1] A.H. Frost, On the
General Properties of Magic Squares (and Cubes), Quarterly Journal of
Mathematics, vol.15, 1878, pp 34-49 and 93-123
[2] C. Planck, The Theory of Paths Nasik, printed in 1905 for private
circulation, 10 pages.
[3] F.A.P. Barnard, Theory of Magic Squares and Magic cubes, Memoirs of
the National Academy of Science, 4, 1888, pp 209-270.
[4]Gabriel Arnoux, Cube Diabolique de Dix-Sept (An Order-17 Perfect Magic
Cube), Académie des Sciences,Paris France, April 17, 1887.
IN 4-DIMENSIONAL SPACE
|
The SMALLEST SIMPLE MAGIC TESSERACT
is Order 3. John R. Hendricks redrew the tesseract in 1950 and finally had it published in 1962. All the numbers from 1 to 8l are arranged in such a way that the Magic Sum is 123 in:
27 rows (parallel x-axis)
The blue numbers in Figure 7 indicate one
of the four magic cubes contained in the order 3 tesseract. These simple
magic cubes appear in the simple magic tesseract because the tesseract is
associated. Note the similar comment above in regards to magic cubes of
order 3. |
|
The SMALLEST PERFECT (NASIK) MAGIC TESSERACT is Order 16.
John R. Hendricks constructed the first one in May 1999 [3][4]. Dr. Clifford A.
Pickover [5] checked all additions by computer using about ten
hours of computer time. All the numbers from
1 to 65,536 are arranged in such a way that the Magic Sum is; 524,296 in 163,840
ways. This hypercube, and the following examples are just too large to
illustrate.
4,096 rows
(parallel to x-axis).
4,496 columns (parallel to y-axis)
4,096 pillars (parallel to z-axis
4,096 files (parallel to w-axis)
49,152 diagonals (continuous & broken)
65,536 triagonals (continuous & broken)
32,768 quadragonals (continuous & broken)
Altogether, 163,840 ways which includes
1536 perfect magic squares and 64 perfect magic cubes.
40 correctly
summing lines of m numbers pass through each cell of a perfect tesseract.
The total number of main classes of magic tesseracts is still unknown.
[1] John R. Hendricks, Magic Squares to
Tesseracts by Computer, Self-published 1998, 0-9684700-0-9 page 114
[2] John R. Hendricks, All Third-Order Magic
Tesseracts, Self-published 1999, 0-9684700-2-5, 40 pages plus covers.
[3] C. Planck, The Theory of Paths Nasik 1905,
mentioned that the order-16 ‘octahedroid’ was the smallest possible Nasik,
and showed 1 layer of one (fig. 13, page 18).
[4] John R. Hendricks, Magic Squares to
Tesseracts by Computer, Self-published 1998, 0-9684700-0-9 pp 126-127 (and
private correspondence)
[5] Clifford A. Pickover, The Zen of Magic Squares, Circles, and Stars,
Princeton University Press, 2002, 0-691-07041-5, page 121.
![]()
IN 5-DIMENSIONAL SPACE
The SMALLEST SIMPLE MAGIC HYPERCUBE is of Order 3. Published by Hendricks in May 1962 [1]. All the numbers from 1 TO 243 are arranged in such a way that the Magic Sum is: 366 in 421 ways.
81 rows
(parallel to x-axis)
81 columns (parallel y-axis)
81 pillars (parallel to z-axis)
81 files (parallel to w-axis)
81 posts (parallel to v-axis)
16 pentagonals (continuous)
Altogether 421 ways.
The number of dimension 5 hypercubes is not known (for any order), but there are 3840 variations of each due to rotations and reflections.
The SMALLEST PERFECT (NASIK) MAGIC HYPERCUBEs of dimension 5 are of Order 32. The first one was published by John R. Hendricks in May 1999 (in program form) [2]. All the numbers from 1 to 33,554,432 are arranged in such a way that the Magic Sum is 536,870,928 in 126,877.696 ways.
1,044,576 rows (parallel
to x-axis)
1,044,576 columns (parallel y-axis)
1,044,576 pillars (parallel to z-axis)
1,044.576 files (parallel to w-axis)
1,044,576 posts (parallel to v-axis)
20,971,220 diagonals (both continuous & broken)
41,943,440 triagonals (both continuous & broken)
41,962,940 quadragonals (both continuous & broken
16,777.216 pentagonals (both continuous & broken)
Altogether 126,877.696 ways which
includes 160 perfect Magic Tesseracts
10,240 perfect Magic Cubes and
327,680 perfect Magic Squares.
The booklet, Perfect n -Dimensional Magic Hypercubes of Order 2" by Hendricks shows how to make the smallest Perfect hypercube of any dimension.
[1] John R. Hendricks, The Five and Six
Dimensional Magic Hypercubes of Order 3, Canadian Mathematical Bulletin,
vol. 5, no. 2, 1962, pp 171-189
[2] John R. Hendricks, Perfect n -Dimensional
Magic Hypercubes of Order 2", Self-published 1999, 0-9684700-4-1, 20 pages.
IN 6-DIMENSIONAL SPACE
The SMALLEST SIMPLE
MAGIC HYPERCUBE is of Order 3. The first one was published by Hendricks in May
1962 [1].
A11 the numbers from 1 TO 729 are arranged in such a way that the Magic Sum is
1095 in 1490 ways.
243 rows (parallel to x-axis)
243 columns (parallel y-axis)
243 pillars (parallel to z-axis)
243 files (parallel to w-axis)
243 posts (parallel to v-axis)
243 ??? (parallel to u axis)
32 hexagonals (continuous)
Altogether 1490 ways to sum to 1095.
David M. Collison constructed a 7 and an 8-Dimensional magic Hypercube of Order 3 before 1995. Meredith Houlton calculated to the ninth dimension!
![]()
ad infinitum
EVEN THOUGH THE MATHEMATICS CAN PRODUCE THESE
LARGE CONSTRUCTIONS, HOW ARE THEY BEST DISPLAYED?
John Hendricks suggests generating on demand, a desired path through the
hypercube of the desired order and dimension. The entire hypercube would never
even be generated. This is the approach he adopted for his dimension 5 perfect
hypercube.
However, for the Dimension 5 and 6 magic hypercubes of
order-3 described in the footnote, he did use his tesseract diagram.
Three of these were required to show the dimension 5 magic hypercube, and 9 were
required to show the dimension 6.
[1]John R. Hendricks, The Five and Six Dimensional Magic Hypercubes of Order 3, Canadian Mathematical Bulletin, vol. 5, no. 2, 1962, pp 171-189
![]()
Besides the regular and perfect magic hypercubes, there
are many other classes
Magic squares (dimension 2) have only the two mentioned, simple and pandiagonal
(perfect).
For dimension 3, the magic cube, the number of classes increases to 6, They are:
|
Magic Cube Classes |
|||
|
Class |
Description |
Smallest order |
Total summations |
|
Simple magic |
no unusual or extra features |
3 |
3m2 + 4 |
|
Diagonal magic |
all continuous diagonals sum correctly (i.e. all planar squares are magic) |
5 |
3m2 + 6m + 4 |
|
Pantriagonal magic |
all triagonals (both continuous and broken) sum to S |
4 |
7m2 |
|
Pantriagonal Diagonal magic |
cube is pantriagonal and diagonal magic |
8? |
7m2 + 6m |
|
Pandiagonal magic |
all diagonals (continuous and broken ) sum correctly (i.e. all planar squares are pandiagonal magic) |
7 |
9m2 + 4 |
|
Perfect (nasik) magic |
cube is pantriagonal and pandiagonal magic (all possible lines sum correctly to S) |
8 |
13m2 |
For the next dimension, 4 (the tesseract) there will be many more classes. At this time (August, 2007) Mitsutoshi Nakamura is working diligently on this problem. He estimates there are 18 classes of tesseracts.
Within these major classes, there are many varieties. Inlaid Magic hypercubes have been made for squares for a long time. That is where one finds smaller magic squares embedded within larger ones. John R. Hendricks made the world's first Inlaid magic cubes and inlaid magic tesseracts.
Another variety is the bimagic hypercube [1]. The first bimagic cube of order 25 was made by Hendricks [2]. It contains the numbers 1, 2, 3,..., 15625 and sums 195325 in 625 rows, 625 columns, 625 pillars and in the four continuous triagonals. The sums of the squares in each of these turns out to be 2,034,700,525. Bimagic Tesseracts are now the new challenge.
[1] Christian Boyer’s website chronicles
the exploding news on multimagic
hypercubes.
[2] John R. Hendricks, A Bimagic Cube: Order 25, self-published, 1999,
0-9684700-7-6, 18pp + covers.
![]()
|
Simple and Perfect Magic Hypercube Characteristics Comparison |
||||||||
|
Dimension ---> |
2 |
3 |
4 |
5 |
||||
|
Characteristic |
Simple |
Nasik |
Simple |
Nasik |
Simple |
Nasik |
Simple |
Nasik |
|
The smallest possible order |
3 |
4 |
3 |
8 |
3 |
16 |
3 |
32 |
|
The numbers of cells |
9 |
16 |
27 |
512 |
81 |
65536 |
243 |
33554432 |
|
The magic sum S = |
15 |
34 |
42 |
2052 |
123 |
524296 |
366 |
536870928 |
|
Linear magic paths through each cell |
varies |
4 |
varies |
13 |
varies |
40 |
varies |
121 |
|
Number of basic hypercubes |
1 |
48 |
4 |
? |
58 |
? |
? |
? |
|
Aspects due to rotation/reflection |
8 |
8 |
48 |
48 |
384 |
384 |
3840 |
3840 |
|
Continuous magic n-agonals |
2 |
2 |
4 |
4 |
8 |
8 |
16 |
16 |
|
Total magic n-agonals, including broken |
|
8 |
|
256 |
|
32768 |
|
16777216 |
|
Number of rows, columns, etc (i.e. orthogonal) |
6 |
8 |
27 |
192 |
108 |
16384 |
405 |
5242880 |
|
Ways of correct summation (Minimum) |
8 |
|
31 |
|
116 |
|
421 |
|
|
Ways of correct summation |
|
16 |
|
832 |
|
163840 |
|
126877696 |
|
Number of faces |
1 |
1 |
6 |
6 |
24 |
24 |
80 |
80 |
|
Number of edges |
4 |
4 |
12 |
12 |
32 |
32 |
80 |
80 |
|
Magic squares contained (not counting oblique) |
|
|
3 |
24 |
12 |
1536 |
60 |
327680 |
|
Magic cubes contained |
|
|
|
|
4 |
64 |
20 |
10240 |
|
Magic tesseracts contained |
|
|
|
|
|
|
5 |
160 |
![]()
Dimension |
Aspects |
Order 3 Basic |
Order 4 Basic |
Order 5 Basic |
|
2 |
8 |
1 |
880 Frenicle [2] |
275,305,224 Schroeppel [3] |
|
3 |
48 |
4 Hendricks [4] |
Not too much more is
known about the count, aside from magic squares where the count continues
at a rapid pace, using statistical approximation methods, because the
numbers are so immense. [1] |
|
|
4 |
384 |
58 Hendricks [5] |
||
|
5 |
3840 |
2992 Collison [5] |
||
|
6 |
46080 |
543328 Keh Lin |
||
[1] Walter Trump has done much work
on this subject. His results are at
http://www.trump.de/magic-squares/howmany.html
[2] Bernard Frénicle de Bessy, Des Quarrez ou Tables Magiques,
including: Table generale des quarrez de quatre. Mem. de l’Acad. Roy.
des Sc. 5 (1666-1699) (1729) 209-354. (Frénicle died in 1675)., OR
Benson, W. & Jacoby, O., New Recreations with Magic Squares,
Dover Publ., 1976, 0-486-23236-0
[3] Schroeppel, Richard, write-up by Michael Beeler, The Order-5 Magic
Squares, Report December, 1973, OR
Gardner, Martin, Scientific American, (Mathematical Games) January 1976, pages
118, 119.
[4] Andrews had them all in 1908 but seemed not to realize it.
Andrews, W. S., Magic Squares & Cubes, 2nd edition,
Dover Publ. 1960.
[5] Keh Ying Lin obtained the same count 3 years earlier.
Please send me Feedback about my Web
site!![]()
![]()
![]()
Harvey Heinz harveyheinz@shaw.ca
This page originated November, 2007
This page last updated
October 14, 2009
Copyright © 2007 by Harvey D. Heinz