Cite
MLA
“Magic squares: Khajuraho and Narayana Pandita.” Hindu History, 2026, https://www.hinduhistory.in/vijnana/narayana-pandita-magic-squares/. Accessed .
APA
Hindu History. (2026). Magic squares: Khajuraho and Narayana Pandita. Retrieved , from https://www.hinduhistory.in/vijnana/narayana-pandita-magic-squares/
01The square at the door
At the entrance of the Parshvanatha temple in the eastern group at Khajuraho, built under the Chandelas in the 10th century, a square of sixteen numbers is cut into the stone. It is pandiagonal: the rows, the columns, the two main diagonals and all the broken diagonals sum to 34. Squares of this kind were also drawn as yantras for worship and protection, and the Brihat Samhita of Varahamihira already uses a 4 × 4 arrangement for mixing perfumes.
02Ganita Kaumudi, 1356
Narayana Pandita finished the Ganita Kaumudi in 1356 CE. Its last chapter, bhadraganita, gives methods to build magic squares of any order, odd, doubly even and singly even, by combining two simpler squares, much like what Europe later called the method of orthogonal squares. The same book counts permutations, deals with combinations of divisors, and gives a rule for the series now called Narayana’s cows. It is one of the most original mathematical works of medieval Bharat.
03Shared, not first
Magic squares are not an Indian discovery alone. The 3 × 3 lo shu is old in China, and Arabic writers of the 10th and 11th centuries built larger squares. What the Khajuraho square shows is a pandiagonal 4 × 4 square in public stone by the 10th century, and what Narayana adds is a systematic theory. Whether Indian, Chinese and Arabic work on squares influenced each other is still studied, and no direct line has been proved.
In the texts
- Ganita Kaumudi of Narayana Pandita, ch. 14
- Brihat Samhita, Gandhayukti chapter


