Skip to content
Abhinav Pandey

Follow along

Takes land on your phone. No spam, ever.

Staying on the web? Add this site to your home screen from your browser's menu.

Chapter 79 · Free to read · 20 min

Mahāvīrācārya

fl. c. 850 CE · #Mahaviracarya

Come and sit at the edge of a lesson, somewhere in the Deccan, around the year 850 — the long, prosperous peace of Amoghavarsha, the emperor Arab merchants rank among the four great kings of the world. Under a tree, or in the cool verandah of a Jain monastery, a teacher is chanting a verse to his students, and the verse is about elephants:

One-third of a herd of elephants, and three times the square root of the remaining part of the herd, were seen on a mountain slope; and in a lake was seen a male elephant along with three female elephants. How many were the elephants there?

Watch the students work. One-third of the herd went up the slope. Of what remains, take the square root, triple it, send that up too. Four elephants — one bull, three cows — are bathing. Everything must add back to the herd. Somebody's stylus scratches; somebody whispers; and the answer surfaces like the bull from the lake: twenty-four. Eight on the slope, plus three times the square root of sixteen — twelve — plus the four bathers. It checks. You can almost hear the exhale.

You have sat in this classroom. Every "a train leaves station A" problem you ever groaned at is this lesson's descendant. But notice what is missing from the book the teacher holds, because the absence is the revolution. There are no planets in it. No eclipses, no horoscopes, no auspicious hours — none of the astronomy that every great Indian mathematician before him had bundled his mathematics inside, the way a toy comes bundled with a cereal. This book has nine chapters, more than 1,130 verses, and one subject: calculation, for its own sake and for every trade that needs it. So far as anything survives, no Indian had written such a book before: a mathematics book, complete, self-standing, from terminology to shadow-reckoning.

Its author begins by saluting Mahāvīra, the Jina — the "conqueror" whom Jains revere — fitting, because the author's own name is also Mahāvīra: tradition respectfully calls him Mahāvīrācārya, "Mahāvīra the teacher," and he must not be confused with his namesake, the great tīrthaṅkara (supreme Jain teacher) of chapter 21, who lived some fourteen centuries earlier and whose name the mathematician bore the way a European might be called Christian. About the man we know almost nothing. About his book we know almost everything — and the book is one of the great teachers in this volume.

The Life

Honesty first, and it is quickly done — this book has now had some practice with makers known only by their work, and Mahāvīrācārya is the purest case yet. No inscription names him. No legend embroiders him. No birthplace, parents, teachers, pupils, or death is recorded anywhere. Everything we know comes from the front matter of his own book, and it tells us three things: that he was a devout Jain; that he wrote under, and almost certainly at or near, the court of the Rashtrakuta emperor Amoghavarsha, whose reign his preface praises; and that he saw himself not as a discoverer but as a compiler and refiner, heir to a long line of teachers. Since Amoghavarsha ruled from 814 to 878, the Gaṇitasārasaṅgraha is dated to about 850 — one of the firmest dates in early Indian mathematics attached to one of its least-known authors. Modern writers who give him a birth year (c. 800) or a home (often Mysore, in Karnataka) are inferring: the date from the reign, the region from where his manuscripts, commentaries and translations cluster, and from his patron's capital at Mānyakheṭa (Malkhed, in northern Karnataka). Plausible, unproven. That is the whole biography, and we will not pad it.

What we can reconstruct, richly, is the world that made such a man possible, because Jainism is the most mathematical of India's religions. Jain doctrine holds that souls accumulate and shed karma — moral cargo, conceived almost as a measurable substance — through beginningless time, across a cosmos of stupendous, specified dimensions. A tradition that believes the universe can be counted will try to count it: from the last centuries BCE, Jain canonical texts classified numbers into the numerable, the innumerable and the infinite, and — centuries before Europe dreamed such a thought thinkable — distinguished kinds of infinity: infinite in one direction, in two directions, in area, everywhere, and perpetually. The reader met this number-drunk cosmology with Umāsvāti (chapter 51). Jain monks counted permutations of standpoints and combinations of karmic states as devotion — to enumerate creation was to honour its intelligibility. Mahāvīrācārya's book works comfortably with twenty-four named decimal places, ending at mahākṣobha — ten to the twenty-third — where most contemporaries stopped at eighteen. When your cosmology runs on numbers that large, arithmetic is not a clerk's chore. It is theology's toolkit.

