Linear Algebra – Determinant of a Standard Magic Square

determinantlinear algebramagic squarematrices

  • What is the lowest positive, what the highest possible value for the determinant of a standard-magic-square-matrix of order $n$?
  • Are there singular standard-magic-square-matrices of any order greater than $3$?

First of all, the determinant of a standard-magic-square-matrix must be a multiple of $\frac{n^2(n^2+1)}{2}$ for odd $n$. This follows easily by the following process:

  • Add all the columns to the last column. Then every entry in the last column is $\frac{n(n^2+1)}{2}$,the constant of the standard-magic-square.

  • Now extract this constant and add all the rows to the last one. Then every entry in the last row is again the constant, beside the last entry, which is $n$.

  • Since $n$ is for odd n a divisor of the constant, it can be extracted as well. For even $n$, only $\frac{n}{2}$ can be extracted, so the determinant is only a multiple of $\frac{n^2(n^2+1)}{4}$. This gives lower bounds for the absolute value of the determinant of regular magic-square-matrices.

  • For size $3$, the only possible determinant (ignoring the sign) is $360$.

  • For size $4$, my personal minimum for the absolute non-zero determinant is $2176$ and my maximum is $17408$.

  • For size $5$, my best results are $325$ and $6\ 547\ 775$.

  • For sizes $4$ and $5$, I also found matrices with determinant $0$, but for $n = 6$ I found none. OEIS claims that the magic square of order $6$ produced by Matlab has determinant $0$ (By the way, the sequence seems to contain a typo because in the list $-360$ appears for $n=2$ instead of $n=3$).

My pascal program generating random magic squares did not find a magic square with order $6$ and determinant $0$. Since I do not have Matlab, I cannot verify the magic square produced by it.

Best Answer

This may provide a little more insight into your question. It shows if you have an n by n matrix and n is even, you can produce singular matrices which, by definition, all have a determinant of 0.

Here is a paper you may want to look at, published in the Mathematical Association of America's Journal (Amer. Math. Monthly, Nov. 2000):

Even Order Regular Magic Squares are Singular, R. Bruce Mattingly

Cleve Moler has pointed out (without proof) that the magic squares generated by MATLAB have the property that the squares of odd order are nonsingular matrices, while the squares of even order are all singular.