MS Sparsha
Nearly six centuries before Western mathematicians corrected a celebrated miscalculation, an Indian scholar had already mastered the mathematics of perfect magic squares.
In the fascinating history of mathematics, some extraordinary achievements remain hidden in the shadows of time, waiting to be rediscovered. The story of Narayana Pandita, a 14th-century Indian mathematician, is one such remarkable chapter. Long before European mathematicians began systematically exploring the intricacies of magic squares, Narayana had not only understood their mathematical properties but had also developed a method to enumerate them with astonishing precision.
The magnitude of his achievement becomes apparent when viewed against a much later mathematical controversy. In 1933, American mathematician D. H. Lehmer surveyed 4×4 magic squares and concluded that only 48 perfect examples could exist. His calculation, however, was incorrect. The actual number was 384, a result established through the subsequent work of Rosser and Walker in 1938. Remarkably, Narayana Pandita had arrived at precisely this number almost 600 years earlier.
His monumental work, Ganitakaumudi, completed in 1356, stands as testimony to the sophistication of India’s mathematical tradition. Narayana even recorded the precise date of its completion in a concluding Sanskrit verse, using the traditional Indian system of expressing numbers through words and symbols rather than conventional numerals. The date corresponds to a Thursday, the second day of the dark fortnight of Kartika, in the Saka year 1278.
The final chapter of this remarkable mathematical treatise, comprising 77 verses, is devoted entirely to magic squares, which Narayana called Bhadraganita. He attributed the subject’s traditional origins to Lord Shiva, who, according to the text, imparted the mathematical knowledge to Manibhadra. Beyond its traditional framing, the chapter demonstrates an extraordinary command of numerical arrangements, patterns and mathematical relationships.
Narayana’s stated ambition was equally striking. He declared that his work would delight accomplished mathematicians, provide pleasure to instrument makers and, above all, humble the arrogance of mediocre mathematicians. It was an unusually confident declaration for a scholar whose contributions would take centuries to receive wider recognition.
Among his most fascinating constructions is a 4×4 magic square based on turagagati, or the movement of a horse on a chessboard. The arrangement follows the knight’s move, with every consecutive pair of numbers occupying positions separated by the characteristic L-shaped movement of a chess knight.
The mathematical elegance of the square goes well beyond the familiar requirement that every row, column and principal diagonal should produce the same sum of 34. Its broken diagonals, which continue from one edge to the opposite side, also yield 34. Every 2×2 block, including those wrapping around the square’s boundaries, produces the same total. Even the four corner numbers add up to 34, while numbers separated by two positions along a diagonal sum to 17.
These are not merely attractive numerical coincidences. They reveal a deeper understanding of mathematical symmetry, spatial relationships and systematic construction. More significantly, Narayana’s method was not restricted to producing a handful of interesting examples. He provided a systematic approach to generating such squares and established their total number as 384.
India’s engagement with magic squares, however, predates even Narayana. Around 550 CE, the celebrated astronomer and mathematician Varahamihira employed a related arrangement, known as Sarvatobhadra, as a numerical grid for preparing perfume combinations. This illustrates how mathematical ingenuity in ancient India frequently intersected with practical applications.
The legacy also survives in stone. An 11th-century magic square whose rows, columns and diagonals total 34 is carved on an entrance pillar of the Parshvanatha Temple at Khajuraho. Such examples demonstrate that these mathematical ideas were not confined to manuscripts but also found expression in India’s artistic and architectural heritage.
Europe’s celebrated engagement with magic squares came considerably later. Albrecht Dürer’s famous 4×4 square, incorporated into his 1514 engraving Melencolia I, is particularly well known for concealing the year of its creation in its bottom row. Yet Narayana’s Ganitakaumudi had appeared 158 years earlier.
Narayana Pandita deserves recognition not merely as a mathematician who anticipated a later Western discovery, but as an original thinker who combined theoretical depth with systematic mathematical reasoning. His work challenges the narrow perception that significant mathematical advances originated predominantly in Europe.
The numbers had been counted, the principles established and the mathematics mastered centuries before Lehmer’s calculation and its subsequent correction. Narayana’s achievement is a powerful reminder that India’s intellectual heritage contains pioneering contributions that deserve far greater attention.
Some mathematical truths do not change with time. Recognition, unfortunately, often does.