And his emperor was the right emperor. Chapter 78 showed Amoghavarsha's court at Mānyakheṭa operating as a publishing house — the Kavirājamārga chartering Kannada poetry, Jinasena composing the great Jain epic, the emperor himself a Jain lay devotee. Into that orbit fits the mathematician, whose preface repays the patronage with the most philosophically precise compliment a Jain could give. After saluting the Jina, he turns to the king: "that blessed Amoghavarṣa" — the name means "he whose rain never fails," and Mahāvīrācārya puns on it, one "who showers down truly useful rain" — a ruler who has "destroyed in philosophical controversy the position of single conclusions" and upholds the syādvāda, the Jain logic of many-sided truth; then the blessing: "May the rule of that Nṛpatuṅga prosper!" It is our only glimpse of the man in society: a scholar praising his king not for conquests but for his logic. Whether he held a court post or taught in a court-endowed monastery, the sources do not say. Then he states his method, in an image worth keeping: with the help of the "accomplished holy sages" and the "well-known jointed series of preceptors" — the chain of teachers before him — he has gleaned "from the great ocean of the knowledge of numbers a little of its essence, in the manner in which gems are picked up from the sea, gold is from the stony rock and the pearl from the oyster shell." And so he offers the Sārasaṅgraha, "a small work on arithmetic, which is however not small in value." A man who tells you nothing about himself and everything about his debts: the teacher's temperament, exactly.

The Great Work

A book of mathematics and nothing else. To feel the originality of the Gaṇitasārasaṅgraha, recall what mathematics books had looked like. Āryabhaṭa (chapter 65) gave his mathematics one chapter inside a treatise on astronomy; Brahmagupta (chapter 74) gave it two, inside a bigger one. The mathematics was magnificent, but it travelled as a passenger. Mahāvīrācārya threw the astronomy off the cart. His nine chapters — terminology; arithmetical operations; fractions; miscellaneous problems; the rule of three; mixed problems; areas; excavations; shadows — are each a vyavahāra, a "procedure," a department of practice, and the sequence is a course: definitions and units, then technique, then applications, from the merchant's proportions to the surveyor's fields to the engineer's tanks, ending with the one sliver of sky he kept, the sundial mathematics of shadows, treated as geometry, not omens. He begins, as a good teacher must, by telling students why the subject deserves their life. The passage is the finest advertisement mathematics has ever received, and this chapter's banner: in all transactions worldly, Vedic or religious, he says, calculation is of use; in love and wealth, music and drama, cooking, medicine and architecture, prosody, poetics, logic and grammar; in the motions of the sun and the reckoning of eclipses; in the measure of islands, oceans and mountains. Then he stops himself: "What is the good of saying much in vain? Whatever there is in all the three worlds, which are possessed of moving and non-moving beings — all that indeed cannot exist as apart from measurement." Twelve centuries on, with the whole world run by computation, the verse reads less like a boast than a forecast.

Problems set as poems. What the Gaṇitasārasaṅgraha is loved for — what carried it through a millennium of classrooms — is the way it teaches. The rules are terse; the examples are little poems, staged in a sensuous India of gardens, temples and bazaars. The elephants of our opening scene are his (chapter IV). Nearby, a garden: "In a garden beautified by groves of various kinds of trees… many ascetics were seated. Of them, the number equivalent to the square root of the whole collection were practising yoga at the foot of the trees… and at last 12 ascetics were seen to remain" — find the ascetics. Bees leave a swarm by fractions for pātalī blossoms and full-blown lotuses until one drunk straggler is left "circling in the sky"; peacocks dance to the thunder-drum of the monsoon clouds. And in the market chapter: "The mixed price of 9 citrons and 7 fragrant wood-apples is 107; again, the mixed price of 7 citrons and 9 fragrant wood-apples is 101" — what does each fruit cost? This book's rule: the reader leaves able to do the thing. So do this one with him. Buy both baskets at once: 16 citrons and 16 wood-apples together cost 107 + 101 = 208, so one citron plus one wood-apple costs 13. Now compare the baskets: swapping two wood-apples for two citrons raised the bill from 101 to 107, so a citron beats a wood-apple by 3. Two numbers summing to 13 and differing by 3: the citron costs 8, the wood-apple 5. Check it — nine eights and seven fives make 107 — and notice what you just did: solved two simultaneous equations, the workhorse of every consulting model, dressed by Mahāvīrācārya as fruit. Even his drill exercises smile: multiplications are engineered so the answers come out as palindromes — 12,345,679 × 9 = 111,111,111 — numbers his problems liken to necklaces, jewellery made of digits. David Eugene Smith, introducing the 1912 edition, named the tradition truly: imagination and rigour not as enemies but as problem-setting raised to an art, against the cold logic of the Greek geometers.

