Proving magic squares determinant is a multiple of 3 when any numbers can be used

determinantlinear algebramagic squarematrices

I am trying to prove that the determinant of a magic square, where all rows, columns and diagonal add to the same amount, is divisible by 3.

I proved it for magic squares which have entries $1,\ldots, 9$, but it turns out I need to show it for magic squares which can have any entries, e.g.
\begin{pmatrix}
1 & 1 & 1 \\
1 & 1 & 1 \\
1 & 1 & 1
\end{pmatrix}

or
\begin{pmatrix}
3 & 1 & 2 \\
1 & 2 & 3 \\
2 & 3 & 1
\end{pmatrix}

How can I do this? I tried working out the determinant using $a, b,\ldots, i$ as entries but could not find it.

Thank you!

Best Answer

Let the three rows of the magic square be $r_1$, $r_2$, and $r_3$. Since the determinant is unchanged by row operations that add a multiple of one row to another, the matrix with rows $r_1$, $r_2$ and $r_1+r_2+r_3$ has the same determinant. The entries in $r_1 + r_2 + r_3$ are the column sums of the original magic square, which are all equal to the magic constant. The magic constant is three times the central entry of the magic square, so every entry in this new row is multiple of three; therefore the determinant is, too.

Related Question