Vyākaraṇa — grammar, and Pāṇini
व्याकरण
Also written: vyakarana · panini · ashtadhyayi · sanskrit grammar
Pāṇini's Aṣṭādhyāyī — 'eight chapters' — describes the entire Sanskrit language in 3,959 rules of extreme compression, arranged so that rules interact by explicit precedence. It is not a description of grammar; it is a machine that produces correct forms.
What makes it extraordinary
- It uses metarules (paribhāṣā) that govern how the other rules apply — a formal system with its own operating instructions.
- It uses a technical shorthand (the Śiva Sūtras, and the pratyāhāra abbreviations) that compresses classes of sounds into single syllables.
- Rule ordering, conflict resolution and exception handling are all explicit — the principle that the more specific rule overrides the general one is stated as a rule.
- It generates rather than merely describes: given a root and an intention, the rules yield the correct form.
- Its structure is close enough to a formal grammar that twentieth-century linguists and computer scientists studied it directly; the term 'Backus–Naur form' has been argued to describe something Pāṇini did first.
Look at the first rule
The Aṣṭādhyāyī opens with three syllables. They are not a sentence in any ordinary sense; they are a definition being installed into a machine.
वृद्धिरादैच्।
vṛddhir ādaic
'Vṛddhi' means ā, ai, au.
Two devices are already at work in three syllables. Vṛddhi is a technical term (saṁjñā) being assigned a referent, exactly as a programming language declares an identifier. And ādaic is a pratyāhāra: the sound ā, plus the abbreviation aiC formed by taking the first member ai and the marker c from the list of sounds prefixed to the grammar. Those lists — the fourteen Māheśvara Sūtras — are the key to the whole compression.
अइउण्। ऋऌक्। एओङ्। ऐऔच्। हयवरट्। लण्। ञमङणनम्। झभञ्। घढधष्। जबगडदश्। खफछठथचटतव्। कपय्। शषसर्। हल्॥
a i u ṇ | ṛ ḷ k | e o ṅ | ai au c | ha ya va ra ṭ | la ṇ | ña ma ṅa ṇa na m | jha bha ñ | gha ḍha dha ṣ | ja ba ga ḍa da ś | kha pha cha ṭha tha ca ṭa ta v | ka pa y | śa ṣa sa r | ha l
The fourteen sound-lists prefixed to the grammar. Each ends in a marker consonant, and any span from a given sound to a given marker can then be named by a single syllable.
The ordering of those fourteen lines is the achievement. Sounds are arranged so that every class the grammar will ever need to refer to — all vowels, all consonants, all stops, all semivowels, all voiced sounds — happens to occupy a contiguous span, and can therefore be named by one abbreviation of two letters. aC = all vowels. haL = all consonants. iK, yaÑ, jhaŚ and the rest each name a natural class. It has been shown that the arrangement is very close to the shortest possible list satisfying all the constraints the grammar imposes on it. That is an optimisation problem solved before 400 BCE, by hand, with no notation for the problem itself.
Conflict resolution, stated as a rule
The feature that most sharply separates the Aṣṭādhyāyī from every other ancient grammar is that it anticipates its own rules colliding, and legislates the outcome in advance.
विप्रतिषेधे परं कार्यम्।
vipratiṣedhe paraṁ kāryam
In case of conflict, the later operation is to be performed.
Four words, and they turn 3,959 individually incomplete statements into a determinate system. Para means 'later in the text', so the physical order of the sūtras carries semantic weight — position in the list is itself information. Around this rule the tradition built the paribhāṣās, the metarules that resolve the remaining cases: an antaraṅga rule (one whose conditions are internal to the form) outranks a bahiraṅga one; an apavāda (specific exception) outranks its utsarga (general rule); a nitya rule outranks an anitya one. The comparison with the rule-ordering, default-and-exception and conflict-resolution machinery of formal grammars and rule engines is exact rather than approximate, and it is why twentieth-century computational linguists read Pāṇini directly.
Why grammar was studied at all
Patañjali begins the Mahābhāṣya by asking the obvious question — what is grammar for? — and gives five answers in a single compound.
रक्षोहागमलघ्वसन्देहाः प्रयोजनम्।
rakṣoha-agama-laghu-asandehāḥ prayojanam
Preservation, modification, transmission, brevity and freedom from doubt — these are its purposes.
Rakṣā, preservation, is listed first, and it is the ritual argument: the Veda must be protected from drift, and only a person who knows the rules can tell a genuine form from a corruption. Asandeha, freedom from doubt, is the interpretive argument: where a Vedic sentence is ambiguous, grammar decides. The other three — ūha (adapting a mantra to a changed rite), āgama (the injunction to study), laghu (economy) — are practical. Not one of the five is aesthetic. Grammar was a science of textual security before it was anything else.
Three works form the 'great triad' of the grammatical tradition: Pāṇini's Aṣṭādhyāyī, Kātyāyana's Vārttika (critical notes on it), and Patañjali's Mahābhāṣya (the great commentary on both). Vyākaraṇa is also a full philosophy of language — Bhartṛhari's Vākyapadīya argues that reality itself is of the nature of the word, śabda-brahman, and it says so in its opening verse.
अनादिनिधनं ब्रह्म शब्दतत्त्वं यदक्षरम्। विवर्ततेऽर्थभावेन प्रक्रिया जगतो यतः॥
anādi-nidhanaṁ brahma śabda-tattvaṁ yad akṣaram vivartate'rtha-bhāvena prakriyā jagato yataḥ
Brahman, without beginning or end, is the imperishable reality of the word; it appears as objects, and from it proceeds the process of the world.
This is where a technical discipline turns into metaphysics. Bhartṛhari's argument is that meaning is not assembled from parts — a sentence is grasped as a whole in a single flash of understanding (pratibhā), and the analysis into words, stems and suffixes that Pāṇini performs is a reconstruction after the fact, not a description of how a hearer actually understands. The word is prior; the world is its appearing. One may reject the conclusion, but the route to it runs entirely through grammar, which is what makes the Indian philosophy of language distinctive: it grew out of a working parser.
The sources of knowledge in Sanātana Dharma
The complete library: Nigama and Āgama, śruti and smṛti, the four Vedas with their four layers, the six Vedāṅg…
Śruti — that which was heard
What apauruṣeya means, how the Veda was preserved syllable-perfect for millennia without writing, and why śrut…
Smṛti — that which was remembered
The vast human-authored body: Vedāṅga, Itihāsa, Purāṇa, Dharma Śāstra, Sūtra, Darśana, Āgama and Kāvya — deriv…
Nigama and Āgama — the two revealed streams
The Vedic and the Tantric revelations: their different forms, their different eligibility rules, why every tem…
The four Vedas
Ṛgveda, Yajurveda, Sāmaveda and Atharvaveda — what each contains, the priest each belongs to, its śākhās, and …
Ṛgveda
The oldest surviving text of the tradition: 1,028 hymns in ten maṇḍalas, its structure, its great hymns, and w…
Last revised 2026-08-16. Corrections are welcome — see how this site is written.