The empire of fractions. Strip away the bees and the book's proudest technical muscle is fraction-work — kalāsavarṇa, "making the parts uniform," his tradition's name for bringing fractions to a common denominator. Chapter III is the fullest treatment of fractions surviving from the ancient world: all the operations on fractional quantities, their squares and roots, and dizzying nested forms — fractions of fractions of fractions, vine-like chains the student learns to prune from the tip. To find common denominators efficiently he teaches what is, in substance, the lowest common multiple — a tool European arithmetic settled into only centuries later. His showpiece is the unit fraction: rules for splitting any fraction into a sum of fractions with 1 on top, the form Egyptian scribes once worshipped — his methods turn 2/17 into 1/12 + 1/51 + 1/68, and can carve 1 itself into as many unit shards as you please. Then chapter V hands the machinery to commerce: trairāśika, the "rule of three" — if this much yields that much, what does so much yield? — the proportion that priced every bale on the caravan roads, with interest, partnership and barter waiting in chapter VI. This is why the book lived so long: it is a treatise and a shop manual at once. A boy who mastered it could keep a kingdom's accounts; a subtle mind stood at the doorway of algebra.

The inheritance, audited. Mahāvīrācārya is the great consolidator of Indian arithmetic — he inherits Brahmagupta's revolution (chapter 74) and restates it for students, and where he edits the master, the edits are the most instructive pages in the book. Zero, first. Brahmagupta had made nothing into a number with laws; Mahāvīrācārya teaches them cleanly — "a number multiplied by zero is zero, and that number remains unchanged when it is divided by, combined with, or diminished by zero." Read it twice: adding, subtracting, multiplying by zero — correct, crisp, modern. But divided by zero, he says, a number remains unchanged — a ÷ 0 = a, as if dividing by nothing were doing nothing. Wrong, and interestingly wrong: division must undo multiplication, and if 8 ÷ 0 were really 8, then 8 × 0 would have to give back 8 — his own previous clause says it gives 0. Brahmagupta had at least left a ÷ 0 as a sealed box — "that with zero for denominator" — while wrongly ruling 0 ÷ 0 = 0. Mahāvīrācārya opened the box and put the wrong thing in it; three centuries later Bhāskara II (chapter 98) would open it again and find the right thing — khahara, the boundless quantity, infinity — and the relay of honest errors running since chapter 74 pays off there. Now the other side of the audit, because the same man, at the very next cliff, saw what nobody had seen. Negative numbers, Brahmagupta's "debts," obey the sign rules: a negative times a negative is positive. Mahāvīrācārya follows the logic one fearless step: since any number squared comes out positive, no negative can be a square. In Raṅgācārya's translation: "As in the nature of things a negative quantity is not a square quantity, it has therefore no square root." That plain sentence, from about 850 CE, is the earliest clear statement on record, anywhere, that negative numbers have no square roots — the precise fence at which, seven centuries later, European algebraists would have to invent imaginary numbers to climb over. He did not climb it; no one would for ages. But he walked up to it first, described it exactly, and declined to pretend it wasn't there. One chapter, then: a wrong rule that teaches how hard zero is, and a right refusal that marks the boundary of the real numbers. Textbook errors and textbook honesty, from the writer of textbooks.

Counting the ways. The book's most far-reaching gem comes straight from the Jain love of enumeration. Piṅgala (chapter 37) had counted the possible metres of poetry a thousand years before; the Jain canon had worked combinations of tastes and philosophical standpoints for centuries. Mahāvīrācārya gathers it all into one general rule (chapter VI, stanza 218): write the numbers 1 up to n in a row, and the same numbers reversed beneath; then the product of the top row's first r numbers, divided by the product of the bottom row's first r, counts the ways of choosing r things from n. That is exactly the formula every student now learns as "n choose r" — n(n−1)(n−2)…(n−r+1) over 1×2×3…×r — stated in full generality, as an explicit recipe, for the first time in surviving mathematical literature; Europe would not print its equivalent until the seventeenth century. The exercises, naturally, are jewellery: "O friend, tell me quickly how many varieties there may be, owing to variation in combination, of a single-string necklace made up of diamonds, sapphires, emeralds, corals, and pearls" — count with him: five ways to choose one gem, ten to choose two, ten to choose three, five to choose four, one to take all five — thirty-one necklaces. A garland from four flowers yields fifteen; the six tastes of Indian cookery combine in sixty-three ways. Combinatorics — the mathematics that today prices lottery odds, secures passwords and schedules airline fleets — enters the world's textbooks threaded on a string of sapphires.

