Lo Shu is one of the oldest and most elegant magic squares. With only the numbers 1 through 9, it forces rows, columns, and diagonals to obey the same sum: 15.
The Lo Shu magic square
Riddle statement
Place the numbers 1 through 9 in a 3\times 3 grid, using each number exactly once, so that every row, every column, and both diagonals add up to 15.
Fill in the grid and check whether you have built a valid magic square.
Show solution
Solution
Answer: one valid arrangement is
Let us check the sums.
Rows:
Columns:
Diagonals:
The square satisfies the condition on all eight lines.
Now let us prove that the center must be 5. Each of the four lines through the center sums to 15. If we add those four lines, each of the eight outer cells is counted once and the center is counted four times. Writing $c$ for the center gives
Thus $60=45+3c$, so $c=5$. It follows that every pair of cells opposite each other across the center must sum to 10. The four possible pairs are
It remains to determine which pairs belong in the corners. The two numbers in an opposite pair have the same parity. Suppose an odd pair occupied two corners. If the other corner pair were odd as well, all four edge cells would be odd; if it were even, the corner parities would alternate and all four edge cells would be even. The first case leaves no place for any of the four even numbers, while the second would use six even numbers. Both are impossible. Therefore, the corners must contain exactly $2,4,6,8$: the pairs $(2,8)$ and $(4,6)$.
We can now normalize by symmetry. Rotate the square to put 4 in the upper-left corner; its opposite must be 6. If necessary, reflect the square to put 2 in the upper-right corner; its opposite is then 8. Each edge cell is forced by its row or column: the top is $15-4-2=9$, the left is $15-4-8=3$, the right is $15-2-6=7$, and the bottom is $15-8-6=1$. This gives exactly the square displayed above.
Every solution can be brought to this one by that rotation and possible reflection. Conversely, the four rotations and four reflections of the displayed square give eight distinct arrangements. These are therefore all the solutions: the square is unique up to rotations and reflections.