We have $A(3×3)$ matrix (the sum of the elements on each row, column and diagonal are the same) with non-zero natural entries. Show that $det(A)$ is divisible with the sum of all elements in $A$.
I tried doing in the classical way, writing every term of $A$ and try finding a relation between them, but nothing interesting. I tried to split the determinant so I can get a sum to rewrite it in terms of $S$, where $S$ is the sum of the elements on each row, column and diagonal. If $det(A)$ is divisible with the sum of all elements in $A$, then is divisible with $3S$. I saw that this type of matrix is called 'magic square'. Maybe someone knows some interesting proprieties about this type of matrix?
The 9-dimensional vector space of $3 \times 3$ matrices has the set of magic matrices as a subspace. This subspace has dimension 3 with the following general structure (see here)
$$M=\begin{bmatrix} e+h-c & 2e-h & c \\ 2c-h & e & 2e-2c+h \\ 2e-c & h & e-h+c \\ \end{bmatrix}\tag{1}$$
Please note that the magic sum is equal to $3e$, i.e., three times the central entry.
The determinant of $M$ has a nice factorization :
$$\det(M)=9e(e-h)(2c-e-h)\tag{2}$$
on which we can "read" the divisibility property by the magic sum $3e$, and moreover indeed by $3$ times this magic sum.
(of course, this is valid if $e \ne h$ and $e+h \ne 2c$).
N.B. : I just found this similar question with answers proving only that the determinant is divisible by the magic sum, but not by $3$ times the magic sum.
Edit : If one tries to extend the study to the $4 \times 4$ case (see here), with general structure depending upon 8 parameters instead of $3$ :
$$M=\begin{bmatrix} a & b & c & d\\ e&f&g&(a+b+c+d-e-f-g)\\ h & (a-d+e-g+h) & (b+c+2d-e-f-h) & (f+g-h)\\ (b+c+d-e-h) & (c+2d-e-f+g-h) & (a-c-d+e+f-g+h)&(-d+e+h) \end{bmatrix}\tag{1}$$
we find again that the determinant $D$ of matrix $M$ is divisible by the magic sum (here $s=a+b+c+d$), but there is not anymore divisibility property ; in particular, there doesn't exist a fixed integer constant (like $3$ above) such that $\frac{D}{s}$ is always divisible by this constant.