Esperaunce

Three long palm-leaf pages written in a rounded Nepalese script, each with a circular blank where a binding cord passed.

Ancient India · Knowledge, Writing and Science

Panini

Photograph by Ms Sarah Welch, CC BY-SA 4.0, via Wikimedia Commons.

The Archives/Ancient India/Knowledge, Writing and Science

Four thousand rules, in an artificial notation, arranged so that specific rules override general ones and the whole thing runs like a program. It describes a language completely, and it was composed to be memorised.

At some point in the fourth century BC, probably in the north-west near Salatura in Gandhara, a man called Panini wrote a grammar of Sanskrit. The Ashtadhyayi, the Eight Chapters, contains something under four thousand sutras: short rules, some of them two or three words long, in a compressed technical notation. Given a set of verbal roots and nominal stems, the rules generate every correctly formed word in the language, with the sounds, the endings, the compounds and the alternations all specified.

It is complete for the language it describes, it is consistent, and it is so economical that nothing comparable was achieved anywhere else until the twentieth century. Leonard Bloomfield called it one of the greatest monuments of human intelligence. The comparison usually made now is with formal systems in logic and computer science, and the comparison is not flattery: the Ashtadhyayi uses metarules, recursion, a convention for rule ordering, and a notation with variables and abbreviations, in the fourth century BC.

Nobody knows much else about the man.

❦

On this page

How it works

The method is the whole point and it has to be described before anything else makes sense. The grammar does not list forms. It derives them.

It starts with an inventory: a list of verbal roots, running to about two thousand, and a list of nominal stems, both supplied in separate texts attached to the grammar. To those it applies operations. Affixes are introduced, sounds are substituted, deleted or inserted, accents are assigned, and the result is a word.

The rules are arranged so that they apply in a defined order and so that a later or more specific rule overrides an earlier or more general one. That principle of the specific superseding the general is stated explicitly in the tradition and is the mechanism that keeps four thousand rules from contradicting each other. The notation is artificial and compressed. Panini uses technical terms of his own coinage, single-letter markers attached to affixes to indicate how they behave, and a system of abbreviation in which a set of sounds is named by its first member plus a marker.

That abbreviation system depends on a preliminary list of the sounds of Sanskrit, the Shivasutras, arranged in fourteen groups in an order that has been shown to be optimal for the abbreviations the grammar needs. Paul Kiparsky’s work demonstrated that the arrangement is not arbitrary and could hardly be improved. The whole is designed for memorisation. A rule of two words is easier to hold than a paragraph, and the tradition transmitted the text orally with commentary for over two thousand years.

Why anybody needed it

The motive for a grammar of this severity is religious and it explains the standard applied. The Vedic hymns had to be recited exactly. A mispronounced syllable did not merely sound wrong; in the ritual theory it produced the wrong result, and the Brahmana literature contains cautionary stories about sacrifices that went badly because of an error of accent.

A dark manuscript page covered with lines of small script on birch bark.
A Rigveda manuscript in Sharada script from Kashmir, now in Pune. The hymns were transmitted orally for well over two thousand years before copies like this were made.Bhandarkar Oriental Research Institute, CC0, via Wikimedia Commons.

Patanjali tells one: a demon performed a rite to obtain a slayer of Indra, mispronounced the compound so that it meant one whose slayer is Indra, and was duly killed by Indra. Preserving the texts therefore meant preserving the pronunciation, and preserving pronunciation across centuries while the spoken language drifted meant describing it explicitly. Out of that came the six auxiliary disciplines attached to the Veda, the vedangas: phonetics, metre, grammar, etymology, ritual procedure and astronomy. Three of them are language sciences.

The phonetic treatises, the pratishakhyas, classify the sounds of Sanskrit by place of articulation, by the state of the glottis and by the degree of contact, with a precision that western phonetics did not reach until the nineteenth century. Yaska’s Nirukta, earlier than Panini, is a work on etymology and semantics that already assumes a word can be analysed into root and affix and argues about how far that analysis can be pushed.

