This is my first question with mathOverflow so I hope my etiquette is up to par here.


My question is regarding a $3\times3$ magic square constructed using the la Loubère method (see [la Loubère method](http://en.wikipedia.org/wiki/Magic_square#Method_for_constructing_a_magic_square_of_odd_order))


Using the method, I have constructed a magic square and several semimagic squares (where one or both of the diagonals do not add up to a magic sum) with a program on written on my graphing calculator. After playing around with the program, I was shocked that the determinants of these $3\times3$ magic squares are all the same (specifically -360). Why is this so? (I am still an undergraduate so please go easy on the math :] )



Determinant of a $3\times3$ magic square
I don't have an explanation, but here is an outline of a proof (I've checked all the details myself, but it's laborious to write up correctly) that what you claim to happen actually does happen.


**Result: Let $M$ be a 3x3 integer matrix whose columns, rows, diagonal, and anti-diagonal each total 15. The following are equivalent:**


1. **The entries of $M$ are distinct and positive;**
2. **The determinant of $M$ is $\pm 360$;**
3. **Calling $h,i$ the (3,2) and (3,3) entries, $$(h,i)\in \{(1,6), (1,8), (3,4), (3,8), (7,2), (7,6), (9,2), (9,4)\}.$$**


The proof is just writing down the equations for the sums, rows, etc., to be 15 and solving, and then writing down the formula for the determinant and simplifying (it turns out $det = 45(h-5)(h+2i-15)$) and solving the resulting diophantine equation.


The explanation may well be just that there aren't very many 3x3 magic squares (basically, it looks like there's just one that we rotate and flip to get eight). For 4x4, the solution space will be 7d instead of 2d, and that is a *lot* of extra freedom. If you find a simply-described structure in the determinants of those, I'd be surprised.


