Magic squares and number arrangements
A magic square is a square grid filled with numbers so that every row, every column, and both diagonals add up to the same total , called the magic sum.
Idea
The smallest interesting magic square is order , using numbers to once each:
2 7 6
9 5 1
4 3 8
Every row, every column, and each diagonal sums to . (Quick check: ; ; , etc.)
The magic sum equals for an square filled with to . So for : . For : .
Symmetries. A magic square can be reflected and rotated , giving up to "different-looking" arrangements of the same numbers. So in some sense there is only one essential magic square using –.
Hardest task. Filling a magic square from scratch. For , one trick: place in the middle (it must be, since it's the average), then balance pairs around it.
Magic squares have appeared in Indian, Chinese, Arabic and European traditions for over years , both as puzzles and as charms. Mathematicians study them because they connect arithmetic, algebra and combinatorics.
Worked examples
Example 1. Find the missing number in this partly-filled magic square (sum ):
4 9 ?
3 5 7
? 1 6
Row 1: . Row 3: . Check column 1: ✓.
Example 2. Why must the centre of a magic square (using –) be ?
Add all four lines through the centre: diagonals + middle row + middle column = . Each of these counts the centre times and every other cell exactly once (the centre is on all four lines; other cells are on exactly one). Total of all cells once: . So ? Let me re-do: (because each line contains the centre and two others, and the four lines cover the centre times and the other cells exactly... actually a clean version: middle row + middle column + diag1 + diag2 = , and this counts the centre times plus the other cells once = ? That's wrong because every non-centre cell is on exactly one of the four lines... Actually middle row has cells (centre and others), same for middle column, and each diagonal has cells too. Sum of cells in these lines (with multiplicities) is cells worth. The centre is in all lines (counted times); the corners each lie on lines (counted twice); the edge-midpoints each lie on line. So . With , eliminating gives , i.e., corner sum ... too messy. Simpler reasoning: middle column + middle row sum ; this counts centre twice and the other middle-cells once. So . By symmetry, the edge-mids sum to (because the four corners sum to too, and corners + edge-mids ). So . ✓
Example 3. What is the magic sum for a magic square using to ?
.
Example 4. Build a magic square using to (instead of to ).
Add to every cell of the standard square. Each row sum becomes . Confirmed: now magic sum is with entries –.
Try it yourself
- Fill the empty cells (magic sum ):
? ? 4 ? 5 ? 8 ? ? - What is the magic sum of a magic square using to ?
- Make a magic square using (the first even numbers). What is its magic sum?
- Verify that the standard magic square also has equal diagonal sums.
- Add to each cell of the standard magic square. Is the new square still magic?
- Multiply each cell of the standard magic square by . Magic sum?
- Find the centre of a magic square using to . Is it the average?
- Show that no magic square exists using .
Activity
Take a grid. Try to fill it from scratch using digits to so that every line sums to . Try multiple times to convince yourself the centre must be .
Find a magic square in a temple, building, or book. (The Khajuraho temple has a famous magic square.) Photograph and verify.