So Panini was working inside an established science with an accumulated technical vocabulary, for a purpose that made completeness and exactness worth the trouble. The Ashtadhyayi is what happens when a culture decides that getting a text’s pronunciation right matters more than almost anything else, and then spends several centuries on the problem.

What it describes

The object of the grammar matters, because Panini’s decisions about what to include define Sanskrit itself. He describes the educated spoken language of his time and region, which he calls bhasha, the speech, and he also records the older Vedic usage separately, marking rules that apply only to it. That distinction is evidence. Panini knew the Vedic corpus, treated it as an earlier stage with its own rules, and was describing a living language that differed from it.

Two long narrow manuscript leaves closely written in an Indian script, photographed against black with a scale.
A manuscript of the Kamasutra with Yashodhara’s thirteenth-century commentary, bought in Nepal in 1885. The text is prose and it is systematic.Photograph by Ms Sarah Welch, CC BY-SA 4.0, via Wikimedia Commons.

He records variation. Rules are marked as optional, as belonging to the eastern or northern usage, or as followed by particular named earlier grammarians who disagreed with him. Ten predecessors are named, whose works are entirely lost.

And he records the world incidentally. The grammar’s examples and its rules for forming derived words mention coins, weights, occupations, tribes, rivers, cities, games, foods and social categories, which makes it a source for the north-west in the fourth century BC that historians have mined heavily.

Sanskrit after Panini

The consequence of a complete grammar is a language that stops changing, and that consequence was deliberate. Sanskrit means refined or perfected, and the name distinguishes it from Prakrit, the natural or unrefined speech. After the Ashtadhyayi, correct Sanskrit was by definition what Panini’s rules generate. The language was fixed, and it stayed fixed for two thousand years, which is why a text written in Kerala in the sixteenth century is grammatically identical to one written in Kashmir in the fifth.

That is a remarkable cultural achievement and it had costs. Sanskrit became a learned language maintained by a trained elite, while the spoken languages went their own way into the Prakrits and eventually into Hindi, Bengali, Marathi and the rest. The prestige of the fixed language was enormous. Sheldon Pollock’s account of what he calls the Sanskrit cosmopolis describes a zone running from Afghanistan to Java in which, for something like a thousand years, public inscriptions and literature were composed in Sanskrit by people whose mother tongues were entirely different, because Sanskrit was what power and learning sounded like.

The grammar made that possible, because a fixed standard can be taught anywhere.

The commentators

The grammar generated a tradition, and the tradition is as important as the text. Katyayana, probably in the third century BC, wrote varttikas, supplementary notes correcting, restricting or extending Panini’s rules where usage had changed or where he thought Panini wrong. Patanjali, in the second century BC, wrote the Mahabhashya, the Great Commentary, on Panini and Katyayana together. It is a discursive work in dialogue form, arguing positions out, and it is one of the finest pieces of technical prose in Sanskrit.

Weathered brown sandstone cut with four lines of angular early Indian script.
The Lumbini pillar inscription, in Brahmi. Ashoka records that he came in person in his twentieth year and cut the village’s tax to an eighth.Photograph by Photo Dharma, CC BY 2.0, via Wikimedia Commons.

Patanjali is also a historical source. His examples refer to datable events, including a Greek besieging a city in Madhyamika, which has been used to date him. Bhartrihari, probably in the fifth century AD, took the tradition into philosophy of language in the Vakyapadiya, arguing about the relation of words to meaning, the status of the sentence as a unit, and the nature of linguistic knowledge.

The tradition continued producing commentary and pedagogical rearrangements into the modern period, and the Siddhantakaumudi of Bhattoji Dikshita in the seventeenth century, which reorders the rules for teaching, is still how students learn.

The European encounter

What happened when western scholars met this material changed their own disciplines. Sanskrit became known in Europe in the late eighteenth century through the East India Company’s officials, and the grammatical tradition came with it. William Jones’s observation in 1786 that Sanskrit, Greek and Latin showed a relationship too strong to be accidental is usually taken as the start of comparative philology.

