2
$\begingroup$

I am trying to show that $$\left\{\begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix},\begin{bmatrix} 0 & 1 & −1 \\ −1 & 0 & 1 \\ 1 & −1 & 0 \end{bmatrix},\begin{bmatrix} −1 & 1 & 0 \\ 1 & 0 & −1 \\ 0 & −1 & 1 \end{bmatrix}\right\}$$ is a basis for the vector space of all 3×3 magic squares (3x3 matrices such that the sum of each row and column and diagonal is equal).

Is there an easy way to do this?

  • 0
    Clearly, the three matrices span _a_ space of magic squares, and they're linearly independent. What's left is to show that the space of _all_ magic squares is a vector space and that it is $3$-dimensional.2017-02-09
  • 0
    Are the three rectangular images immediately following the word "set" in your first sentence obsolete now that you've formatted the three matrices?2017-02-09
  • 0
    @Arthur what's hard is to show that the set spans the space of all 3x3 magic squares.2017-02-09
  • 0
    You could come up with a matrix representing the system of equations you want - that all rows, columns and diagonals have the same sum, and then show that it has a 3 dimensional solution. This may be a bit ugly though....2017-03-04

1 Answers 1

1

This is really an extension to my comment above. If you denote the entries of the matrix by $a,b,c,d,e,f,g,h,i$, then your condition that all rows and columns and diagonals have the same sum corresponds to the solutions to the matrix equation:

$$ \left[ \begin{array}{ccccccccc|c} 1 & 1 & 1 & 0 & 0 &0 &0 &0 &0 & k\\ 0 & 0 & 0 & 1 & 1 &1 & 0 & 0 &0 & k \\ 0 & 0 & 0 & 0& 0 &0 &1 &1 & 1 & k\\ 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0&k \\ 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 &k\\ 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1&k \\ 1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 &k\\ 0 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 0 &k\\ \end{array} \right] $$

Where the first three rows represent the rows, the next three rows represent the columns, and the last two rows represent the diagonals. The $k$ represent any old fixed constant that you want the sums to be, all the same because this square is magic.

I'll work on reducing this matrix for this answer, but I suspect a TI84 or some other calculator can do this faster than I can.

After working this out on pen and paper and doing it improperly (of course, you can never get them right the first time), I went to this site here, and entered the matrix with $k = 1$. It doesn't matter what $k$ is since this variable is going to be free no matter what, and you can just scale that column.

The output given is this: $$ \left[ \begin{array}{ccccccccc|c} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 2k/3\\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 2k/3 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 &-1 &-1 & -k/3\\ 0 & 0 & 0 & 1 & 0 & 0 & 0 &-1 &-2 & -2k/3 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & k/3\\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 2 & 4k/3 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & k\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ \end{array} \right] $$

This matrix has $2$ free variables, and $k$ is also free like we said above, so this is the $3$ dimensional solution set we wanted. Since you have found $3$ such matrixes that are linearly independent and have the desired property, they must span the set of all magic squares.

  • 0
    I did thought about this, but I used Python to reduce the matrix because it is too ugly. But thanks anyways!2017-03-08