Write a matrix like this; notice the diagonal: 1, n+1, 2n+1, ..., and the way the terms "grow" cyclically and to the right:
1 2 3 ... n
2n n+1 n+2 ... 2n-1
3n-1 3n 2n+1 ... 3n-2
... ... ... ... ...
(n-1)n+2 (n-1)n+3 (n-1)n+4 ... (n-1)n+1
Now subtract 0 from the first row (!!), subtract n from the second row, 2n from the third, and so on, and (n-1)n from the n-th row. You get:
1 2 3 ... n
n 1 2 ... n-1
n-1 n 1 ... n-2
... ... ... ... ...
2 3 4 ... 1
Each column has a permutation of the numbers 1, 2, ... n, so the sum is the same. Hence, the columns of the original matrix are a solution. |