Oddcast episode

Bink Hallum on ‘Magic Squares’

[Thanks to the Wellcome Trust for use of the image above. Be sure to check out the image-gallery below, as well!]

[Corrigenda: Dr Hallum states that Maslama al-Qurṭubī died in the first half of the 10th century. In fact he is thought to have died in AH 353/AD 964. Ibn al-ʿArīf is mistakenly called Ibn al-ʿĀrif.]

Have you ever wondered how those grids of numbers, the ‘esoteric sudoku’, came to be associated with the planets, and to be integrated within astral talismanry and symbolism? In this episode we look in a step-by-step way at the history of the magic square – mathematically, medically, arithmologically, astrally, and through the perspective of the Islamicate ‘science of the letters’ (ʿIlm al-Ḥurūf) – with a view to building the best lineage possible for these curious diagrams. It’s a fascinating story, told with aplomb by manuscript-researcher Bink Hallum, whose work brings to the table a swathe of mostly-unpublished sources. You heard it here first!

Among specific topics discussed:

  • The basic definition of a ‘magic square’ as a mathematical entity,
  • The 3X3 square – the earliest example of which appears in a Chinese divinatory context – and its earliest-known appearance in the Islamicate tradition (in al-Ṭabarī, an early ‘Abbasid Christian medical writer),
  • The long history of the 3X3 square as a sovereign aid in assisting childbirth, a story which comes to involve the unlikely name of al-Ghazzali and a host of others,
  • The commentary on Nicomachus of Gerasa’s Arithmetical Introduction (see Episode 87) by al-Anṭākī, in which the ancient Greek authority acquires a section on magic squares which he never wrote,
  • The treatment of the squares in the encyclopædic Rasā’il Ikhwān Al-Ṣafā, ‘Epistles of the Brethren of Purity’, where we find the 3X3 square associated with the moon and various other astral phenomena, marking our earliest-known astralisation of the magic square,
  • The 3X3 square as discussed in the Ghāyat al-Ḥakīm, the earliest-known reference to the squares as wafq (pl. awfāq), a term which later becomes something of a standard term for ‘magic square’ in Arabic (although often referring to the magical constant of the square – the number the rows add up to – rather than the square itself),
  • The 11th-century Andalusian mathematician and instrument-maker Ibn al-Zarqālluh’s treatise on astral talisman-making, which draws on the Ghāyat al-Ḥakīm, but brings in a new idea, that of using the first seven magic squares (3X3 to 9X9) as talismans dedicated to the seven planets,
  • The fate of this seminal text in translation in western Europe, first probably into Old Castillian, then into Latin,
  • The final major addition to the magic square tradition, made by the addition of letters to the mix, opening vast horizons of esoteric alphanumeric speculations and ‘practical lettrism’ in the talismanic tradition,
  • The 11th-12th-century alphanumeric speculations found in Ibn Masara and the Muʿtabirūn, leading up to the full-blown ‘lettrism’ (ʿIlm al-Ḥurūf) found in the works of al-Būnī and Ibn Ibn al-ʿArabī, whereby the whole tradition of astral talismanic science, combined with the magic squares, receives a further layer of complexity, the squares coming to contain names of God and other powerful words which of course do not compromise the mathematical integrity of the square, but are integrated with it,
  • Lettrism in full flower, and the importance of understanding the alphanumeric ways of thinking that came naturally to peoples who regularly used their letters as numerals, and
  • Some discussion of two main centres of work on the magic squares, Buyid Baghdad and Marw in Khorasan (modern-day Turkmenistan).


The Luoshu (Luo River Chart) schematic 3×3 magic square seen in the nine sections of a turtle’s shell as depicted (without the turtle) in Cai Yuanding’s (d. 1198) Discourse on the Exposed and the Abstruse (Fawei Lun). (Reproduced from W.S. Andrews, Magic Squares and Cubes, 2nd ed., 1917, p. 122. Wikimedia Commons).


Your basic 3X3 square, this example from Girolamo Cardano. Practica arithmetice, & mensurandi singularis. Io. Antonius Castellioneus, Milan, 1539.


28×28 wafq from the Collection of Harmonious Number (Dīwān al-ʿadad al-wafq, composed AH 517/AD 1123–4). British Library, Delhi Arabic 110, fols 108v–109r (Qatar Digital Library).


Some exotic magic, um, shapes. Ṣūfī Kamāl al-Tustarī, The Utmost Desire Concerning the Harmony of Numbers (Ghāyat al-murād fī wafq al-aʿdād, composed AH 855/AD 1451–2). Columbia University Library, MS Or 65, fol. 107v (OPenn).


Wafq containing three of the ‘most beautiful names of God’: The Living (Ḥayy), The Eternal (Qayyūm), The One (Wāḥid). ʿAbd al-Raḥmān al-Bisṭāmī (d. 858/1454), Sun of the Horizons Concerning the Science of Letters and Awfāq (Shams al-āfāq fī ʿilm al-ḥurūf wa-l-awfāq). BnF, MS Arabe 2689, fol. 158v (Gallica).

