In a magic square of 9 consecutive numbers with centre m:
| m + 3 | m − 4 | m + 1 |
|---|---|---|
| m − 2 | m | m + 2 |
| m − 1 | m + 4 | m − 3 |
Every row, column and diagonal adds to 3m. With m = 25 the square is 28 21 26 / 23 25 27 / 24 29 22 (sum 75). For a magic sum of 60, take m = 20. A magic square with sum 0 uses m = 0: 3 −4 1 / −2 0 2 / −1 4 −3.
Non-consecutive numbers work too: multiply the 1–9 square by 3 to get 24 3 18 / 9 15 21 / 12 27 6 (sum 45).
The Chautīsā Yantra: the first recorded 4 × 4 magic square is in a 10th-century inscription at the Pārśhvanath Jain temple in Khajuraho:
| 7 | 12 | 1 | 14 |
|---|---|---|---|
| 2 | 13 | 8 | 11 |
| 16 | 3 | 10 | 5 |
| 9 | 6 | 15 | 4 |
Chautīs means 34, and every row, column and diagonal adds to 34.
In history: the Lo Shu square (2 7 6 / 9 5 1 / 4 3 8) is said to date back over 2000 years in China. A 3 × 3 magic square is carved on a temple pillar in Palani, Tamil Nadu (8th century CE), and Navagraha and Kubera Yantras with magic squares are found in many homes and shops.
Tap the diagram to enlarge it
- Each line = 3m
- Chautīsā Yantra: sum 34
- Lo Shu, Palani, Navagraha