Documente Academic
Documente Profesional
Documente Cultură
discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/297731505
CITATIONS
READS
107
2 authors, including:
Peyman Fahimi
Khaje Nasir Toosi University of Technology
5 PUBLICATIONS 2 CITATIONS
SEE PROFILE
Introduction
Magic squares are one of the beautiful examples of the mathematical objects with several
real-world applications [1]. They have always had a great influence upon mankinds attitude. Although a definitive judgment of early history of magic squares is not available, it
has been suggested that magic squares probably date back to pre-Islamic Persian origins
[2]. The study of magic squares in medieval Islam in Persia was however common, and
supposedly, came after the introduction of Chess in Persia [3]. For instance in the tenth
century, the Persian mathematician Buzjani has left a manuscript in which there is a magic
square, which are filled by numbers in arithmetic progression [4].
In this paper, initially some types of magic geometrical shapes such as square, rectangle,
cube, tesseract, hypercube, circle, sphere, triangle, star and hexagon are briefly introduced.
Then, the most noticeable types of magic squares and their features are expressed. After
that, construction methods of natural magic squares are described. Finally, some of the
most important unsolved problems are reviewed, and interesting physical applications of
magic squares are analyzed.
In this section, magic square, rectangle, cube, tesseract, hypercube, circle, sphere, triangle,
star and hexagon and their formulations are introduced.
1 Department
2.1
Magic square
A natural magic square of order n is a square array of numbers consisting of the distinct
positive integers 1, 2, . . . , n2 arranged such that the sum of the n numbers in any horizontal,
vertical, or main diagonal lines is always the same number, known as the magic constant
(Fig. 1) [5],[6]. One can verify that the magic constant is equal to
n
Mn = (n2 + 1).
2
(1)
2.2
Magic rectangle
A magic (m, n)-rectangle R is an m n array in which the first mn positive integers are
placed so that the sum over each row of R is constant and the sum over each column of R
is another (different if m 6= n) constant. For m, n > 1, there is a magic (m, n)-rectangle R if
and only if m n mod 2 and (m, n) 6= (2, 2). For centrally symmetric rectangles, (Fig. 2)
[7],[8]
the row sums are equal to
n
Mn,m = (mn + 1).
2
and the column sums are equal to
Nn,m =
m
(mn + 1).
2
(2)
(3)
2.3
Magic cube
(4)
2.4
Magic circle
Magic circle is the arrangement of natural numbers on circles where the sum of the numbers
on each circle and the sum of numbers on diameters are identical. In Fig. 4, magic circle
is constructed from 33 natural numbers from 1 to 33 arranged on four concentric circles,
with 9 at the center, which have magic constants 138 and 147. In Fig. 5, magic circle of
order 6 with 6 rings is depicted which has connection with the magic square of order 3: the
9 numbers on any ring form a magic square of order 3 [5],[12].
2.5
Magic triangle
In a normal magic triangle of order n, 3(n 1) distinct positive integers are placed in a
triangular array, n integers in each side, so that the sum of the integers on each side is a
magic constant Mn . An example of a magic triangle of order 4 with M4 = 20 is given in
Fig. 6.
i 1
1h t
i
+
(1
+
2
+
3)
= (n 1)(3n 2) + 2.
3 i=1
2
(5)
Max Mn =
i 1
1h t
i
+
t
+
(t
1)
+
(t
2)
= (n 1)(3n + 4) 1.
3 i=1
2
(6)
So, we have
1
1
(n 1)(3n 2) + 2 < Mn < (n 1)(3n + 4) 1.
2
2
2.6
(7)
Magic star
An n-pointed magic star is a star polygon in which numbers are placed at each of the n
vertices and n intersections, such that the four numbers on each line sum to the same magic
constant. A normal magic star contains the consecutive integers 1 to 2n. The magic constant
of an n-pointed normal magic star is equal to Mn = 4n + 2 (Fig. 7).
Figure 7: 7-pointed magic star (left) and 6-pointed magic star (right).
No star polygons with fewer than 5 points exist, and the construction of a normal 5pointed magic star turns out to be impossible. Therefore, the smallest instance of normal
magic star is 6-pointed [8],[15].
2.7
Magic hexagon
(8)
A hex number, also called a centered hexagonal number, is given by Hn = 1+6Tn where
Tn = nk=1 k is the nth triangular number. It turns out that normal magic hexagons exist only
for n = 1 (which is trivial) and n = 3. Moreover, the solution of order 3 is essentially
unique. Although there are no normal magic hexagons with order greater than 3, certain
abnormal ones do exist. In this case, abnormal means starting the sequence of numbers
with a number other than 1 (Fig. 8) [16],[17].
Figure 8: Normal magic hexagon of order 3 (left), abnormal of order 4 (middle) and abnormal
of order 5 (right).
In this section, about 20 types of magic squares are introduced, and some of their formulations are expressed.
3.1
Hetero square
A hetero square is an n n array of the integers from 1 to n2 such that the rows, columns,
and diagonals have different sums. (By contrast, in a magic square, they have the same
sum.) They can be constructed by placing consecutive integers in a spiral pattern (Fig. 9)
[18],[19].
3.2
Anti-magic square
An anti-magic square is an n n array of integers from 1 to n2 such that each row, column,
and main diagonals produce a different sum such that these sums form a sequence of consecutive integers. It is therefore a special case of a hetero square. Anti-magic squares of
orders one, two, and three are impossible. For the 4 4 square, the sums are 30, 31, 32,
. . . , 39 (Fig. 10) [20],[21].
3.3
Semi-magic square
A semi-magic square is a square that fails to be a natural magic square only because one or
both of the main diagonals sums are not equal to the magic constant (Fig. 11) [22],[23].
3.4
If all the diagonals including those obtained by wrapping around the edges of a natural
magic square sum to the same magic constant, the square is said to be a panmagic square.
No panmagic squares exist of order 3 or any order 4k + 2 (Fig. 12) [24],[25].
3.5
3.6
In a panmagic square of order n, if the numbers of each complementary pair are at distance
n/2 on diagonals, the result will be a complete magic square where n is a multiple of 4 and
complementary pairs are the pairs that sum to n2 + 1. In Fig. 13, pairs such as (6,11) or
(2,15) are at distance 2 on diagonals [26].
3.7
Most perfect squares are panmagic squares that are simultaneously compact and complete.
There are most perfect squares for all multiples of 4 (Fig. 13) [27].
3.8
An n n natural magic square for which every pair of numbers symmetrically opposite the
center, sum to n2 + 1 is known as associative magic square (Fig. 14). It can be proved that
there is no associative magic square of order 4k + 2 for an integer k [28],[29].
Figure 14: Schematic of associative magic squares (left), associative magic square of order 3
(right).
3.9
Squares that are pandiagonal and associative are called ultra magic (Fig. 15). Smallest ultra
magic square is of order 5 [30].
Figure 16: Triangular, square and pentagonal numbers (left), Magic square of triangular numbers of order 6 (right).
3.11
A magic square which is filled by square or cube numbers is called magic square of squares
or cubes. In Fig. 17, a magic square of squares of order 4 with constant 8515 is shown
[33],[34].
3.12
A prime magic square is a magic square consisting only of prime numbers (although the
number 1 is sometimes allowed in such squares). Fig. 18, is the 3 3 prime magic square
having the smallest possible magic constant 111. The smallest magic square composed of
consecutive odd primes including the number 1 is of order 12. Also, magic square of prime
squares is a magic square consisting only of prime squares [35].
3.13
A magic square is said to be p-multimagic if the square formed by replacing each element
by its kth power for k = 1, 2, . . . , p is also magic. For example, if replacing each number
by its square or cube in a magic square produces another magic square, then the square
is said to be bimagic and the cube is said to be trimagic. The first known bimagic square
(Fig. 19), has order 8 with magic constant 260 for the base square and 11180 after squaring
[36][37],[38].
3.14
3.15
3.16
Distributive magic squares have the property that each of the four integers in the following
sets of numbers (1,2,3,4) and (5,6,7,8) and (9,10,11,12) and (13,14,15,16) are located in
separate rows and columns. An example of a distributive magic square is shown in Fig. 22
[41].
10
3.17
Consider the magic square of Fig. 23, left, with magic constant 264. If you turn it upside
down, the magic constant is still 264 (Fig. 23, right). The squares such as this, are called
reversible magic square [42].
Figure 23: Reversible magic square, before reversing (left) and after reversing (right).
3.18
A domino magic square is defined using a set of dominoes to form a magic square, each
domino supplying two numbers. Here is a 4 4 domino magic square with 8 dominoes and
magic sum 5 (Fig. 24) [8],[43].
3.19
A palindromic number is a number that remains the same when its digits are reversed, like
16461. A palindrome magic square is a square which its magic constant is a palindromic
number (Fig. 25).
11
In Fig. 26, not only the magic constant is palindromic, but also all the numbers are
palindromic [44].
3.20
AlphaMagic square
A magic square for which the number of letters in the word for each number generates
another magic square. This definition depends, of course, on the language being used (Fig.
27) [45],[46].
Figure 27: Alphamagic square of order 3, first step (left), 2nd step (middle), 3rd step (right).
There are several features for natural magic squares. Here, we describe just some considerable properties, as follows,
1. A natural magic square will remain magic, if any number is added to all the numbers.
A natural magic square will remain magic, if any number is multiplied by all the
numbers.
A natural magic square will remain magic, if two rows, or columns, equidistant from
the center are interchanged.
A natural magic square of even order will remain magic, if the quadrants are interchanged.
A natural magic square of odd order will remain magic, if the partial quadrants and
the row are interchanged [47].
2. For odd squares, table 1 may be interesting.
12
1
2
3
4
2
3
4
5
Square order
x = b2 a2
3
5
7
9
Central cell
y = b2 + a2
5
13
25
41
Magic constant
Mn = x y
15
65
175
369
Numbers sum
S = x2 y
45
325
1225
3321
2
3. Subtracting the average of the numbers in a natural magic square, n 2+1 , from each
number, yields a skeleton square of normalized numbers, the bones, consisting
of positive and negative numbers, and, for odd order squares, 0 (Fig. 28). This is
a convenient way of seeing symmetry in the square. It can also facilitate square
construction, transforms, and analysis [48].
Figure 29: Different cases of arranging numbers 7, 8, 9 in a natural magic square of order 3.
If rotations and reflections are not taken into account, then there is just one way to
make a 3 3 natural magic square [49].
5. The general magic square of order n can be parameterized in terms of n(n 2) variables. This is the number of matrix elements (n2 ), minus twice the number of rows
(columns). The general expression of a magic square of order 3 with magic constant
3C, is as follows,
c+v
cvu
c+u
c + u v
c
c + v u .
(9)
cu
c+v+u
cv
Also the parameterization form of the 4th order general magic square is as follows
[50],[51],
13
Aa
C+a+c B+bc
Db
D + a d
B
C
A a + d
.
C b + d
A
D
B + b d
B+b
Dac Ab+c
C+a
(10)
6. There is one distinct 3 3 magic square of the first 9 integers, and there are 880
distinct 4 4 magic squares of the first 16 integers, and 275,305,224 distinct 5 5
squares of the first 25 integers, the latter were first counted by computer in 1973.
Already by order six and other higher orders they have become far too large to count
at present and as a result only statistical estimates are possible. For instance, the
number of 8 8 natural magic squares is about (5.2225 0.0018) 1054 [52],[53].
7. As a conjecture, it seems that the principal eigenvalue of a magic square (as a matrix)
composed of positive elements is its magic constant. If a magic square has some
negative elements, then its magic constant is one of its eigenvalues [54].
Although there are several construction methods for magic squares of order (2k + 1), (4k)
and (4k + 2), there is not a general method for making the magic square of an arbitrary
order. Of course, some efforts are done by Euler in 1770 but his procedure was so complex
and long for higher orders [55].
5.1
5.1.1
14
Figure 30: Siamese method for making the magic square of order 5.
5.1.2
Pyramid method
Draw a pyramid on each side of the magic square. The pyramid should have two less
squares on its base than the number of squares on the side of the magic square. This creates
a square standing on a vertex. Sequentially place the numbers 1 to n2 of the n n magic
square in the diagonals as shown in Fig. 31. Relocate any number not in the n n square
(that appears in the pyramids you added) to the opposite hole inside the square (Fig. 32)
[47].
Figure 31: Pyramid method for making the magic square of order 5.
15
5.1.3
Lozenge method
As illustrated in Fig. 33, in this method, the odd numbers are built up along diagonal
lines in the shape of a diamond in the central part of the square. The even numbers that
were missed are then added sequentially along the continuation of the diagonal obtained
by wrapping around the square until the wrapped diagonal reaches its initial point. In the
below square, the first diagonal therefore fills in 1, 3, 5, 2, 4, the second diagonal fills in 7,
9, 6, 8, 10, and so on [6].
Figure 33: Lozenge method for making the magic square of order 5.
5.2
An elegant method for constructing magic squares of doubly even order n = 4m is to draw
Xs through each 4 4 subsquare and fill all squares in sequence. Then replace each entry
ai j on a crossed-off diagonal by (n2 + 1) ai j or, equivalently, reverse the order of the
crossed-out entries. Thus in Fig. 34 for the example of n = 8, the crossed-out numbers are
originally 1, 4, . . . , 61, 64, so entry 1 is replaced with 64, 4 with 61, etc [6].
5.3
A very elegant method for constructing magic squares of singly even order n = 4m + 2 with
m 1, is called the LUX method. Create an array consisting of m + 1 rows of Ls, 1 row
of Us, and m 1 rows of Xs, all of length n/2 = 2m + 1. Interchange the middle U with
the L above it. Now generate the magic square of order 2m + 1 using the Siamese method
centered on the array of letters (starting in the center square of the top row), but fill each set
of four squares surrounding a letter sequentially according to the order prescribed by the
letter. That order is illustrated on the left side of the Fig. 35, and the completed square is
illustrated to the right. The shapes of the letters L, U, and X naturally suggest the filling
order, hence the name of the algorithm [6].
Figure 35: LUX method for making the magic square of order 10.
There are many problems in magic squares that remain unsolved till now. In this section,
some considerable ones are discussed.
1. Anti-magic squares of orders one, two, and three are impossible. In the case of the 3
3 square, there is no known proof of this fact except by case analysis or enumeration
by computer [21].
2. Smallest possible order n magic square using distinct (nonconsecutive) triangular
numbers is unknown [31].
3. We still do not know if a 3 3 magic square of squares is possible! Constructing a
3 3 magic square using seven (or eight, or nine) distinct squared integers different
from the only known example and of its rotations, symmetries and k2 multiples, or
proving that it is impossible, is still unsolved (Fig. 36) [56].
17
Figure 36: Only known example of 3 3 magic square using seven distinct squared integers, S
= 541,875.
4. Construction of a 3 3 semi magic square using positive distinct cubed integers, or
proving that it is impossible, is unsolved. The nearest answer to the problem is shown
in Fig. 37 [56].
Figure 37: The nearest answer to unsolved problem of semi magic square of cubes.
5. Construction of a 44 magic square using distinct positive cubed integers, or proving
that it is impossible, is unsolved [56].
6. The 3 3 and 4 4 bi-magic have been mathematically proven to be impossible.
Constructing a 5 5 bi-magic square using distinct positive integers, or proving that
it is impossible, is still unsolved. The nearest answer to this problem is as follows
(Fig. 38) [56],
There are some physical insights toward magic squares which the first inspiration of them
happened in 2001 [1],[57]. It seems that these square matrices are in pursuit of practical
uses. Coordinate rotation matrices in classical and relativistic mechanics, combined with
periodic boundary conditions for finite crystals soon lead to link with magic squares [58].
For example, interpreting them as arrays of point masses, or as electric charges cause to
connect with center of mass, moment of inertia, electric multipole, electrostatic potential
and etc. We continue by reviewing some results in the physical applications of the magic
squares.
18
1. Mass center of all general magic squares of an arbitrary order is their geometrical
center [57],[59]. It means that the center of general magic squares is the point where
all of the mass of the given magic square is concentrated. Thus when a magic square
is supported at its geometrical center with no net torque acting on it, it will remain in
static equilibrium (Fig. 39).
Figure 39: A 5 5 magic square that remained in static equilibrium on its geometrical center.
Of course, someone can create many normal squares that are not magic, but are also
balanced (an n n normal square is a matrix of the non-repetitive integers from 1 to
n2 with random substitution of numbers which is not magic).
A + B +C = G + H + I = S1
(11)
A + D + G = C + F + I = S2
This illustrates the fact that some normal squares are balanced. Obviously not all are.
For example, it is easy to demonstrate that there are 142 normal squares of order 3
which their mass center and their geometrical center coincide (Table 2) [1].
19
Table 2: Number of 3 3 normal squares of the non-repetitive integers from 1 to 9 that are
balanced on their geometrical center, by C Programming
S1 , S2
11, 12
11, 13
11, 14
11, 15
11, 16
11, 17
11, 18
11, 19
12, 13
12, 14
12, 15
12, 16
S1 = S2
11
12
13
Count
0
0
2
3
0
2
0
0
2
2
0
2
Count
0
6
12
S1 , S2
12, 17
12, 18
12, 19
13, 14
13, 15
13, 16
13, 17
13, 18
13, 19
14, 15
14, 16
14, 17
S1 = S2
14
15
16
Count
2
0
0
0
3
6
0
2
2
0
0
6
Count
20
18
20
S1 , S2
14, 18
14, 19
15, 16
15, 17
15, 18
15, 19
16, 17
16, 18
16, 19
17, 18
17, 19
18, 19
S1 = S2
17
18
19
Count
2
0
0
3
0
3
0
2
2
2
0
0
Count
12
6
0
2. Physical moment of inertia of magic squares is constant for all natural magic squares
of a given order. It actually applies to the higher dimensions of these squares. It
means that by investigating the inertial tensor for magic cubes, consequences will be
the same. This fixed value for natural magic squares is equal to
In =
1 2 4
n (n 1),
12
(12)
1 3 3
n (n + 1)(n2 1).
12
(13)
3. Dipole moment of natural magic squares of any order in relation to center of the
square is zero. If magic square changes to its bone, then dipole moment in relation to
each arbitrary origin will be equal to zero. With the electric multipoles expansion for
magic cubes, it can be perceived that all of the components of the quadrupole moment
vanish and in addition quadrupole of magic squares is non-zero. To conclude, natural
magic squares treat like an electric quadrupole and natural magic cubes behave like
an electric octupole [62].
4. Some of contour plots of natural magic squares electrostatic potential are symmetrical
but analyzing how such regular contours can be derived directly and why some contour plots are not regular, needs to be studied in detail. There might be a connection
with sets of singular values of magic squares (Fig. 40).
20
Figure 40: Contour plot of electro-static potential of a sample 4 4 natural magic square.
The electrostatic potential at the center of all associative magic squares of an arbitrary
order and also for natural magic squares of order 3 and 4 is constant.
=
1
(n2 + 1) C
40
(14)
21
Figure 41: Examples of water retention on square systems with an equal distribution of terrain
heights.
6. One of the most deeply investigated concepts in modern physics is that of oscillatory
motion of atoms in the field of molecular physics and solids in the field of solid state
physics [67],[68]. As an idea for future research, suppose a vibrating system with n2
discrete masses and 2(n2 1) identical springs which construct a system of particles
of magic squares. For example, we have 9 masses which connect to each other by 16
springs for the first step (Fig. 42). Initially, the conditions of these oscillators may be
as follows,
(a)
(b)
(c)
(d)
(e)
Normal frequencies and normal modes can be obtained by determinant method for
3 3 magic square and a sample of 4 4 magic squares, and then different physical
aspects of the problem can be argued. For magic square of order 3, it is clear that the
system has 3 constants of the motion in minimum, which are angular momentum and
vertical and horizontal linear momentums. This triad says that three of the frequencies
vanish from 18 modes of oscillation. To illustrate, it should be said that these three
zeroes catch from symmetry on shift and transference in two directions at plane of the
system and symmetry on rotation about perpendicular axis of its plane. Ultimately, it
can be said that number of zeroes obtain from number of zero eigenvalues of tensor
K which depend on potential energy [67],[68].
22
Figure 42: System of particles and springs for 3 3 natural magic square
Conclusion
In this paper, some types of magic geometrical shapes are introduced briefly. Then, the most
important types of magic squares and their features are described. Moreover, construction
methods of natural magic squares together with their important properties are expressed.
Finally, some of the most considerable unsolved problems are reviewed, and interesting
physical applications of magic squares are analyzed. Physical application of magic squares
is still a new topic that needs to be explored more. There are many interesting ideas for
research in this field such as the idea explained in number 6 of section 7.
References
[1] Fahimi P 2012 A simple analysis of difference between two subjects in 33 matrices:
center of mass and magic squares Proc. ann. phys. Conf. Iran 3328-31.
[2] Hogendijk J P and Sabra A I 2003 The enterprise of science in Islam: New perspectives (Cambridge: MIT press).
[3] Selin H and DAmbrosio U 2001 Mathematics across cultures: The history of nonwestern mathematics (New York: Springer).
[4] Sesiano J 1998 Le trait dAbul-Wafa sur les carrs magiques Z. Gesch. Arab.-Islam.
Wiss. 12, 121-244.
[5] Andrews W S 1960 Magic Squares and Cubes, 2nd rev. ed. New York: Dover.
[6] Weisstein E W 2015 Magic Square, MathWorldA Wolfram Web Resource. http:
//mathworld.wolfram.com/MagicSquare.html
[7] Hagedorn T R 1999 Magic retangles revisited, Discrete Mathematics 207, 65-72.
23
[8] Heinz H D and Hendricks J R 2000 Magic Square Lexicon: Illustrated, selfpublished.
[9] Weisstein E W 2015 Magic Cube, MathWorldA Wolfram Web Resource. http:
//mathworld.wolfram.com/MagicCube.html
[10] Weisstein E W 2015 Magic Tesseract, MathWorldA Wolfram Web Resource.
http://mathworld.wolfram.com/MagicTesseract.html
[11] Heinz H 2010 Magic Hypercubes Overview, http://www.magic-squares.
net/c-t-htm/t_overview.htm
[12] Wenjun W, Grand Series of History of Chinese Mathematics, Vol 6, Part 6 Yang Hui,
section 2 Magic circle.
[13] Trotter T 1972 Normal Magic Triangles of Order n, Journal of Recreational Mathematics Vol. 5, No. 1, pp.28-32.
[14] The World of Trotter Math, math resources for teachers 2014. http://www.
trottermath.net/simpleops/magictri.html
[15] Trenkler M 2004 Magic Stars, ME J., Vol. 11, No. 10, 549-554.
[16] Weisstein E W 2015 Magic Hexagon, MathWorldA Wolfram Web Resource.
http://mathworld.wolfram.com/MagicHexagon.html
[17] Baker JE and King DR 2004 The use of visual schema to find properties of a hexagon,
Visual Mathematics Vol. 5 No. 3.
[18] Duncan D 1951 Problem 86. Math. Mag. 24, 166.
[19] Weisstein E W 2015 Heterosquare, MathWorldA Wolfram Web Resource. http:
//mathworld.wolfram.com/Heterosquare.html
[20] Lindon J A 1962 Anti-Magic Squares, Recr. Math. Mag., No. 7, 16-19.
[21] Weisstein E W 2015 Antimagic Square, MathWorldA Wolfram Web Resource.
http://mathworld.wolfram.com/AntimagicSquare.html
[22] Kraitchik M 1942 Mathematical Recreations. New York: W. W. Norton.
[23] Weisstein E W 2015 Semimagic Square, MathWorldA Wolfram Web Resource.
http://mathworld.wolfram.com/SemimagicSquare.html
[24] Weisstein E W 2015 PanMagic Square, MathWorldA Wolfram Web Resource.
http://mathworld.wolfram.com/PanmagicSquare.html
[25] Harry W S 2014 Pandiagonal Magic Squares, http://users.eastlink.ca/
sharrywhite/Pandiagonal.html#top
[26] Harry W S 2014 Compact & Complete Magic Squares, http://users.
eastlink.ca/sharrywhite/Pandiagonal.html#panspecial
[27] Harry W S 2014 Most-Perfect Magic Squares, http://users.eastlink.ca/
sharrywhite/Most-perfect.html
[28] Gardner M 1988 Magic Squares and Cubes, Ch. 17 in Time Travel and Other Mathematical Bewilderments. New York: W. H. Freeman, pp. 213-225.
[29] Weisstein E W 2015 Associative Magic Square,
MathWorldA
Wolfram
Web
Resource,
http://mathworld.wolfram.com/
AssociativeMagicSquare.html
24
http://www.magic-squares.net/
25
26