Interview Bio:

Dr Bink Hallum is Arabic Scientific Manuscripts Curator at the British Library, and is currently doing Wellcome-Trust-funded postdoctoral research at the University of Warwick on the alchemical Twelve Books of Abū Bakr al-Rāzī. His research centres on Islamicate codicology, Græco-Arabic studies, the history of the sciences, and loads of other interesting stuff.

Works Cited in this Episode:


  • The physician Ibn Rabban al-Ṭabarī (fl. ca AH 235/AD 850) discusses the 3×3 wafq in his Paradise of Wisdom (Firdaws al-ḥikma), the earliest surviving reference to a wafq in Islamicate literature: text, translation and references in Hallum 2021, pp. 71–76 (see recommended reading below).
  • About half a century after al-Ṭabarī, the physician Vṛnda (fl. ca 900) writes a Sanskrit medical work containing a very similar application of the 3×3 wafq: Vṛnda. The First Treatise of Āyurveda on Treatment. Vṛndamādhava or Siddha Yoga, edited and translated by Premvati Tewari and Asha Kumari, 2 vols. Varanasi: Chaukhambha Visvabharati, 2006. Vol. 2, pp. 837–38.
  • The Brethren of Purity (AH mid-4th/AD mid-10th century) discuss awfāq in their Epistle on Geometry 2.26 (Epistles of the Brethren of Purity: On Arithmetic and Geometry. An Arabic Critical Edition and English Translation of Epistles 1 & 2, ed. and trans. Nader El-Bizri. Oxford University Press in association with The Institute of Ismaili Studies, Oxford, 2012. Pp. 138–44 [text] and 154–59 [translation]) and again in their Epistle on Music 5.14 (Epistles of the Brethren of Purity: On Music. An Arabic Critical Edition and English Translation of Epistle 5, ed. and trans. Owen Wright. Oxford University Press in association with The Institute of Ismaili Studies, Oxford, 2010. Pp. 161–2 (text) and 159 (translation); annotated French translation in Amnon Shiloah. l’Épître sur la musique des Ikhwān al-Ṣafa. Revue d’études islamiques, 34: 182–83, 1967).
  • Nicomachus of Gerasa’s (d. ca 120) Arithmetical Introduction can be found at Nicomachi Geraseni Pythagorei Introductionis arithmeticae libri II, edited by Richard Gottfried Hoche. Leipzig: Teubner, 1866 (or Nicomachus of Gerasa. Introduction to Arithmetic. Translated by Martin Luther D’Ooge. New York, NY: Macmillan Co., 1926).
  • Ṯābit B. Qurra’s arabische Übersetzung der ‘Arithmētikē eisagōgē’ des Nikomachos von Gerasa, edited by Wilhelm Kutsch. Beirut: Imprimerie Catholique, 1959.
  • Abū al-Qāsim al-Anṭākī’s (d. AH 376/AD 987) commentary on Nicomachus’ Introduction has a whole chapter on awfāq, which makes it the earliest preserved Islamicate mathematical treatise on magic squares: see Sesiano 2017 below,  pp. 120–205 (translation) and 260–334 (text).
  • Ibn al-Zarqālluh’s treatise on planetary awfāq talismans has not been edited or translated – although Bink is working to correct that! – but a facsimile of the Arabic text in a mid-tenth/sixteenth-century manuscript from Ottoman Bosnia can be seen in Heinrich Cornelius Agrippa von Nettesheim, De occulta philosophia, ed. by Karl A. Nowotny. Appendix 8. Akademische Druck-u. Verlagsanstalt: Graz, 1967.


  • Noah D. Gardiner. Esotericist Reading Communities and the Early Circulation of Aḥmad al-Būnī’s Works. Arabica, 64(3-4):405–41, 2017.
  • Bink Hallum 2021: see below.
  • Liana Saif, Francesca Leoni, Matthew Melvin-Koushki, and Farouk Yahya, editors. Islamicate Occult Sciences in Theory and Practice. Number 140 in Handbuch der Orientalistik. Brill, Leiden/Boston, MA, 2021.