Tanks, bricks, shadows — and one brave ellipse. The last third of the book belongs to people who build things. Chapter VII measures fields — right triangles, trapezia, circles, the cyclic quadrilaterals whose area formula he takes over from Brahmagupta — and everywhere splits results into two grades, the practical (rough, good enough to tax a field) and the minutely accurate: an engineer's distinction between estimate and spec. His boldest attempt is the āyata-vṛtta, the "elongated circle" — the ellipse, a shape no earlier Indian text had dared to measure. His accurate rule makes the perimeter √(16a² + 24b²) — for a longer semi-axis a and shorter b — and the area that perimeter times half of b. Score it honestly, as he would. The perimeter formula is genuinely good: for a circle it amounts to using √10 for π, the venerable Jain value, under one per cent high, and on his own worked example — an ellipse 36 long by 12 wide — it lands within about three per cent of the truth. The area rule is built on a false generalization — it extends the circle's relation between area and circumference to a shape where that relation fails — and on the same example comes out nearly a third too small. First attempt, half right: the usual price of going first. Chapter VIII, on excavations, is the one readers who build for a living will grin at — a site engineer's notebook in verse: the volume of a well whose square mouth is 20 cubits across, tapering to 16 at the bottom, 9 deep — his rules average the dimensions one way (karmāntika) and the areas another (auṇḍra), then blend the estimates, since a tapering pit's true volume lies between them. He specifies a standard brick — a hasta (cubit) long, half wide, four finger-breadths thick — counts the bricks in a platform, even prices the labour of sawing timber. Mathematics with mud on its sandals: the tanks, wells and temple plinths of the ninth-century Deccan, priced by verse. And chapter IX does shadows — the gnomon, time from shadow-lengths, heights from similar triangles; Smith judged these shadow problems better than anything comparable in Brahmagupta or Bhāskara. It is the only sky in the book, and even the sky has been made to stand in a row and be measured.

Before & After

Backward, every wire in the book hums. From the Jain canon's counting monks came his combinatorial instincts and multiple infinities; from Umāsvāti's quantified cosmos (chapter 51) the conviction that number reaches everything in the three worlds; from Piṅgala (chapter 37) the art of counting arrangements, promoted here from prosody to general principle. From Āryabhaṭa (chapter 65) and above all Brahmagupta (chapter 74) came the working capital — place-value arithmetic, zero, negatives, cyclic quadrilaterals — which he audited, corrected, mis-corrected and, crucially, repackaged for teaching: Brahmagupta wrote for fellow astronomers, Mahāvīrācārya for students, and the change of intended reader is his real innovation. From Amoghavarsha's court (chapter 78) came shelter, and a patronage that valued a mathematics book as an ornament of the reign. The global rhyme is precise: in the decades he was rhyming bees and fractions, al-Khwārizmī in Baghdad was writing the handbooks that would name the algorithm, and Carolingian Europe was circulating Alcuin's Latin puzzle collection — the ninth century, east and west, discovering that calculation is taught through delight.

Forward, the Gaṇitasārasaṅgraha had the afterlife proper to a textbook: not one dazzled successor but generations of anonymous students, concentrated in the south. Manuscripts travelled with Kannada commentaries and worked solutions; in the twelfth century the Hoysala court scholar Rājāditya wrote mathematical treatises in Kannada itself, in the same Jain teaching tradition; a Kannada-and-English edition was still being produced at a Jain maṭha in 2000. The oft-repeated claim that the book served southern classrooms for centuries rests on this trail — copies, commentaries, vernacular offspring — rather than on school records; but the trail is long and real. Its most remarkable branch is Telugu. Around the eleventh century, the poet-mathematician Pāvulūri Mallana — possibly patronized by the Eastern Chalukya king Rājarāja Narendra of Rajahmundry — recast the work in Telugu verse as the Sāra Saṅgraha Gaṇitamu, still remembered as Pavuluri Ganitamu. Pause on that: a technical treatise crossing from Sanskrit, the cosmopolitan language of learning, into a regional mother tongue within about two centuries — the oldest surviving scientific text in Telugu, and the earliest known translation of a mathematics book from Sanskrit into any regional Indian language. Mallana was no passive translator: he reorganized topics, added showpiece examples, recorded the weights, measures and coins of the Andhra country, and — being a Śaiva — quietly swapped the Jain invocations for Śiva. The first act of vernacular science in a language now spoken by over eighty million people was a math textbook changing its gods and keeping its fractions. Beyond that, the relay ran on: the a ÷ 0 question was resolved by Bhāskara II (chapter 98), whose Līlāvatī — poetry-problems, fraction mastery, charm harnessed to drill — is unimaginable without this template; and the southern line of calculation would crest with Mādhava of Saṅgamagrāma (chapter 116), when Indian mathematics reached for the genuinely infinite.

