Magic Squares
Download
Report
Transcript Magic Squares
agic
quares
by Patti Bodkin
1
•A magic square is “magic” because it contains the property that the square
consists of the distinct positive integers 1, 2, …,N 2 such that the sum of the N
numbers in any horizontal, vertical or main diagonal line is always the same
magic constant.
•A magic square is said to be of the N th order if the integers in the square are
consecutive numbers from 1 to N 2.
•Magic squares are often identified by their order, by their size.
•The smallest, “true” magic square is of the third order, and there exists only one
of these, not including rotations and reflections. These are often referred to as Lo
Shu squares because of ancient story of how magic squares were discovered.
4
9
2
3
5
7
8
1
6
2
There exists 880 fourth order magic squares. Bernard Frénicle
de Bessy, a French Mathematician determined this in 1693.
Fourth order squares are commonly referred to as Dürer magic
squares, because the artist included the following fourth order
square in his piece, Melencholia, painted in 1514.
16
3
2
13
5
10
11
8
9
6
7
12
4
15
14
1
Durer’s
Melencholia
Durer Magic Square
3
There exists a formula to determine the magic sum of a magic square. (eqn.1)
This formula works for squares that contain consecutive integers from 1 to N 2.
m
m(m 1)
m
1
2
3
...
m
Recall that the sum of the series
is: i
2
i 1
2
With magic squares, m N so, we get:
N 2 ( N 2 1) ( N 4 N 2 )
2
2
We then divide by N so that it will give the sum for the rows and columns,
which gives us Equation 1:
N ( N 2 1)
2
Eqn. 1
4
There is another formula for squares that might start with an integer other
than 1, or have a distance between integers greater than 1, where N is the
order of the square, A is the integer you start the square off with (the smallest
integer in the square) and D is the incremental difference between each successive
integer:
2 A D( N 2 1)
N(
)
2
17
3
13
7
11
15
9
19
5
N 3(order)
A 3(1st Integer)
D 2(difference)
5
One interesting property of the Dürer square is that if you sum the top
two rows, and the bottom two rows, and sum the left two columns and
the right two columns, you get the following pattern:
21
13
13
21
19
15
15
19
13
21
21
13
15
19
19
15
Row Clusters
Column Clusters
6
There are also different classifications of magic squares.
Simple Magic Squares:
Meets the basic requirements that the sum of the integers in each row,
column and main diagonal is a constant—the magic sum.
Semi-Magic Squares:
Obtains the same properties of the simple magic squares except that the
main diagonals do not sum to the magic sum.
Associated Squares:
In addition to the properties of a simple magic square, these squares
also have skew properties:
1
14
12
7
8
11
13
2
15
4
6
9
10
5
3
16
7
One other type of Magic Square is the Nasik Square:
These squares also have the property that certain pairs of cells sum to half
the magic sum.
They also have the special property that all the “broken diagonals” sum to a
constant as well.
1
14
7
12
Magic Sum: 34
15
4
9
6
10
5
16
3
8
11
2
13
4(42 1)
2
Another neat property of Nasik squares is that if you repeat the square
in all directions, you can then draw a box around any N x N array of
numbers and it will be magic.
Check out this website to see an example of it:
http://www.mathcats.com/explore/puzzles/magiccarpet1.html
8
Construction…
There are numerous ways to construct a magic square, but we’ll go over one of the easier ways.
This method is known as the De la Loubere Method.
1. You start by placing the number 1 in any of the cells of your N x N magic square.
(A ‘1’ in the top middle will give a perfect magic square, however, you can place the ‘1’
anywhere, the diagonals might not sum to the magic number.)
2. The next step is to place the next successive integer in the square above and to the
right of the “1”.
Continue this last step until the square is filled.
3. The numbers wrap around the square, so when you reach the top of the square, wrap
to the bottom row, and if you reach the right side, then wrap to the left.
4.
When you come to the upper right corner drop down one row to continue filling
numbers.
5. If you go to place the next number, x, in a cell that is already filled, then place x in
the cell below x-1, the number you had just placed.
9
1
5
4
6
3
2
10
17
24
1
8
15
23
5
7
14
16
4
6
13
20
22
10
12
19
21
3
11
18
25
2
9
http://www.magic-squares.de/construction/general/odd.html
De la Loubere’s Method in Flash
11
Proof of De la Loubere’s Method:
To prove why De la Loubère’s method always produces magic squares when the ‘1’ is
placed in the middle of the top row, use the most general information possible.
For this proof, it will be of a 3rd order square. (N = 3).
Each row, column, and main diagonal of this square has the constant, 3A + 12D.
Using the most general formula to compute the magic sum, (pg 3) with N = 3, and
leaving A and D as unknowns, the formula will the give the magic sum as 3A + 12D.
This should hold for any odd N provided that the ‘1’ is placed in the middle cell of the
first row.
A + 7D
A
A + 5D
A + 2D
A + 4D
A + 6D
A + 3D
A + 8D
A+3
3 A 12D
3 A 12D
12
Problem:
Construct a 7th order magic square using De la Loubere’s method, starting
with the ‘1’ in the middle of the top row.
Check that your square is a magic square using the formula on slide 4 to
check the magic sum.
13
30
38
46
5
13
21
22
39
47
6
14
15
23
31
48
7
8
16
24
32
40
1
9
17
25
33
41
49
10
18
26
34
42
43
2
19
27
35
36
44
3
11
28
29
37
45
4
12
20
N ( N 2 1)
2
N 7
7(7 2 1) 7(50 )
2
2
175
Row 1 : 30 39 48 1 10 19 28 175
Column 7 : 28 29 37 45 4 12 20 175
Diagonal : 30 47 8 25 42 3 20 175
14