Proof that magic square cannot be transformed

295 Views Asked by At

How do I prove that the first magic square below cannot be transformed into the second by a sequence of row and column exchanges.

$$(a)\;\pmatrix{15&2&1&12\\4&9&10&7\\8&5&6&11\\3&14&13&0}\qquad\qquad(b)\;\pmatrix{14&8&5&3\\9&15&2&4\\7&1&12&10\\0&6&11&13}$$

1

There are 1 best solutions below

3
On

Look at row 2 of the second matrix; it contains 15 and 4. After any sequence of column swaps, any row that contains 15 and 4 will still contain these two numbers. A similar statement goes for any sequence of row-swaps: since there's a row containing 15 and 4 before the swaps, there'll always be some row containing 15 and 4 after the swaps. But the first matrix doesn't have 15 and 4 in the same row.

A proper proof of this would involve induction, with the inductive hypothesis being that after $k$ swaps, the matrix will have a row containing both $4$ and $15$, and the overall claim being that for any sequence of $n$ operations applied to matrix "b", the $n$ result cannot be matrix "a". But I'll let you write that out.