Take any 3 by 3 magic square. For example, here’s the ancient Lo Shu square:

If you read the rows as numbers and sum their squares, you get the same thing whether you read left to right or right to left. In this case

492^{2} + 357^{2} + 816^{2} = 294^{2} + 753^{2} + 618^{2}.

Similarly, if you read the columns as numbers and sum their squares, you get the same thing whether you read top to bottom or bottom to top:

438^{2} + 951^{2} + 276^{2} = 834^{2} + 159^{2} + 672^{2}.

This doesn’t depend on base 10. It’s true of any base. And the entries of the magic square do not have to be single digits as long as you take the first to be the coefficient of *b*^{2}, the second the coefficient of *b*, and the last the coefficient of 1, where *b* is your base.

In addition to rows and columns, you can get analogous results for diagonals.

456^{2} + 978^{2} + 231^{2} = 654^{2} + 879^{2} + 132^{2}

456^{2} + 312^{2} + 897^{2} = 654^{2} + 213^{2} + 798^{2}

258^{2} + 936^{2} + 471^{2} = 852^{2} + 639^{2} + 174^{2}

258^{2} + 714^{2} + 693^{2} = 852^{2} + 417^{2} + 396^{2}

How would you prove this? Arthur Benjamin and Kan Yasuda give an elegant proof here using permutation matrices. Or you could use brute-force starting with Édouard Lucas’ theorem that every 3 by 3 magic square has the following form.

(For each *a*, *b*, and *c* there are eight variations on magic square given by Lucas, reflections and rotations of his square.)

Benjamin and Yasuda attribute this discovery to R. Holmes in 1970. “The magic magic square”, The Mathematical Gazette, 54(390):376.