8 February 2026
Abū’l-Wafāʾ al-Būzjānī (940–77/8 CE) wrote one of the earliest extant treatises dedicated to magic squares, focused on constructions. He repeatedly referred to the aesthetic value of the methods of he described.1
For instance, he wrote about a method of constructing a magic square of order $4$:
‘It is possible to arrive at the magic arrangement in this square by means of methods without displacement showing regularity and elegance [niẓām wa-tartīb ḥasan نظام وترتيب حسن]’ (trans. Sesiano)2
Such a method with ‘regularity and elegance’ was: (1) place the number $1$ in a corner, $2$ and $3$ adjacent to the opposite corner, and $4$ diagonally adjacent to $1$; (2) place $5$ to $8$ in reverse order in positions horizontally symmetrically opposite to $1$ to $4$; (3) place $17 − n$ diagonally two places away from $n$ for $n = 1,\ldots,8$:
His method, which had ‘regularity and elegance’ was to be contrasted with ‘displacement’ (or rearrangement) methods. One such method was as follows: (1) start with a square filled naturally with the numbers $1$ to $16$; (2) swap the middle two entries between the outer rows and between the outer columns; (3) swap the middle two entries within each outer row and each outer column.
For Abū’l-Wafāʾ, absence of displacement was not a necessary condition for elegance, since he characterized a method for constructing a magic square of order $6$ involving displacement using exactly the same form of words: ‘showing regularity and elegance’.2
In mediaeval Arabic, the equal sum of each row, column, and diagonal was often simply called the ‘harmony’ [wafq لوفق] or ‘harmonious number’ [ʿadad al-wafq العدد الوفق]. The adjective ‘wafq’ has the sense of ‘harmonious’ or ‘fitting’, which hints at aesthetic appreciation.3
The term ‘magic square’, common in European languages (mágico, magique, magisches, magisk, magiczny, …), comes from their introduction to European thought via a treatise by Ibn al-Zarqālluh (al-Zarqālī/Azarquiel; d. 1100) on their use in talismanic magic.4
A. J. Cain. Form & Number: A History of Mathematical Beauty. Lisbon, 2024. pp. 179–80. ↩
Abū’l-Wafāʾ al-Būzjānī. ‘On Magic Arrangement in Squares’. In: J. Sesiano Magic Squares in the Tenth Century: Two Arabic Treatises by Anṭākī and Būzjānī. Sources and Studies in the History of Mathematics and Physical Sciences. Springer, 2017. ISBN: 978-3-319-52113-8. DOI: 10.1007/978-3-319-52114-5. pp. 217–19. ↩ ↩2
B. Hallum. New Light on Early Arabic Awfāq Literature. In: L. Saif, F. Leoni, M. Melvin-Koushki & F. Yahya, eds. ‘Islamicate Occult Sciences in Theory and Practice’. Handbook of Oriental Studies: Section One: The Near and Middle East, no.140. Leiden & Boston: Brill, 2020. ISBN: 978-90-04-42696-2. p. 88, n. 80. ↩
J. Samsó. ‘al-Zarḳālī, Abū Isḥāḳ Ibrāhīm’. In: Encyclopaedia of Islam, vol. XI. Ed. by P. J. Bearman, Th. Bianquis, C. E. Bosworth, E. van Donzel & W. P. Heinrichs. Leiden: Brill, 2002. ISBN: 978-90-04-12756-2. p. 462. ↩