About a year ago I wrote about Jupiter’s magic square. Then yesterday I was listening to the New Sounds podcast that mentioned a magic square associated with Mars. I hadn’t heard of this, so I looked into it and found there were magic squares associated with each of solar system bodies known to antiquity (i.e. Sun, Mercury, Venus, Moon, Mars, Jupiter, and Saturn).
Here is the magic square of Mars:
The podcast featured Secret Pulse by Zack Browning. From the liner notes:
Magic squares provide structure to the music. Structure provides direction to the composer. Direction provides restrictions for the focused inspiration and interpretation of musical materials. The effect of this process? Freedom to compose.
The compositions on this CD use the 5×5 Magic Square of Mars (Secret Pulse), the 9×9 Magic Square of the Moon (Moon Thrust), and the ancient Chinese 3×3 Lo Shu Square found in the Flying Star System of Feng Shui (Hakka Fusion, String Quartet, Flying Tones, and Moon Thrust) as compositional models. The musical structure created from these magic squares is dramatically articulated by the collision of different musical worlds …
I don’t know how the composer used these magic squares, but you can listen to the title track (Secret Pulse) on the podcast.
How many k × k magic squares are possible? If you start from a liberal definition of magic square, there’s an elegant result. For the purposes of this post, a magic square is a square arrangement of non-negative numbers such that the rows and columns all sum to the same non-negative number m called the magic constant. Note that this allows the possibility that numbers will be repeated, and this places no restriction on the diagonals.
With this admittedly non-standard definition, the number of k × k magic squares with magic constant m is always a polynomial in m of degree no more than (k – 1)2. For k = 3, the result is
(m + 1)(m + 2)(m2 + 3m + 4)/8
There is no general formula for all k, but there is an algorithm for finding a formula for each value of k.
Source: The Concrete Tetrahedron
Update: I had reported the polynomial degree as k + 1, but looking back at Concrete Tetrahedron, that book lists the order as (k + 1)2. However, the paper cited in the comments lists the exponent as (k – 1)2, which I believe is correct.
Albrecht Dürer’s engraving Melencolia I contains an interesting magic square toward the top right corner.
Here’s a close-up of the magic square:
The square has the following properties:
- Every row, column, and diagonal sums to 34.
- The four squares in the center sum to 34.
- The four squares in the corners sum to 34.
- Each quadrant sums to 34.
- The year the engraving was made, 1514, appears in the bottom row.
I’d seen all this years ago, but this week I learned something else about this square.
Magic squares of different sizes were traditionally associated with planets in the solar system. … the 4 × 4 square in Melancolia is Jupiter’s … One suggestion for Dürer’s use of the square is that it reflected the mystical belief that Jupiter’s joyfulness could counteract the sense of melancholy that pervades the engraving.
From The Number Mysteries.
Regarding “Jupiter’s joyfulness,” here’s the etymology of jovial from Online Etymology Dictionary.
1580s, from Fr., from It. joviale, lit. “pertaining to Jupiter,” from L. Jovialis “of Jupiter,” from Jovius (used as gen. of Juppiter) “Jupiter,” Roman god of the sky. The meaning “good-humored, merry,” is from astrological belief that those born under the sign of the planet Jupiter are of such dispositions. In classical L., the compound Juppiter replaced Old L. Jovis as the god’s name. Related: Jovially.
After posting about a magic square made from knight’s tour, I wondered whether there are magic squares made from a king’s tour. (A king can move one square in any direction. A tour is a sequence of moves that lands on each square of a chess board exactly once.) I found George Jelliss’ site via the comments to that post and found out that there are indeed magic king’s tours. Here’s one published in 1917.
Here’s the path a king would take in the square above:
The knight’s tour magic square had rows and columns that sum to 260, though the diagonals did not. In fact, someone has proved that a knight’s tour on an 8×8 board cannot be diagonally magic. (Thanks John V.)
In the king’s tour above, however, the rows, columns, and diagonals all sum to 260. George Jelliss has posted notes that classify all such magic squares that have biaxial symmetry. See his site for much more information.
This magic square was created by Leonhard Euler (1707-1783). Each row and each column sum to 260. Each half-row and half-column sum to 130. The square is also a knight’s tour: a knight could visit each square on a chessboard exactly once by following the numbers in sequence.
Here is Python code to verify that the square has the properties listed above.
Update: It seems the attribution to Euler is a persistent error. Euler did publish the first paper on knight’s tours, but the knight’s tour square above was published by William Beverley in 1848. Thanks to George Jelliss for the correction. See the comments below.
Update 2: Notes from George Jelliss on magic king and queen tours.
Update 3: This is technically a semi-magic square: the rows add up to the same magic constant, but the diagonals do not. See Magic square errata.