Sie sind auf Seite 1von 14

MAGIC SQUARES

I.

Introduction

A magic square is an arrangement of numbers (usually integers) in a square grid, where the
numbers in each row, and in each column, and the numbers in the forward and backward main
diagonals, all add up to the same number. Magic Square has a history dating so far back they
disappear into the boundary between history and myth. Most ancient history is of Chinese
invention of Magic Square. The ancient Greek history of magic square goes back to 1300 BC.
Amongst those ancient mathematicians who knew about magic squares were the Arabs.
Magic squares were thought to possess mystic and magical powers because of their unusual and
special nature. The magic square has served as a talisman for good luck, a key to make gold, an
aid to childbirth, an astrological means of communicating with the planet Saturn and so on. Most
of all it has been, and remains, a fascinating mathematical entity whose properties lend
themselves to problem solving and exploration.
Magic Squares are not only fun, but they actually help develop ones thinking skills in several
different ways. Magic Squares also present an opportunity to learn about the probability theory
(e.g. combinations and permutations), which crop up all over the place, including, for example,
calculating your winning odds at online slot games or trying to predict the odds of the
elections and even bingo you can enjoy online. In this paper an effort will be made to discuss
type and construction of magic square with little highlight on the history of it. This paper will
only focus on the Magic Square related to integers; word square will be out of purview of this
paper.

II.

History of Magic Square

From ancient Chinese literature, at one time, there was a huge flood. The people tried to offer
sacrifices to the god of one of the flooding rivers, the Lo River, to calm his anger. As they were
doing this, a turtle emerged from the water with a curious pattern on its shell, with patterns of
circular dots arranged in a three-by-three grid on the shell, such that the sum of the numbers in
each row, column and diagonal was the same: 15. The people were able to use this magic square
to control the river and reduce the flood

Figure 1. Lo Shu Magic Turtle

In ancient Greek writing, references are sparse. It is said that Greek mathematicians as far back
as 1300BC wrote about magic squares. Amongst those ancient mathematicians who knew about
magic squares were the Arabs. The 3x3 magic square was used as a lucky charm, and larger
squares were also known. In fact, by the 13th century, the Arabs had produced a 10 by 10 magic
square. Some say the Arabs discovered magic squares; others say they learned them from the
Indian mathematicians of the 7th and 8th centuries.
Interestingly, the Indians seemed to know about order 4 squares before order 3 squares. As far
back as 550AD, Varahamihira used a 4 by 4 magic square to decribe a perfume recipe, but the
earliest known Indian writings about an order 3 square come from 900AD, as a medical
treatment!
Magic squares were introduced into Europe in 1300AD by Manuel Moschopoulos, who probably
learned about them from the Arabs. He wrote a number of works, with his treatise on magic
squares being his only mathematical work. The most famous European work involving magic
squares is perhaps Albrecht Durer's engraving 'Melancolia', from 1514.

II.

Concept of Magic Square

A magic square is an nxn matrix in which every row, column, and diagonal add up to the same
number. In other words, a magic square is an arrangement of the numbers from 1 to n^2 (nsquared) in an nxn matrix, with each number occurring exactly once, and such that the sum of
the entries of any row, any column, or any main diagonal is the same which is called Magic
Total. Figure2 shows a Magic Square of 3rows and 3column with a magic total 15.

Figure 2. 3x3 Magic Square

There are three main properties of Magic Square. Properties are as follows:

The order of a Magic square is defined by the number of rows or columns. An


order four Magic square has four rows or columns.

Each row, column and diagonal of a Magic square totals the same number. This
number is called the magic constant or magic sum.

Any two numbers in a row, column or diagonal that are equidistant from the
center are complements to each other.

IV. Categories of Magic Square


Numeric magic squares may be divided into two categories:

A.

Odd Magic Square

Odd magic squares, which means that there is an odd number of cells on each side of the
magic square.

Figure 3. Odd Magic Square

B.

Even Magic Square

Even magic squares, which means that there is an even number of cells on each side of
the Magic Square. "Even" Magic Squares may be further divided into two sub-categories:
1.
"Singly even" magic squares, which means that the number of cells on
each side of the magic square is evenly divisible by two, but not by four (e.g. 6 x
6 and 10 x 10 Magic Squares). A formula for generating singly even numbers is
(n*4) + 2, which generates the numbers 2, 6, 10, 14, 18, 22, 26, 30 and so on.
There is no magic square that can be constructed in a 2 by 2 square but singly
even magic squares can be constructed for n=6, 10, 14 and so on. The figure 4
shows a 6x6 singly even magic square.

6 32 3 34 35 1
7 11 27 28 8 30
19 14 16 15 23 24
16 20 22 21 17 13
25 29 10 9 26 12
6 5 33 4 2 31
Figure 4 Singly Even Magic Square
2.
"Doubly even" magic squares, which means that the number of cells on
each side of the magic square is evenly divisible by both two and four (e.g. 4 x
4 and 8 x 8 Magic Squares). Figure 5 below shows a doubly even 4x4 magic
square.
4

