🧩 Puzzles

🧩Magic Square

Fit 1 to 9 into a 3×3 grid so every row, column and diagonal sums to 15 — there is really only one answer.

Place the numbers 1 through 9 into a 3×3 grid so that every row, every column and both diagonals have the same sum — possibly the oldest number puzzle humans play. It looks endlessly variable, but it has exactly one essential solution.

A turtle and the Lo Shu

Legend says that more than four thousand years ago, a turtle surfaced from the Luo river carrying a 3×3 pattern on its shell in which every row, column and diagonal summed to the same value. The Chinese call it the Lo Shu square — the earliest known magic square:

492
357
816

Try placing the numbers yourself and feel why it is both hard and elegant:

InteractiveMagic Square 3×3

Place 1–9 so every row, column and diagonal sums to 15

Remaining

Why every line sums to 15

The shared sum is not up for negotiation — it is forced. Add up all the numbers first:

1+2++9=451 + 2 + \cdots + 9 = 45

The three rows together contain each of the 9 numbers exactly once, so the three row sums total 45, and each row must be:

45÷3=1545 \div 3 = 15

Before placing a single number, you already know the target. Columns and the two diagonals work the same way — they must also be 15. One more ledger entry: the four even corners 2+4+6+8 sum to 20, and the four odd edge-middles 1+3+7+9 also sum to 20 — the remaining 40 splits down the middle.

Checking shortcut

After you place everything, check the two diagonals and the middle row first — those three lines misbehave most often. Only once they pass, bother with the rest.

Why the center must be 5

Stare at the center cell: it belongs to 4 lines at once — the middle row, the middle column and both diagonals, more than any other cell. Add up those 4 lines:

15×4=6015 \times 4 = 60

Within that 60, each of the 9 numbers got counted once (45 in total), and only the center got counted three extra times. The surplus is:

6045=15=5×360 - 45 = 15 = 5 \times 3

So the center must be 5 — there is no alternative. By the way: the four corners can only be the even numbers 2, 4, 6, 8, and the middle of each edge takes an odd number 1, 3, 7, 9. Odd and even each have assigned seats — which is also the practical opening move: place the 5 first, then the four even corners, and the odds slot into place on their own.

There is only one answer

When you get stuck, it is tempting to assume there must be many arrangements and you just haven't found one. The truth is the opposite. Rotate the Lo Shu square or flip it like a mirror and you can produce 8 differently "looking" squares — but they are all the same one underneath: which numbers sit next to or across from each other never changes. Anything beyond rotation and reflection fails.

Check yourself

Quick quiz

  1. 1. In a 3×3 magic square (using 1–9), what must every row, column and diagonal sum to?

  2. 2. Why must the center cell be 5?

  3. 3. If you rotate a 3×3 magic square by 90°, does it still work?