Ambigram Magic Square
Sixteen numbers in clock-radio digits. Turn the square upside down or hold it to a mirror: the digits change, the numbers change, and every row, column and diagonal still adds up to 176.
Turn it, mirror it
| Numbers | Row sum | |||
|---|---|---|---|---|
| 11 | 22 | 58 | 85 | 176 |
| 55 | 88 | 12 | 21 | 176 |
| 82 | 51 | 25 | 18 | 176 |
| 28 | 15 | 81 | 52 | 176 |
| 176 | 176 | 176 | 176 | column sums |
Diagonals: 176 and 176
Every row, column and both diagonals add up to 176.
Turning the square 180° reverses every number and the order of the cells (12 becomes 21). A mirror also swaps the digits 2 and 5, which are mirror images of each other in seven segments (12 becomes 51). Turning and mirroring together is the same as flipping the square top to bottom.
Turn it upside down
Sixteen numbers made of 2, 5, 6 and 9. Upright every row, column and diagonal adds up to 242. Turned 180°, 6 and 9 trade places: the rows and columns still add up to 242, the diagonals give 176 and 296.
| Numbers | Row sum | |||
|---|---|---|---|---|
| 22 | 59 | 65 | 96 | 242 |
| 69 | 92 | 26 | 55 | 242 |
| 56 | 25 | 99 | 62 | 242 |
| 95 | 66 | 52 | 29 | 242 |
| 242 | 242 | 242 | 242 | column sums |
Diagonals: 242 and 242
Every row, column and both diagonals add up to 242.
Why no mirror here: in seven segments a mirrored 6 or 9 is not a digit at all, so the neon square can only be turned. Upright it is even pandiagonal: the broken diagonals and every 2×2 block also add up to 242.
How the digits change
Square I uses only 1, 2, 5 and 8: the seven-segment digits that are still digits after a half turn or a mirror. 1 and 8 survive everything, 2 and 5 trade places in a mirror. Square II adds 6 and 9, which trade places in a half turn but are no digits in a mirror.
| Digit | Upright | Turned 180° | Mirrored | Flipped |
|---|---|---|---|---|
| 1 | reads 1 | reads 1 | reads 1 | reads 1 |
| 2 | reads 2 | reads 2 | reads 5 | reads 5 |
| 5 | reads 5 | reads 5 | reads 2 | reads 2 |
| 8 | reads 8 | reads 8 | reads 8 | reads 8 |
| 6 | reads 6 | reads 9 | no digit | no digit |
| 9 | reads 9 | reads 6 | no digit | no digit |
Why 176 survives every turn (Square I)
The sixteen numbers are every two-digit combination of 1, 2, 5 and 8. The tens digits form a Latin square, and so do the units: every row and column holds 1, 2, 5 and 8 once in each place. So every line adds up to 10 × 16 + 16 = 176.
Both layers are diagonal too, so the main diagonals also hold all four digits. The layers are orthogonal, each pair of digits appears exactly once, which makes the square a Graeco-Latin square of the kind Euler studied.
Turning, mirroring, swapping 2 with 5 or writing every number backwards only moves the same four digits around inside each line. The constant is built into the construction, not luck: the average digit is 4, the average number 44, and 4 × 44 = 176.
More lines that add up to 176
- Corners11 + 85 + 28 + 52, and the corners of all four 3×3 sub-squares.
- Centre and quadrantsThe middle 2×2 (88 + 12 + 51 + 25) and all four corner 2×2 blocks.
- Edge middles22 + 58 + 15 + 81 and 55 + 82 + 21 + 18.
What it is not: not pandiagonal (the broken diagonals give 80, 272, 72 and 280, and no arrangement of these sixteen numbers can be), not associative (11 + 52 = 63 but 88 + 25 = 113) and not bimagic. The square started as the key matrix of Shapeshifter, a pen-and-paper cipher where the angle you hold the paper at changes the key.