Recommended Reading:

  • Acevedo, Juan. Alphanumeric Cosmology from Greek into Arabic: The Idea of Stoicheia Through the Medieval Mediterranean. Tübingen: Mohr Siebeck, 2020.
  • Casewit, Yousef, The Mystics of al-Andalus. Ibn Barrajān and Islamic Thought in the Twelfth Century (Cambridge/New York, NY: Cambridge University Press, 2017).
  • Comes, Mercè and Comes, Rosa . “Los cuadrados mágicos matemáticos en al-Andalus. El tratado de Azarquiel.” Al-Qanṭara 30, no. 1 (2009): 137–69.
  • Comes, Rosa. “The Transmission of Azarquiel’s Magic Squares in Latin Europe.” In Medieval Textual Cultures. Agents of Transmission, Translation and Transformation, edited by Faith Wallis and Robert Wisnovsky, 159–98. Berlin/New York, NY: De Gruyter, 2016.
  • Ebstein, Michael, Mysticism and Philosophy in al-Andalus. Ibn Masarra, Ibn al-ʿArabī and the Ismāʿīlī Tradition, Islamic History and Civilisation Studies and Texts vol. 103 (Leiden – Boston: Brill, 2014).
  • El-Bizri, Nader, ‘The Occult in Numbers: The Arithmology and Arithmetic of the Ikhwān al-Ṣafāʾ’, in The Occult Sciences in Pre-modern Islamic Cultures, ed. by Nader El-Bizri and Eva Orthmann (Beirut: Ergon Verlag Würzburg, 2017), pp. 17–39.
  • Folkerts, Menso, ‘Zur Frügeschichte der magischen Quadrate in Westeuropa’, Sudhoffs Archiv, 65.4 (1981), 313–38.
  • Gardiner, Noah. “Forbidden Knowledge? Notes on the Production, Transmission, and Reception of the Major Works of Aḥmad al-Būnī.” Journal of Arabic and Islamic Studies 12 (2012): 81–143.
  • Hallum, Bink. “New Light on Early Arabic Awfāq Literature”. In Liana Saif, Francesca Leoni, Matthew Melvin-Koushki, and Farouk Yahya, editors, Islamicate Occult Sciences in Theory and Practice, number 140 in Handbuch der Orientalistik, pages 57–161. Brill, Leiden/Boston, MA, 2020.
  • Hayashi, Takao. “Magic Squares in Indian Mathematics.” In Encyclopaedia of the History of Science, Technology, and Medicine in Non-Western Cultures, vol. 4, 3rd ed., edited by Helaine Selin, 2600–07. Dordrecht: Springer, 2016.
  • Kraus, Paul. Jâbir Ibn Ḥayyân: contribution à l’histoire des idées scientifiques dans l’Islam, 2 vols. (vol. 1, Le corpus des écrits Jâbiriens; vol. 2, Jâbir et la science grecque). Cairo, Imprimerie de l’Institut Français d’Archéologie Orientale, 1942–43.
  • Melvin-Koushki, Matthew. “Powers of One: The Mathematicalization of the Occult Sciences in the High Persianate Tradition.” Intellectual History of the Islamicate World 5, no. 1 (2017): 127–99.
  • Peng-Yoke, Ho. “Chinese Number Mysticism.” In Mathematics and the Divine: A Historical Study, edited by Teun Koetsier and Luc Bergmans, 45–60. London: Elsevier, 2005.
  • Idem. “Magic Squares in China.” In Encyclopaedia of the History of Science, Technology, and Medicine in Non-Western Cultures, 3rd ed., edited by Helaine Selin, vol. 4, 2598–600. Dordrecht: Springer, 2016.
  • Roşu, Arion. “Les carrés magiques indiens et l’histoire des idées en Asie.” Zeitschrift der Deutschen Morgenländischen Gesellschaft 139, no. 1 (1989): 120–58.
  • Saif, Liana. “From Ġāyat al-ḥakīm to Šams al-maʿārif: Ways of Knowing and Paths of Power in Medieval Islam.” In Islamicate Occultism: New Perspectives, edited by Matthew Melvin-Koushki and Noah Gardiner. Special double issue of Arabica 64, nos. 3–4 (2017): 297–345.
  • Samsó, Julio, ‘Ibn al-Zarqālluh’, in Encyclopaedia of Islam, 3rd edn, Leiden: Brill, 2008.
  • Savage-Smith, Emilie. “Magic and Islam.” In Francis Romeril Maddison and Emilie Savage-Smith. Science, Tools & Magic, part 1, The Nasser D. Khalili Collection of Islamic Art, vol. 12, edited by Julian Raby, 59–147. London: The Nour Foundation, 1997.
  • Sesiano, Jacques. Les Carrés magiques dans les pays islamiques. Lausanne: Presses Polytechniques et Unversitaires Romandes, 2004.
  • Idem. “Magic Squares in Islamic Mathematics.” In Encyclopaedia of the History of Science, Technology and Medicine in Non-Western Cultures, edited by Helaine Selin, 3rd ed., vol. 4, 2607–10. Dordrecht: Springer, 2016.
  • Idem. “Wafḳ.” in Encyclopaedia of Islam, new ed., 12 vols. Brill: Leiden, 1960–2004.
  • Hummel, Siegbert. “The sMe-ba-dgu, the Magic Square of the Tibetans.” East and West 19, no. 1/2 (1969): 139–46.



, , , , , , , , , , , , , , ,