PLAY · TEST · UNDERSTAND
4x4 Magic Square
A normal 4×4 magic square arranges the integers 1 through 16 in sixteen cells, using each number once. Every row, every column, and both main diagonals must total 34. Use this example alongside the Magic Square Archive board to understand the doubly-even construction and check the arithmetic rather than simply memorize a finished arrangement.
Magic square practice
Use each integer from 1 to 16 once. Every row, column and both diagonals must sum to 34.
Given clues are locked. Fill the empty cells, check your work, or reveal one hint.
- Magic constant
- 34
Why the magic sum is 34
The numbers 1 through 16 total 136. Since the four rows partition those numbers, equal row sums must be 136 ÷ 4 = 34. The normal-square formula gives the same result: M = n(n² + 1) ÷ 2, so M = 4 × 17 ÷ 2 = 34. Equal row sums alone do not establish a magic square: the four columns and two main diagonals must also pass the same test.
Build it with the doubly-even complement pattern
Four is divisible by four, making this a doubly-even order. Start by writing 1 through 16 across successive rows: 1, 2, 3, 4; then 5, 6, 7, 8; and so on. Mark the eight cells on the two main diagonals. In each marked cell, replace its value x with 17 − x; leave every other cell unchanged.
The resulting rows are 16, 2, 3, 13; 5, 11, 10, 8; 9, 7, 6, 12; and 4, 14, 15, 1. This is one valid normal square, not the only arrangement.
Why those replacements work
The starting row totals are 10, 26, 42, and 58. The marked replacements change them by +24, +8, −8, and −24 respectively, bringing each to 34. The column totals similarly change from 28, 32, 36, and 40 to 34. Both original main diagonals already total 34; replacing all four entries on either diagonal gives 4 × 17 − 34 = 34.
The marked values come in complementary pairs, so the operation preserves the complete set of numbers. Complementing arbitrary cells would not provide these guarantees.
Check a displayed square without guessing
Compare the board with the example one line at a time. First confirm that 1–16 each appear once, then check all ten required lines: four rows, four columns, and two main diagonals. For example, the first column is 16 + 5 + 9 + 4 = 34. Smaller blocks and broken diagonals are not required checks for an ordinary normal magic square.