Two long palm leaf pages of closely written Sanskrit script with a binding hole in each.
Two leaves of Vangasena’s medical compendium, thirteenth century. Medical texts were copied on palm leaf and had to be recopied every few generations as the leaves decayed.Photograph by Ms Sarah Welch, CC BY-SA 4.0, via Wikimedia Commons.

What made the subsequent work possible was the Indian grammatical apparatus. European scholars acquired from it the analysis of words into root and affix, the concept of the phoneme in something close to its modern form, the systematic description of sound change, and the idea of a rule-governed derivation. Franz Bopp, Wilhelm von Humboldt, Ferdinand de Saussure and Bloomfield all worked with Panini in view. Saussure’s early work was on Sanskrit, and his idea of the linguistic system owes something to the tradition.

In the twentieth century the comparison shifted. Noam Chomsky’s generative grammar, describing a language by rules that produce its sentences rather than by classifying its forms, is doing structurally what Panini did, and the parallel has been noted in the literature repeatedly, with some care about how much to claim.

Writing, which came later

One further point has to be made, because it surprises people. Panini almost certainly did not write. The Ashtadhyayi is composed for oral transmission: its compression, its markers and its abbreviation system are memory technology.

A small square steatite seal carved with a one-horned animal and a row of signs, beside its modern clay impression.
The seal Alexander Cunningham found at Harappa in the 1850s, the first Indus seal published. Nobody has read the script since.Photograph by Zunkir, CC BY-SA 4.0, via Wikimedia Commons.

Indian writing in the historical period begins with Brahmi, whose earliest securely dated examples are the Ashokan edicts of the third century BC, a century or more after Panini. The Indus script discussed elsewhere in this set is undeciphered and is separated from Brahmi by a millennium with nothing in between. Whether Brahmi was derived from a Semitic script, probably Aramaic through the Achaemenid administration of the north-west, or invented independently, is argued. Its systematic organisation, with consonants carrying an inherent vowel modified by diacritics and an alphabet arranged by place and manner of articulation, is clearly the work of people who already had a phonetic analysis of the language.

That analysis is the grammarians’ analysis. The script arranges its letters in the order the phoneticians had established, which means the linguistics came first and the writing was fitted to it. That is the reverse of the usual sequence, and it explains why the Indian scripts are so much more systematic than the alphabets of the Mediterranean.

What to make of him

A closing assessment, because the claims made about Panini range from dismissal to absurdity. He did not invent linguistics. He names predecessors and he inherited a phonetic tradition, the shiksha and pratishakhya literature, that had been analysing Vedic recitation for centuries.

He did not describe every Indian language, or Sanskrit as ordinary people used it in later centuries, or anything outside his own dialect region and moment. What he did is narrower and more impressive. He produced a formal system that derives the entire morphology of a natural language, got it right, and made it small enough to memorise.

Nothing comparable was attempted anywhere else in the ancient world, and nothing comparable was achieved in Europe until linguists had computers to think with. The fact that we know essentially nothing about him is the ordinary condition of Indian intellectual history, and in his case it is unusually frustrating.

Sources

Ancient

  • Panini, Ashtadhyayi, with the Dhatupatha and Ganapatha
  • Katyayana, Varttikas; Patanjali, Mahabhashya
  • Bhartrihari, Vakyapadiya; the Ashokan edicts for the earliest Brahmi

Modern

  • Paul Kiparsky, on the Shivasutras and Paninian rule ordering
  • George Cardona, Panini: A Survey of Research, 1976
  • Sheldon Pollock, The Language of the Gods in the World of Men, 2006
  • Richard Salomon, Indian Epigraphy, 1998

New civilisations are announced by email as they are written.

Passages may be quoted with my name and a link to the page, and copies may be handed out in a classroom, lecture or study group as long as the site’s name stays on them. Please ask first before republishing a whole essay or Archives page, translating one, or using the writing in anything that is sold. Use for training machine-learning systems is not permitted. The details are on Using this site.

Images are credited individually; rights remain with their holders.

© 2026 Esperaunce. All rights reserved.