You are on page 1of 16

# Numbers and Number

Structure
5. Modular Numbers and
Magic Squares
Content Outline
Magic Squares
4x4, 6x6 and 8x8 magic squares
n x n magic square, where n is an
odd number
Formula to calculate the sum of each
row, each column and each diagonal
Solve non-routine problems involving
Magic Squares
Magic Squares
Put the numbers 1 to 9 into the square so that all rows,
columns and diagonals add to the magic number (15). You
may use once only each number.

2 3
1
4
8
7 6 5

A 3 x 3 magic Square
9
3 x 3 Magic Square
(first
)

6 7 2 2 7 6 8 3 4 6 1 8
1 5 9 9 5 1 1 5 9 7 5 3
8 3 4 4 3 8 6 7 2 2 9 4

Which one of these did you get? Why are they all the same as the first?

4 9 2 8 1 6 4 3 8 2 9 4

3 5 7 3 5 7 9 5 1 7 5 3

8 1 6 4 9 2 2 7 6 6 1 8
4 Reflections 3 Rotations
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

5
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
N 3(order )
7 11 15 A 3(1st Integer)
D 2(difference)
9 19 5

6
One interesting property of the Drer 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

7
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 constantthe 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
8
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 4(4 2 1)
10 5 16 3 2

8 11 2 13

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

9
The History of Magic Squares

## Historically, the first magic square was supposed to have been

marked on the back of a divine tortoise before Emperor Yu (about
2200 B.C) when he was standing on the bank of the Yellow River.
lo-shu
The 4 elements evenly balanced
Fire
2 6
7

Water

9 5 1

Metal
Wood

4 3 8

## Even (feminine) numbers or yin.

Odd (masculine) numbers or yang. With the Earth at the centre.
In the Middle Ages magic squares were believed to give
protection against the plague!
In the 16th Century, the Italian mathematician, Cardan,
made an extensive study of the properties of magic squares
and in the following century they were extensively studied
During this century they have been used as amulets in India,
as well as been found in oriental fortune bowls and medicine
cups.
Even today they are widespread in Tibet, (appearing in the
Wheel of Life) and in other countries such as Malaysia, that
have close connections with China and India.
Constructing n x n Magic Squares (n odd)

Pyramid Method

## 3 2. Fill the diagonals

2 6 2 7 6

1 5 9 9 5 1

4 8 4 3 8

7
Constructing n x n Magic Squares (n odd)

Pyramid Method
1. Build the pyramid
A 5 x 5 Construction
5
3. Fill the holes
4 10 2. Fill the diagonals
3 9 15 3 16 9 22 15
2 8 14 20 20 8 21 14 2
1 7 13 19 25 7 25 13 1 19
6 12 18 24 24 12 5 18 6
11 17 23 11 17 10 23
4
16 22
25x 26
21 Check the magic constant Sum(1 25)
2
325

n (n 1) 325
Sum(1 n) 65
2
5
Constructing n x n Magic Squares (n odd)

Pyramid Method
1. Build the pyramid
7 A 7 x 7 Construction
6 14 3. Fill the holes
2. Fill the diagonals
5 13 21
4 12 20 28 4 29 12 37 20 45 28
3 11 19 27 35 35 11 36 19 44 27 3
2 10 18 26 34 42 10 42 18 43 26 2 34
1 9 17 25 33 41 49 41 17 49 25 1 33 9
8 16 24 32 40 48 16 48 24 7 32 8 40
15 23 31 39 47 47 23 6 31 14 39 15
22 30 38 46 22 5 30 13 38 21 46
29 37 45
36 44
49x 50
43 Check the magic constant Sum(1 49) 1225
2
n (n 1) 1225
Sum(1 n) 175
2
7
Check these statements

## 3 16 9 22 15 1. Adding the same number to all entries

maintains the magic.
20 8 21 14 2
2. Multiplying all entries by the same
7 25 13 1 19 number maintains the magic.
3. Swapping a pair of rows or columns that
24 12 5 18 6 are equidistant from the centre
11 4 17 10 23 produces a different magic square.

## Mathematicians have recently programmed a computer to calculate the

number of 5 x 5 magic squares.
There are exactly 275 305 224 distinct solutions!

## Construct a 7 x 7 magic Square!

https://
en.wikipedia.org/wiki/Magic_square