Why It Still Matters

Start with the recovery, because for a while the book was nearly lost to the learned world. In the first years of the twentieth century M. Raṅgācārya, professor of Sanskrit and curator of the Government Oriental Manuscripts Library in Madras (Chennai), was asked to survey the library for works of scientific value and found three incomplete manuscripts of the Gaṇitasārasaṅgraha. He gathered better copies — palm-leaf texts in Kannada script, a manuscript from the Jain monastery at Mudbidri, a loan from Mysore — collated, edited, and in 1912 published the Sanskrit text with the English translation that is still the standard door into the book. The American historian of mathematics David Eugene Smith, who had presented the work to the International Congress of Mathematicians at Rome in 1908, introduced the volume, judging it in many respects the most scholarly treatise in Indian mathematical literature, the edition making the mathematical world Raṅgācārya's "perpetual debtor." A ninth-century Deccan schoolbook, kept alive for a millennium by southern copyists, re-entered world mathematics through a Madras library.

What does his life argue now? Three things. First, the dignity of the specialist: in a culture where mathematics rode inside astronomy and astrology paid the bills, someone had to decide that calculation was worth a whole book — that a subject becomes a discipline when it gets its own covers. Every pure-mathematics department is downstream of that editorial decision. Second, the dignity of the textbook: Mahāvīrācārya discovered comparatively little and taught superlatively much, and his reward was the deepest kind of influence — not a named theorem but the training of uncounted minds, in Sanskrit, Kannada and Telugu, for centuries. We honour discoverers by reflex; the Gaṇitasārasaṅgraha is the standing case for honouring the consolidators, who make knowledge teachable. Third, the dignity of the honest error: his zero-rule is wrong in a way professors still use to teach why division by zero must be undefined, and his negative-root sentence marked, for everyone after, exactly where the next mathematics would have to begin — a discipline growing the only way disciplines grow, in public, one correctable claim at a time. Behind it all stands the verse that opened this chapter, the Jain teacher's serene claim that nothing in the three worlds exists apart from measurement. His century took that on faith. Yours can check it: you are reading this sentence through a lattice of counted light, while nearby a tank is dug to a computed volume, an interest rate compounds, a password guards itself with combinations. The swarm of the world still resolves, as the drunk bee circles, into number — and the man who said so first told us nothing of himself but his teachers, his king, and his subject, in ascending order of love.

Over to You

Mahāvīrācārya taught mostly other people's results, beautifully, and shaped more minds than most discoverers. Is a great textbook-writer a great mathematician? Who deserves the chapter in a civilization's book — the finder or the teacher — and what does your answer imply about how we hand out credit today?

He declared that a negative number has no square root — correct, and a dead end until mathematicians agreed to pretend otherwise and invented imaginary numbers, which now run electrical engineering. When is refusing an impossibility intellectual honesty, and when is it a failure of nerve?

The preface claims nothing in the three worlds exists apart from measurement. Is that the deepest truth we have — or is something real (love, justice, the taste of a mango) lost the moment it is measured? Where has quantification illuminated your world, and where has it flattened it?

Patronage bought the leisure that made pure mathematics possible, and bought a verse of royal flattery in every copy for a thousand years. Fair trade? What is the modern equivalent — grant acknowledgements, sponsored chairs, corporate labs — and what does the money buy besides the work?

Where to Go Next

Start with the source: The Gaṇita-sāra-saṅgraha of Mahāvīrācārya, edited and translated by M. Raṅgācārya (Madras, 1912; public domain online, with D. E. Smith's introduction) — dip straight into chapter IV's problem-poems and chapter VI's necklaces of gems; the rules are terse but the examples read like a garden.

A modern way in: George Gheverghese Joseph's The Crest of the Peacock: Non-European Roots of Mathematics (3rd ed., Princeton, 2011) — a readable world-tour that gives Jain mathematics and Mahāvīrācārya their due; for the full technical story, Kim Plofker's Mathematics in India (Princeton, 2009) is the standard history.

The thread forward: The ninth-century south braided the court's ledgers with the temple's longing, and we have heard only the ledgers. In chapter 80, Māṇikkavācakar — the Pandya minister sent to buy warhorses who spent the treasury on a temple instead — pours Tamil Śaivism's love-madness into the Tiruvācakam, the "sacred utterance," poems of longing so raw that Tamils say a heart they cannot melt cannot be melted.

Next, free to read

Chapter 80 · MāṇikkavācakarFree to read

Your place is kept on this device.