The grammar of the Sanskrit language has a complex verbal system, rich nominal declension, and extensive use of compound nouns. It was studied and codified by Sanskrit grammarians from the later Vedic period (roughly 8th century BCE), culminating in the Pāṇinian grammar of the 6th century BCE.
Sanskrit grammatical tradition (vyākaraṇa, one of the six Vedanga disciplines) began in late Vedic India and culminated in the Aṣṭādhyāyī of Pāṇini, which consists of 3990 sutras (ca. 5th century BCE). About a century after Pāṇini (around 400 BCE), Kātyāyana composed vārtikas (explanations) on the Pāṇinian sũtras. Patañjali, who lived three centuries after Pāṇini, wrote the Mahābhāṣya, the "Great Commentary" on the Aṣṭādhyāyī and Vārtikas. Because of these three ancient Sanskrit grammarians this grammar is called Trimuni Vyākarana. Jayaditya and Vāmana wrote a commentary named Kāśikā in 600 CE. Kaiyaṭa's (12th century AD) commentary on Patañjali's Mahābhāṣya also exerted much influence on the development of grammar, but more influential was the Rupāvatāra of Buddhist scholar Dharmakīrti which popularised simplified versions of Sanskrit grammar.
European grammatical scholarship began in the 18th century with Jean François Pons and others, and culminated in the exhaustive expositions by 19th century scholars such as Otto von Böhtlingk, William Dwight Whitney, Jacob Wackernagel and others.
Sanskrit has ten classes of verbs divided into two broad groups: intransitive and transitive. The thematic verbs are so called because an a, called the theme vowel, is inserted between the stem and the ending. This serves to make the thematic verbs generally more regular. Exponents used in verb conjugation include prefixes, suffixes, infixes, and reduplication. Every root has (not necessarily all distinct) zero, guṇa, and vṛddhi grades. If V is the vowel of the zero grade, the guṇa-grade vowel is traditionally thought of as a + V, and the vṛddhi-grade vowel as ā + V.
Sanskrit has ten tenses (plus one used in the Vedas, the "leT"). The verb tenses (a very inexact application of the word, since more distinctions than simply tense are expressed) are organized into four 'systems' (as well as gerunds and infinitives, and such creatures as intensives/frequentatives, desideratives, causatives, and benedictives derived from more basic forms) based on the different stem forms (derived from verbal roots) used in conjugation. There are four tense systems:
The present system includes the present tense and the imperfect (past imperfective), the optative and imperative moods, as well as some of the remnant forms of the old subjunctive. The tense stem of the present system is formed in various ways. The numbers are the native grammarians' numbers for these classes.
The perfect system includes only the perfect. The stem is formed with reduplication as with the present system.
The perfect system also produces separate "strong" and "weak" forms of the verb—the strong form is used with the singular active, and the weak form with the rest.
The aorist system includes aorist proper (with past indicative meaning, e.g. abhūḥ "you were") and some of the forms of the ancient injunctive (used almost exclusively with mā in prohibitions, e.g. mā bhūḥ "don't be"). The principal distinction of the two is presence/absence of an augment – a- prefixed to the stem. The aorist system stem actually has three different formations: the simple aorist, the sibilant aorist, and the reduplicating aorist, which is semantically related to the causative verb.
The future system is formed with the suffixation of sya or iṣya and guṇa. Verbs then conjugate as though they were thematic verbs in the present system. The imperfect of the future system is used as a conditional.
Each verb has a grammatical voice, whether active, passive or middle. There also is an impersonal voice, which can be described as the passive voice of intransitive verbs. Sanskrit verbs have an indicative, an optative and an imperative mood. Older forms of the language had a subjunctive, though this had fallen out of use by the time of Classical Sanskrit.
Conjugational endings in Sanskrit convey person, number, and voice. Different forms of the endings are used depending on what tense stem and mood they are attached to. Verb stems or the endings themselves may be changed or obscured by sandhi.
Primary endings are used with present indicative and future forms. Secondary endings are used with the imperfect, conditional, aorist, and optative. Perfect and imperative endings are used with the perfect and imperative respectively.
Sanskrit is a highly inflected language with three grammatical genders: masculine (पुंलिङ्ग puṃliṅga), feminine (स्त्रीलिङ्ग strīliṅga), and neuter (नपुंसकलिङ्ग napuṃsakaliṅga); and three numbers: singular (एकवचनम् ekavacanam), dual (द्विवचनम् dvivacanam), and plural (बहुवचनम् bahuvacanam). It has eight cases: nominative, vocative, accusative, instrumental, dative, ablative, genitive, and locative.
The number of actual declensions is debatable. Pāṇini identifies six kārakas corresponding to the nominative, accusative, dative, instrumental, locative, and ablative cases. Pāṇini defines them as follows (Ashtadhyayi, I.4.24 – 54):
The genitive (sambandha) and vocative (sambodhana) cases are not equivalent to any kāraka in Pāṇini's grammar.
In this article they are divided into five declensions. The declension to which a noun belongs to is determined largely by form.
The basic scheme of suffixation is given in the table below—valid for almost all nouns and adjectives. However, according to the gender and the ending consonant/vowel of the uninflected word-stem, there are predetermined rules of compulsory sandhi which would then give the final inflected word. The parentheses give the case-terminations for the neuter gender, the rest are for masculine and feminine gender. Both Devanagari script and IAST transliterations are given.
The final स् (s) characters in the above table are theoretical. In Classical Sanskrit, all of them become ः (ḥ) when the word is at the end of a sentence, and, if the word is followed by another in a sentence, the rules of sandhi for final "-ḥ" are applied.
A-stems (/ɐ/ or /aː/) comprise the largest class of nouns. As a rule, nouns belonging to this class, with the uninflected stem ending in short-a (/ɐ/), are either masculine or neuter. Nouns ending in long-A (/aː/) are almost always feminine. A-stem adjectives take the masculine and neuter in short-a (/ɐ/), and feminine in long-A (/aː/) in their stems. This class is so big because it also comprises the Proto-Indo-European o-stems.
ṛ-stems are predominantly agental derivatives like dātṛ 'giver', though also include kinship terms like pitṛ 'father', mātṛ 'mother', and svásṛ 'sister'.
All numbers in Sanskrit can be declined in all the cases. Numbers above four are only declined in the plural. Éka is declined like a pronominal adjective, though the dual form does not occur. Dvá appears only in the dual. Trí and catúr are declined irregularly:
Sanskrit pronouns are declined for case, number, and gender. Many pronouns have alternative enclitic forms. The first and second person pronouns are declined for the most part alike, having by analogy assimilated themselves with one another. Ablatives in singular and plural may be extended by the syllable -tas; thus mat or mattas, asmat or asmattas. Sanskrit does not have true third person pronouns, but its demonstratives fulfil this function instead by standing independently without a modified substantive.
There are four different demonstratives in Sanskrit: tat, etat, idam, and adas. etat indicates greater proximity than tat. While idam is similar to etat, adas refers to objects that are more remote than tat. eta, is declined almost identically to ta. Its paradigm is obtained by prefixing e- to all the forms of ta. As a result of sandhi, the masculine and feminine singular forms transform into eṣas and eṣã.
The enclitic pronoun ena is found only in a few oblique cases and numbers. Interrogative pronouns all begin with k-, and decline just as tat does, with the initial t- being replaced by k-. The only exception to this are the singular neuter nominative and accusative forms, which are both kim and not the expected *kat. For example, the singular feminine genitive interrogative pronoun, "of whom?", is kasyãḥ. Indefinite pronouns are formed by adding the participles api, cid, or cana after the appropriate interrogative pronouns. All relative pronouns begin with y-, and decline just as tat does. The correlative pronouns are identical to the tat series.
In addition to the pronouns described above, some adjectives follow the pronominal declension. Unless otherwise noted, their declension is identical to tat.
One other notable feature of the nominal system is the very common use of nominal compounds, which in the later literary language may be huge (10+ words) as in some modern languages such as German and Finnish. Nominal compounds occur with various structures, however morphologically speaking they are essentially the same. Each noun (or adjective) is in its (weak) stem form, with only the final element receiving case inflection. The four principal categories of nominal compounds are:
Classical Sanskrit distinguishes about 36 phonemes. There is, however, some allophony and the writing systems used for Sanskrit generally indicate this, thus distinguishing 48 sounds. The sounds are traditionally listed in the order vowels (Ac), diphthongs (Hal), anusvara and visarga, plosives (Sparśa) and nasals (starting in the back of the mouth and moving forward), and finally the liquids and fricatives, written in IAST as follows:
It should be understood that, while the script used here is Devanagari, this has no particular importance. It just happens currently to be the most popular script for Sanskrit. The form of the symbols used to write Sanskrit has varied widely geographically and over time, and notably includes in modern times the Tamil and other modern Indian scripts. What is important is that the adherence to the phonological classification of the symbols elucidated here has remained constant in Sanskrit since classical times. It should be further noted that the phonology of modern Indian languages has evolved, and the values given to Devanagari symbols in, e.g. Hindi, differ somewhat from those of Sanskrit.
The vowels of Classical Sanskrit written in Devanagari, as a syllable-initial letter and as a diacritic mark on the consonant प् (/p/), pronunciation transcribed in IPA, IAST, and approximate equivalent in English:
The long vowels are pronounced twice as long as their short counterparts. Also, there exists a third, extra-long length for most vowels. This lengthening is called pluti; the lengthened vowels, called pluta, are used in various cases, but particularly in the vocative. The pluti is not accepted by all grammarians. The vowels /eː/ and /oː/ continue as allophonic variants of Proto-Indo-Iranian /ai/, /au/ and are categorised as diphthongs by Sanskrit grammarians even though they are realised phonetically as simple long vowels.
The table below shows the traditional listing of the Sanskrit consonants with the (nearest) equivalents in English (as pronounced in General American and Received Pronunciation or the Indian English pronunciation if specified), French and Spanish. Each consonant shown below is deemed to be followed by the neutral vowel schwa (/ɐ/), and is named in the table as such.
In the earlier language, व was pronounced as the labio-velar approximant [w], but it later developed into a labio-dental sound. To an English speaker's ear, this sound may be interpreted as the English "v" or the English "w", depending on context and precise articulation. Moreover, the Sanskrit व has a considerable range of articulation depending on position. . It is nonetheless understood in the Sanskrit writing system, as well as by speakers of modern Indian languages, as one and the same phoneme.
Vedic Sanskrit had pitch accent (see Vedic accent). However, by Classical Sanskrit this had been replaced by stress. Stress may not fall on the last syllable of a word, but otherwise it falls on the last heavy syllable (including CV syllables with the vowels e and o, which are long but often transcribed as if they were short). If all syllables before the last are light, then stress falls on the initial syllable. However, stress is not particularly important in Sanskrit.
The Sanskrit vowels are as discussed in the section above. The long syllabic l (ḹ) is not attested, and is only discussed by grammarians for systematic reasons. Its short counterpart ḷ occurs in a single root only, kḷp "to order, array". Long syllabic r (ṝ) is also quite marginal, occurring in the genitive plural of r-stems (e.g. mātṛ "mother" and pitṛ "father" have gen.pl. mātṝṇām and pitṝṇām). i, u, ṛ, ḷ are vocalic allophones of consonantal y, v, r, l. There are thus only 5 invariably vocalic phonemes: a, ā, ī, ū, ṝ.
Visarga ḥ ः is an allophone of r and s, and anusvara ṃ, Devanagari ं of any nasal, both in pausa (i.e., the nasalised vowel). The exact pronunciation of the three sibilants may vary, but they are distinct phonemes. Voiced sibilants, such as z /z/, ẓ /ʐ/, and ź /ʑ/ as well as its aspirated counterpart źh /ʑʱ/, were inherited by Proto-Indo-Aryan from Proto-Indo-Iranian but lost around or after the time of the Rigveda, as evidenced due to ḷh (an aspirated retroflex lateral consonant) being metrically a cluster (that was most likely of the form ẓḍh; aspirated fricatives are exceedingly rare in any language). The retroflex consonants are somewhat marginal phonemes, often being conditioned by their phonetic environment; they do not continue a PIE series and are often ascribed by some linguists to the substratal influence of Dravidian or other substrate languages. The nasal [ɲ] is a conditioned allophone of /n/ (/n/ and /ɳ/ are distinct phonemes—aṇu 'minute', 'atomic' [nom. sg. neutr. of an adjective] is distinctive from anu 'after', 'along'; phonologically independent /ŋ/ occurs only marginally, e.g. in prāṅ 'directed forwards/towards' [nom. sg. masc. of an adjective]). There are thus 31 consonantal or semi-vocalic phonemes, consisting of four/five kinds of stops realised both with or without aspiration and both voiced and voiceless, three nasals, four semi-vowels or liquids, and four fricatives, written in IAST transliteration as follows: k, kh, g, gh; c, ch, j, jh; ṭ, ṭh, ḍ, ḍh; t, th, d, dh; p, ph, b, bh; m, n, ṇ; y, r, l, v; ś, ṣ, s, h or a total of 36 unique Sanskrit phonemes altogether.
The phonological rules which are applied when combining morphemes to a word, and when combining words to a sentence, are collectively called sandhi "composition". Texts are written phonetically, with sandhi applied (except for the so-called padapāṭha).
A number of phonological processes have been described in detail. One of them is abhinidhāna (lit. 'adjacent imposition'), (also known as āsthāpita, 'stoppage', bhakṣya or bhukta). It is the incomplete articulation, or ""repressing or obscuring", of a plosive or, according to some texts, a semi-vowel (except r), which occurs before another plosive or a pause. It was described in the various Prātiśākhyas as well as the Cārāyaṇīya Śikṣa. These texts are not unanimous on the environments that trigger abhinidhana, nor on the precise classes of consonants affected.
One ancient grammarian, Vyāḍi (in Ṛgveda Prātiśākhya 6.12), states that abhinidhāna only occurred when a consonant was doubled, whereas according to the text of the Śākalas it was obligatory in this context but optional for plosives before another plosive of a different place of articulation. The Śākalas and the Atharva Veda Prātiśākhya agree on the observation that abhinidhana occurs only if there is a slight pause between the two consonants and not if they are pronounced jointly. Word-finally, plosives undergo abhinidhāna according to the Atharva Veda Prātiśākhya and the Ṛgveda Prātiśākhya. The latter text adds that final semivowels (excluding r) are also incompletely articulated. The Atharva Veda Prātiśākhya 2.38 lists an exception: a plosive at the end of the word will not undergo abhinidhāna and will be fully released if it is followed by a consonant whose place of articulation is further back in the mouth. The Cārāyaṇīya Śikṣa states that the consonants affected by abhinidhāna are the voiceless unaspirated plosives, the nasal consonants and the semivowels l and v.
According to Siddheshwar Varma, these differences may indicate geographical variation. It is not clear whether abhinidhana was present in the early spoken Sanskrit or it developed at a later stage. In Prakrit and Pāli abhinidhana was carried a step forward into complete assimilation, as for example Sanskrit: sapta to Jain Prakrit: satta.
Because of Sanskrit's complex declension system, the word order is free. In usage, there is a strong tendency toward subject–object–verb (SOV), which was the original system in place in Vedic prose. However, there are exceptions when word pairs cannot be transposed.
In the introduction to his celebrated translation of Vidyakara's 'Subhashitaratnakosha', Daniel H.H. Ingalls describes some peculiar characteristics of the Sanskrit language. He refers to the enormous vocabulary of Sanskrit, and also of the presence of a larger choice of synonyms in Sanskrit than any other language he knew of. Further, he writes, just as there exist a vast number of synonyms for almost any word in Sanskrit, there also exist synonymous constructions. Ingalls writes that in elementary Sanskrit examinations he would ask his students to write in Sanskrit the sentence 'You must fetch the horse' in ten different ways. Actually, Ingalls explains, it is possible to write the sentence in Sanskrit in around fifteen different ways 'by using active or passive constructions, imperative or optative, an auxiliary verb, or any of the three gerundive forms, each of which, by the way, gives a different metrical pattern'. Ingalls emphasizes that while these constructions differ formally, emotionally they are identical and completely interchangeable. He comments that in any natural language this would be impossible. Ingalls uses this and other arguments to show that Sanskrit is not a natural language, but an 'artificial' language. By 'artificial', he explains he means it was learned after some other Indian language had been learned by simple conditioning. Ingalls writes: 'Every Indian, one may suppose, grew up learning naturally the language of his mother and his playmates. Only after this and if he belonged to the priesthood or the nobility or to such a professional caste as that of the clerks, the physicians, or the astrologers would he learn Sanskrit. As a general rule, Sanskrit was not the language of the family. It furnished no subconscious symbols for the impressions which we receive in childhood nor for the emotions which form our character in early adolescence.'