Skip to content

Magic Squares in Islamic Tradition: The Legacy of Al-Buni

Magic squares, known as awfaq in Arabic, are numerical grids where the sums of numbers in each row, column, and diagonal are equal. Their use in the Islamic world dates back to early medieval times, with mentions in both mathematical and esoteric texts. While magic squares were initially studied by mathematicians such as Abu al-Wafa al-Buzjani (d. 997–998) and Abu Ali al-Ḥasan b. al-Haytham (d. 1041), they later became associated with occult sciences and talismanic practices.

One of the most influential figures linked to magic squares in Islamic esotericism is Ahmad al-Buni (d. 1225 or 1232). Although his works primarily focused on Sufi cosmology, later commentaries expanded upon his teachings, incorporating magic squares into his attributed corpus.

Al-Buni’s Laṭaiif al-isharat describes the esoteric properties of Arabic letters and numbers, including instructions for constructing various magic squares. This work influenced later compilations, such as Shams al-Maarif, which falsely attributed additional talismanic content to Al-Buni.

Early Mentions of Magic Squares in Islamic Tradition

The earliest references to magic squares in the Islamic world appear in scientific and esoteric texts from the 9th and 10th centuries. One of the first recorded mentions is found in Firdaws al-Hikma by Ali al-Tabari (fl. 9th century), where a 3×3 magic square is described as a tool to aid women in labor. This practical application of numerical grids continued in later Arabic treatises.

The Rasail Ikhwan al-Safa (compiled in the 10th century) also mention magic squares, indicating their significance in philosophical and mystical traditions. Another key text from this period, Ghayat al-Hakim by Maslama al-Qurtubi (d. 964), contains extensive instructions for creating talismans – taweez and magical objects, though it does not focus primarily on magic squares.

In the field of mathematics, several scholars analyzed the structure and properties of magic squares. Abu al-Wafa al-Buzjani (d. 998), Ali bin Ahmad al-Antaki (d. 987), and Abu Ali al-Hasan bin al-Haytham (d. 1041) all contributed to the study of numerical arrangements, though their works were primarily mathematical rather than esoteric.

A major development in the association of magic squares with occult sciences came from Abu Ishaq al-Zarqali (d. 1100), who linked specific squares to planetary influences. This connection between numbers and celestial forces later influenced esoteric writings, including those attributed to Al-Buni.

By the time of Al-Buni’s works in the 13th century, magic squares had gained recognition not only as mathematical curiosities but also as powerful tools in talismanic traditions. His Lataif al-Isharat included multiple magic squares of different sizes (from 3×3 to 11×11), presenting them as seals that encoded esoteric properties of Arabic letters and divine names. This paved the way for later works, such as the Shams al-Maarif al-Kubra, which further integrated magic squares into Islamic occult sciences.

Magic Squares in the Works of Al-Buni

Al-Buni is often associated with magic squares due to his work Lata’if al-Isharat in which he describes multiple magic squares, ranging from 3×3 to 11×11, and explains their spiritual significance. His focus is on the hidden properties (khawas) of letters and numbers, which he believed could be harnessed for specific effects when written in a structured manner.

One of the most notable examples in Lataif al-Isharat is the 4×4 magic square. Al-Buni provides instructions for constructing it and details its benefits. He states that writing the square on a blank parchment during a Monday when the Moon is in an exalted position, while reciting Quranic verses such as Ayat al-Kursi (Quran 2:255) and Surat al-Ikhlas (Quran 112:1), will enhance memory, understanding, and wisdom. He also claims that wearing the written square as a protective object can provide power over earthly matters, ensure victory in debates, and offer protection against thieves and misfortune.

His method of constructing magic squares was later extracted and compiled into a separate text, Sharh al-Ism al-Azam, which was analyzed by later scholars such as Bernard Carra de Vaux. The construction process described by Al-Buni involves aligning numbers based on astrological conditions, such as the position of the Moon, Jupiter, and specific constellations, to maximize the square’s spiritual effects.

Although Lata’if al-Isharat is primarily a Sufi cosmological work, its sections on magic squares influenced later esoteric traditions. Many of its concepts were incorporated into Shams al-Maarif al-Kubra.

4. Later Developments and the Shams al-Ma’arif

Al-Buni’s original works, focused on the esoteric properties of Arabic letters and divine names but did not extensively discuss magic squares as talismanic objects. However, later commentators expanded on his teachings, integrating astrology, planetary influences, and detailed instructions for making protective taweez. These additions contributed to the formation of the corpus bunianum, a collection of texts attributed to Al-Buni, many of which were written long after his death.

A key figure in this process was Abd al-Rahman al-Bistami (d. 1454) who wrote extensive commentaries on Al-Buni’s works, adding talismanic applications and specific methods for using magic squares in protection and spiritual enhancement. His commentary Rashh Adhwaq al-Hikma al-Rabbaniyya(written in 1413) expanded on al-Luma al-Nuraniyya by introducing instructions for creating amulets based on magic squares.

The culmination of these developments came in the 16th century with the compilation of Shams al-Maarif al-Kubra. This work combined elements from Al-Buni’s original writings, later apocryphal texts, and contributions from Al-Bistami and other esotericists.

5. Conclusion

While Al-Buni’s authentic works remain important for the study of Sufi cosmology, his name has been deeply embedded in the tradition of Islamic occult sciences due to the influence of later scholars and compilers. The evolution of his legacy demonstrates how medieval Sufi teachings were reinterpreted and expanded over time, shaping the understanding of magic squares and talismanic practices in the Islamicate world.