Forming magic squares has been one of the earliest preoccupations of people of all cultures. Many mathematicians have also worked on different kinds of magic squares. Today study of magic squares is considered part of the topic of Combinatorics.
A magic square is an nXn square matrix which has been filled with numbers in such a way that the sum of each row, column and both the diagonals are same. This sum is called the “Magic Constant”. The order of a n X n magic square is “n”.
Magic squares can be of different sizes, from 3 X 3 to larger sizes. Obviously, there is a limitation on how big a square can be conveniently drawn and calculated.
Magic squares can also be divided into 2 different types, depending on the kind of numbers which are filled in. The traditional type requires all the numbers to start from 1 and follow the number sequence. Hence a 3 X 3 square would have numbers from 1 to 9 & a 4 X 4 square would have numbers from 1 to 16. We can call it as “consecutive”. In the second type the numbers need not be in a sequence and can be known as “random”.
Consecutive Odd Magic Squares
All consecutive odd magic squares can be completed with numbers from 1 to using the same algorithm. This is only one of the possible solutions. Many more solutions are possible!
Consecutive Even Magic Squares
There are multiple algorithms to fill an even magic square.
The most popular even magic square is the 4 X 4 one. It has 880 unique solutions. Here is an example.
Diabolic Magic Squares
Some of the 4 X 4 consecutive magic squares are also called “diabolic”. In this square any four contiguous cells which form a square also have the same magic total. One such magic square is given below. It would be an interesting exercise for students to discover all these patterns!
Other Magic Squares
There are many varieties in these magic squares.
A Date Magic Square is one where the first row is filled with a certain date in the format dd-mm-yy-yy. Such a magic square can be given as a birthday gift.
Some mathematicians have formed magic squares where all the numbers themselves are squares! There are other higher-order magic squares which have lower order magic squares embedded in them
Magic Squares in History
India has a rich history of magic squares. The earliest magic square carved out in stone is at the Parshvanath temple in Khajuraho is dated around 900 AD.
It is also one of the earliest examples of Hindu numerals used in an inscription. The sophistication of the magic square is an indication of the high levels of mathematics achieved.
Srinivasa Ramanujan was also interested in this topic.
For students, working on magic squares is both a source of fun and an exercise which would help them practice additions & subtractions mentally.
How many different magic squares are possible?
According to Wikipedia, excluding rotations and reflections, following are the variations possible in various orders of magic squares.