Long before Sudoku began showing up in newspapers, ancient peoples had their own math tricks up their sleeves. What were these math tricks? They are called *magic squares*. Magic squares were known by the Chinese as far back as 650 BC.

What are **magic squares**? They are squares of order n with n^{2} numbers within the square’s n x n matrix such that the numbers in each column, row and diagonal add up the same number. For example, the magic square for order n=3 looks like this:

Look carefully at the rows, columns and diagonals – they each add up to the same number – 15! Now this magic square is a special case; it is the only magic square for order 3. Sure you can rotate it and make reflections, but this is the only arrangement for an n=3 magic square.

Magic squares exist for n >= 3. There exists a trivial magic square for n=1, and for n=2, there is no magic square. The number for which the columns, rows, and diagonals add up to is called the magic constant. The value of the magic constant for a square of order n is determined by the formula:

So for n=3, the magic constant (C_{m}) = 15. For n=4, C_{m} = 34. For n=5, C_{m} = 65, etc.

How many solutions are there for magic squares for n>3? There are many! For n=4, there are 880. For n=5, there are 275305224. How many are there for n=6? I have seen an estimate for over 1.7745×10^{19}!

Tags: Magic Squares, Math Games, Sudoku