How do you express a $3\times3$ semi magic square(same sum for each row&col) in form of a set?

285 Views Asked by At

By set, I mean like a subspace $W=\{[] \in M_{3\times3} (\mathbb{R})| $something$\}$.

Since matrix such as $ \begin{pmatrix} 0 & 0&3 \\ 3 & 0&0 \\ 0 & 3&0 \end{pmatrix}$ $ \begin{pmatrix} 2 & 1&1 \\ 1 & 2&1 \\ 1 & 1&2 \end{pmatrix}$ both works and I can't really find a relationship between the squares. Could someone provide any insights for finding the set?

2

There are 2 best solutions below

0
On

There are four equations in nine variables: Row1=Row2=Row3=Col1=Col2. (The third column will then be equal automatically.)
So it is a five-dimensional subspace of the nine-dimensional $M_{3\times3}$.
$$\left(\begin{array}{ccc}a&b&s-a-b\\c&d&s-c-d\\s-a-c&s-b-d&a+b+c+d-s\end{array}\right)$$

0
On

A perfectly fine way of doing this is $$ W=\left\{ \begin{pmatrix} x_{11}&x_{12}&x_{13}\\ x_{21}&x_{22}&x_{23}\\ x_{31}&x_{32}&x_{33}\\ \end{pmatrix}\;: x_{1i}+x_{2i}+x_{3i}=x_{j1}+x_{j2}+x_{j3}=c,1\leq i,j\leq3, c\in \mathbb{R}\right\} $$