Squaring Magic Squares
Exploring the Math
Suzanne's Magic Squares 
Multiplying Magic Squares: Contents  Exploring the Math
Let's look at this common way of generating 3x3 magic squares: let n be a number larger than 4.
Is this a magic square?
For N=5, this is an honest magic square, namely the 3x3
square I used for A in multiplying the 3x3 and the 4x4 squares.
Therefore, I prefer to write this as
which I obtain by replacing n by x+5. In this form, it is a lot easier to see why the first square has the properties it does: it is obtained by starting with a real magic square
and adding the same quantity to all of the entries, i.e. x or, what is the same, N5. The only effect this has on the sums is to add 3x to them.
This is a trick one can perform on any magic square. Just add the same number x to all of the entries and you obtain a square with equal row, column, and diagonal sums. These sums will be obtained by adding nx to the corresponding values for the original square.
Now, notice that when you form the product of two magic squares A and B, where A is nxn and B is mxm, the nxn squares one uses to fill up A*B are all obtained from A in this way, but each time with a different value of x. Let's look at a row of A*B. It breaks up into rows for the nxn blocks that it passes through. The sum of one of these smaller rows is the sum for a row of A plus nx, where x is the value used to make that particular block. The sum for the row of A*B will then be (m times the sum for A) plus (n times the sum of the x's used to make those particular blocks).
This is the key fact that makes the product magic. All that matters is whether the sum of the x's is the same in all cases, i.e. whether the mxm array (call it X) of x's has magic properties. Each x is divisible by n^2 (n squared), as one sees from the original construction, so write it as x= n^2 y. If you now make an mxm square whose entries are the y's, you see at once that the square you get is none other than B1. It has the same sums for all of its rows, columns and main diagonals. That implies the same for the x's.
This last step was a little complicated. It could be made simpler by generalizing the first square's method a little further, i.e. instead of just using a "displacement" x to turn A into A+x, one can perform an "affine transformation." In other words, one can multiply all of the entries of A by the same constant (say, c) and then add x. For example, starting with the original 3x3 square
if we multiply by c and then add x, we get
I'll denote this cA+x. The more general observation is that an affine transformation carries a square with magic properties to another one with magic properties. The mxm matrix X of x's in the argument above then becomes n^2 B  n^2 or, what is the same, n^2 B  1, and since B is magic, X has magic properties.
I think we can define the terminology "magic properties" to refer to the fact that the sum of any row, column or main diagonal has the same sum. So the first square,
and like squares, have magic properties. But a square with magic properties is only called a magic square when its entries run consecutively from 1 up to the number of entries in the square (i.e. n^2 for an nxn square).
What is a magic Square? defines and discusses some special properties of magic squares.
