Magic square
A magic square is a square made up of rows of letters or numbers, specifically designed for purposes associated with ritual magic, which are used in making talismans and amulets.
Despite functioning primarily as a mathematical concept, at various times throughout history, magic squares have acquired occult or mythical significance, and have appeared as symbols in works of art.
Mathematics
In mathematics, especially historical and recreational mathematics, a square array of numbers, usually positive integers, is called a magic square if the sums of the numbers in each row, each column, and both main diagonals are the same. The mathematical study of a magic square typically deals with its construction, classification, and enumeration.
History
Magic squares have a long history, dating back to at least 190 BCE in China. While ancient references to the pattern of even and odd numbers in the 3×3 magic square appear in the I Ching, the first unequivocal instance of this magic square appears in the chapter called Mingtang' of a 1st-century book Da Dai Liji (Record of Rites by the Elder Dai), which describes ancient Chinese rites of the Zhou dynasty.
The 3×3 magic square was referred to as the "Nine Halls" by earlier Chinese mathematicians.
India
The oldest dateable fourth order magic square in the world is found in an encyclopaedic work written by Varahamihira around 587 CE called Brhat Samhita. In India, all the fourth-order pandiagonal magic squares were enumerated by Narayana in 1356.
Several Jain hymns teach how to make magic squares, although they are undateable.
Arabic
Although the early history of magic squares in Persia and Arabia is not known, it has been suggested that they were known in pre-Islamic times. It is clear, however, that the study of magic squares was common in medieval Islam, and it was thought to have begun after the introduction of chess into the region.
By the end of 12th century, the general methods for constructing magic squares were well established. Around this time, some of these squares were increasingly used in conjunction with magic letters, as in Shams Al-ma'arif, for occult purposes.
Europe
Magic squares first appeared in Europe in Kitāb tadbīrāt al-kawākib (Book on the Influences of the Planets) written by Ibn Zarkali of Toledo, Al-Andalus, as planetary squares by 11th century.
The magic square of three was discussed in numerological manner in early 12th century by Jewish scholar Abraham ibn Ezra of Toledo, which influenced later Kabbalists. Ibn Zarkali's work was translated as Libro de Astromagia in the 1280s. In the Alfonsine text, magic squares of different orders are assigned to the respective planets, as in the Islamic literature; unfortunately, of all the squares discussed, the Mars magic square of order five is the only square exhibited in the manuscript.
Renaissance Europe
Planetary squares had disseminated into northern Europe by the end of 15th century. For instance, the Cracow manuscript of Picatrix from Poland displays magic squares of orders 3 to 9. The same set of squares as in the Cracow manuscript later appears in the writings of Paracelsus in Archidoxa Magica (1567), although in highly garbled form.
In 1514 Albrecht Dürer immortalized a 4×4 square in his engraving Melencolia I. Paracelsus' contemporary Heinrich Cornelius Agrippa published his famous three volume book De occulta philosophia in 1531, where he devoted Chapter 22 of Book II to the planetary squares.
The Magical Calendar (1620) contains the magic squares for all seven planets as well as sigils to connect with their various spirits.
The tradition of planetary squares was continued into the 17th century by Athanasius Kircher in Oedipus Aegyptiacus (1653).
Modern era
By the late 1700s, the earlier astrological significance attached to magic squares had almost completely vanished, and the subject was primarily treated as a part of recreational mathematics. However, fraternal organizations such as the Rosicrucians and authors on occult subjects continued to reference earlier grimoires on the mystical properties of magic squares.
In modern times magic squares have been generalized a number of ways, including using extra or different constraints, multiplying instead of adding cells, using alternate shapes or more than two dimensions, and replacing numbers with shapes and addition with geometric operations.
Astrological squares
Magic squares of order 3 through 9, assigned to the seven planets, and described as means to attract the influence of planets and their angels or demons during magical practices, can be found in several manuscripts all around Europe starting at least since the 15th century. Among the best known, the Liber de Angelis, a grimoire written around 1440.
The magical operations involve engraving the appropriate square on a plate made with the metal assigned to the corresponding planet, as well as performing a variety of rituals. For instance, the 3×3 square, that belongs to Saturn, has to be inscribed on a lead plate. It will, in particular, help women during a difficult childbirth.
The most common use for astrological magic squares is to provide a pattern upon which to construct the sigils of spirits, angels or demons; the letters of the entity's name are converted into numbers, and lines are traced through the pattern that these successive numbers make on the square. In a magical context, the term magic square is also applied to a variety of word squares or number squares found in many grimoires, including some that do not follow any obvious pattern, and even those with differing numbers of rows and columns. They are generally intended for use as talismans.
In popular culture
Dürer's magic square and his Melencolia I both also played large roles in Dan Brown's 2009 novel, The Lost Symbol.
The metallic artifact at the center of The X-Files episode "Biogenesis" is alleged by Chuck Burks to be a magic square.
The first season Stargate Atlantis episode "Brotherhood" involves completing a magic square as part of a puzzle guarding a powerful ancient artifact.