14

15

12

11

10

16

13

Figure 5 Singly Even Magic Square

V.

Magic Totals

Magic Total is the common sum of all numbers in each row, each column and each corner
diagonal. There is, perhaps surprisingly, a reasonably simple formula for determining what the
"Magic Total" for any given "basic" magic square will be. However, before giving this formula,
there is another term to explain, and that is the word "basic". In this context, it means that the
4

magic square is constructed using consecutive numbers, starting with one. The formula can be
written as, ((n *n *n) + n) / 2, where "n" is the number of cells on each side of the magic square.
Or, if the magic total is M, it can be written as:

To show a few examples, here are the "Magic Totals" for the magic squares of "orders" three up
to seven:
Order Magic Total (M)
3

15

34

65

111

125

VI. Construction of Magic Square


A.

Magic Square of Odd Order

A magic square of odd order (ie. 3x3) can be made easily in 3 following steps:
1. Start in the middle of the top row. Write the number '1' there as shown in
figure 6.

Figure 6. Placing 1st Digit in Top Centre


2. Place the next number in the next empty square diagonally up and to the right.
Wrap around horizontally and vertically as needed. (So '2' is on the bottom
row, one square right of center. Otherwise, place it one box lower as shown in
figure 7 to 9.
5

2
Figure 7. Placing 2nd Digit in Up-Right

1
3
2
Figure 8. Placing 3rd Digit in Up-Right

Figure 9. Completing all the Digit in Same Way (up-right)


3. Repeat the previous step until all n2 numbers have been filled in. Each row,
column, and both main diagonals should add to the same sum, namely (n3 +
n)/2.

B.

Magic Square of Doubly Even Order

In a 4 by 4 grid write the numbers 1 through 16 from left to right. Now "flip" the numbers
in the diagonals (the red lines). That is to say, exchange 16 & 1, 6 & 11, 13 & 4 and 10 &
7, and you'll have a magic square totaling 34. Figure 10 shows the construction of 4x4
magic square.

Figure 10. Constructing a 4x4 Magic Square

Unfortunately, the above method only works for the 4 by 4 square and so we'll have to
learn another way for constructing doubly magic squares of any size.
Looking at the diagram below, divide the square into four "mini-squares" squares (M)
at the four corners, the size of each equals n/4. A 4 by 4 magic square has mini-squares
that are 1 by 1. (Note the 4 red squares at figure 11). For an 8 by 8 the mini-squares are 2
by 2, for a 12 by 12 the mini-squares are 3 by 3 and so on.
Next, divide the center into a large square (L) the size of which is n/2.
For a 4 by 4 square the size would be 2. (Note the blue square at figure 11)
Now, we fill in the square with the numbers from 1 through 16 but only for the squares
that have a 'M' or 'L' in it and we leave the others blank. Finally, starting at the top left
cell, counting backwards from 16, only fill in the blank cells and then the square is
completed. (See the square at figure 11 above). This method works perfectly but gets a
bit confusing with the "mini-squares", the large square and the formula for each.

Figure 11.

Constructing Doubly Even Magic Square

B.

Magic Square of Singly Even Order

Basically, "singly even" means divisible by 2 but not by 4. Singly even magic squares are
the most difficult to construct and so let's start with the smallest possible one where n = 6.
To get the sum, we'll use the formula that we previously used:

So, the sum for n=6 is 111.


The first step is to break the square into four smaller, equally-sized squares. So, for
constructing a 6 by 6 magic square we start with four 3 by 3 squares. We then construct
four magic squares in a pattern indicated here.

Figure 12. Four Squares Within one 6x6 Magic Square.

Basically, this means that in section 'A' we will build a magic square with the numbers 1
through 9, in section 'B' the magic square will start with 10 and end with 18, section 'C'
will have the numbers 19 through 27 and section 'D' goes from 28 through 36. So, when
we finish this step, the square looks like this:

Figure 13. Four 3x3 Squares within one 6x6 Magic Square.

As shown in the figure 13, six numbers on the left side of the square have been
highlighted and that's because there is still some more work to be done on this magic
square. In this case, the highlighted numbers have to be interchanged with one other.
After doing this, the square should now look like figure 14.

Figure 14. Final 6x6 Magic Square.

Next, we'll move on to building a 10 by 10 square. The rules about building four n 2
squares in the "ABCD" pattern still apply but if you notice, in the left side square, the
numbers that need shifting make up a different pattern from the 6 by 6 square.
The numbers on the left side that require shifting are one column wider and for the first
time we have a right hand column to deal with.
9

Figure 15. 10x10 Magic Square.

The square on the right side of figure 14 is the completed square after all those numbers
have been shifted and all rows, columns and diagonals sum to 505. We can see that the
pattern for the cells that need to be shifted is now forming a very predictable pattern.
Perhaps by building a 14 by 14 magic square we could see if the pattern continues in the
same fashion.

Figure 16. 14x14 Magic Square.


10

Comparing this to the 10 by 10 square, we can see the pattern is now quite simple. The
cells that require shifting for the 14 by 14 square are one column greater than the 10 by
10 square. The magic sum for this square is 1,379. Figure 16 shows the construction of
14x14 magic square.

V.

Applications of Magic Square

Throughout the ages magic squares were used for pleasures, mathematical calculations,
construction works or even for celestial investigations. Modern day applications of magic
squares are difficult to find. There seems to be some sort of link between magic squares and
music and the Latin squares along with the Greaco Latin squares are used in the popular puzzle,
Sudoku. Apart from that, other applications found were from mathematicians in history which no
longer apply.

A.

Music

The main area of the application of magic squares to music is in rhythm, rather than
notes. Indian musicians seem to have applied them to their music and they seem to be
useful in time cycles and additive rhythm. In this case it is not the usual magic properties
of a square that are important, but the relationship of the central number to the total sum
of all the numbers in the magic square. This is because for rhythm, consecutive numbers
1 to n^ are not used to fill the cells of the n n magic square. This relationship is: The
total sum of the magic squares numbers = central number x 9.
This is important to music as it shows the size of the magic square, which is how many
pulses or sub-divisions there are in the sequence, this will indicate how and where to
apply it.
3 5

5 8

11

7 11 15

Figure 17. Magic Square for Rhythm


Using figure 17 as an example, 8x9=72 gives the size of the magic square. This can
therefore be applied to a piece of music with 18 crotchet beats since 18x4=72. Rests can
also be added between the first and second or second and third rows to create a feeling of
the music building towards a cadence. By choosing different values for the rests, the
same magic square can create many different musical passages (Dimond, 2006).

11

B.

Sudoku

Sudoku was first introduced in 1979 and became popular in Japan during the 1980s
(Pegg & Weisstein, 2006). It has recently become a very popular puzzle in Europe, but it
is actually a form of Latin square. A Sudoku square is a 9x9 grid, split into 9 3x3 subsquares. Each sub-square is filled in with the numbers 1 to n where n 9 , so that the 9x9
grid becomes a Latin square. This means each row and column contain the numbers 1 to
9 only once. Therefore each row, column and sub-square will sum to the same amount.

Figure 18. An Example of a Sudoku Square

VI. Summary
Magic squares have a long history and have fascinated people throughout history and they
continue to challenge people around the world. The more one learn about them, the more
interesting they are. The first known Magic squares are from China but it can be found in many
different parts of the world. For instance they were known in India 400 AD, then in the Islamic
world and in Europe. But the first Magic square in China was known about 2 000 BC.
The order of a Magic square is defined by the number of rows or columns. An order four Magic
square has four rows or columns. Each row, column and diagonal of a Magic square totals the
same number. This number is called the magic constant or magic sum. Any two numbers in a
row, column or diagonal that are equidistant from the center are complements to each other.
There are mainly two types of magic squares. Odd magic squares are having odd number of
column and rows (i.e. 5, 7, 9, and so on). Even magic squares are those with even numbers of
column and rows. Even magic squares are again sub divided into another two groups. Singly
even magic squares are those whose column or rows are divisible by two only but not by four.
12

Double even magic squares those, whose columns are divisible by both two and four. There are
many techniques of constructing magic squares. Some need only changing the places of numbers
of diagonals. Some need more calculations.
Throughout the ages magic squares were used for pleasures, mathematical calculations,
construction works or even for celestial investigations. Most common uses are preparing rhythm
of music and playing Sudoku. Despite the fact that magic squares have been studied for a long
time, they are still the subject of research projects.

13

References
Adler, A. (1996). What is a magic square? [online]. Available from
http://mathforum.org/alejandre/magic.square/adler/adler.whatsquare.html
Anderson, D. L. (2001). Magic Squares [online]. Available from
http://illuminations.nctm.org/LessonDetail.aspx?id=L263
Ball, W. W. R. (1959). Mathematical recreations and essays. London. Macmillan
& Co Ltd.
Ballew, P. (2006). Magic squares [online]. Available from
http://www.pballew.net/magsquar.html
Beezer, R. (1995). Graeco-Latin squares [online]. Available from
http://buzzard.ups.edu/squares.html
Dimond, J. (2006). Magic squares [online]. Available from
http://www.jonathandimond.com/downloadables/Magic%20Squares.pdf
Farrar, M. S. (1997). History of magic squares [online]. Available from
http://www.markfarrar.co.uk/msqhst01.htm
Gardner, M. (1988). Time travel and other mathematical bewilderments. New
York. W. H. Freeman and Company.
Grogono, A. W. (2004). A mini-history of magic squares [online]. Available from
http://www.grogono.com/magic/history.php
Kraitchik, M. (1960). Mathematical Recreations. London. George Allen & Unwin
Ltd.

14