Level 2 · Performance Magic
Instant Magic Squares
Someone calls out a number. You fill a 4×4 grid instantly. Every row, column, and diagonal sums to their number. It looks impossible — and it's completely mathematical.
What Is a Magic Square?
A magic square is a grid of distinct numbers where every row, every column, and both main diagonals all add up to the same value — called the magic sum. The smallest non-trivial magic square is 3×3 (with a fixed structure), but 4×4 magic squares allow a parametric family that can be constructed for any target sum.
How to Perform It
- Ask the audience for any number greater than 34.
- Draw a 4×4 grid on the board.
- Fill in the 16 cells using the algorithm — it takes about 20 seconds with practice.
- Invite volunteers to check any row, column, or diagonal.
The Algorithm (for target N)
- Start from the Frénicle base square (magic sum = 34).
- Compute d = N − 34. Set base = d ÷ 4 (round down), rem = d mod 4.
- Add base to every cell in the grid.
- Apply rem diagonal patches: each adds 1 to exactly one cell per row, column, and diagonal.
Why It Works
Adding a constant to every cell increases every line sum by exactly 4 times that constant (since each line has 4 cells). The "diagonal patches" are carefully chosen transversals: each contains exactly one cell per row, one per column, and one on each main diagonal, so applying a patch increases every line sum by exactly 1. By combining base shifts and patch applications, we can reach any target sum N ≥ 35.
💡 Performance Tip
With practice, you can fill the grid by computing each cell mentally using the formula. But even reading from the sandbox is impressive if you do it smoothly — the audience sees the result, not the method.