|Part of a series on|
In linguistics, grammar (from Ancient Greek γραμματική) is the set of structural rules governing the composition of clauses, phrases and words in a natural language. The term refers also to the study of such rules and this field includes phonology, morphology and syntax, often complemented by phonetics, semantics and pragmatics.
Fluent speakers of a language variety or lect have a set of internalized rules which constitutes its grammar.  The vast majority of the information in the grammar is – at least in the case of one's native language – acquired not by conscious study or instruction but by hearing other speakers. Much of this work is done during early childhood; learning a language later in life usually involves more explicit instruction.  Thus, grammar is the cognitive information underlying language use.
The term "grammar" can also describe the rules which govern the linguistic behavior of a group of speakers. For example, the term "English grammar" may refer to the whole of English grammar; that is, to the grammars of all the speakers of the language, in which case the term encompasses a great deal of variation.  Alternatively, it may refer only to what is common to the grammars of all or most English speakers (such as subject–verb–object word order in simple declarative sentences). It may also refer to the rules of one relatively well-defined form of English (such as standard English for a region).
A description, study, or analysis of such rules may also be referred to as a grammar. A reference book describing the grammar of a language is called a "reference grammar" or simply "a grammar" (see History of English grammars). A fully explicit grammar which exhaustively describes the grammatical constructions of a particular speech variety is called a descriptive grammar. This kind of linguistic description contrasts with linguistic prescription, an attempt to actively discourage or suppress some grammatical constructions, while codifying and promoting others, either in an absolute sense or about a standard variety. For example, some prescriptivists maintain that sentences in English should not end with prepositions, a prohibition that has been traced to John Dryden (13 April 1668 – January 1688) whose unexplained objection to the practice perhaps led other English speakers to avoid the construction and discourage its use.   Yet preposition stranding has a long history in Germanic languages like English, where it is so widespread as to be a standard usage.
Outside linguistics, the term grammar is often used in a rather different sense. It may be used more broadly to include conventions of spelling and punctuation, which linguists would not typically consider as part of grammar but rather as part of orthography, the conventions used for writing a language. It may also be used more narrowly to refer to a set of prescriptive norms only, excluding those aspects of a language's grammar which are not subject to variation or debate on their normative acceptability. Jeremy Butterfield claimed that, for non-linguists, "Grammar is often a generic way of referring to any aspect of English that people object to." 
The word grammar is derived from Greek γραμματικὴ τέχνη (grammatikē technē), which means "art of letters", from γράμμα (gramma), "letter", itself from γράφειν (graphein), "to draw, to write".  The same Greek root also appears in graphics, grapheme, and photograph.
The first systematic grammar, of Sanskrit, originated in Iron Age India, with Yaska (6th century BC), Pāṇini (6-5th century BC ) and his commentators Pingala (c. 200 BC), Katyayana, and Patanjali (2nd century BC). Tolkāppiyam, the earliest Tamil grammar, is mostly dated to before the 1st century BC. The Babylonians also made some early attempts at language description. 
Grammar appeared as a discipline in Hellenism from the 3rd century BC forward with authors such as Rhyanus and Aristarchus of Samothrace. The oldest known grammar handbook is the Art of Grammar (Τέχνη Γραμματική), a succinct guide to speaking and writing clearly and effectively, written by the ancient Greek scholar Dionysius Thrax ( c. 170– c. 90 BC), a student of Aristarchus of Samothrace who founded a school on the Greek island of Rhodes.  Dionysius Thrax's grammar book remained the primary grammar textbook for Greek schoolboys until as late as the twelfth century AD.  The Romans based their grammatical writings on it and its basic format remains the basis for grammar guides in many languages even today.  Latin grammar developed by following Greek models from the 1st century BC, due to the work of authors such as Orbilius Pupillus, Remmius Palaemon, Marcus Valerius Probus, Verrius Flaccus, and Aemilius Asper.
A grammar of Irish originated in the 7th century with the Auraicept na n-Éces. Arabic grammar emerged with Abu al-Aswad al-Du'ali in the 7th century. The first treatises on Hebrew grammar appeared in the High Middle Ages, in the context of Mishnah (exegesis of the Hebrew Bible). The Karaite tradition originated in Abbasid Baghdad. The Diqduq (10th century) is one of the earliest grammatical commentaries on the Hebrew Bible.  Ibn Barun in the 12th century compares the Hebrew language with Arabic in the Islamic grammatical tradition. 
Belonging to the trivium of the seven liberal arts, grammar was taught as a core discipline throughout the Middle Ages, following the influence of authors from Late Antiquity, such as Priscian. Treatment of vernaculars began gradually during the High Middle Ages, with isolated works such as the First Grammatical Treatise, but became influential only in the Renaissance and Baroque periods. In 1486, Antonio de Nebrija published Las introduciones Latinas contrapuesto el romance al Latin, and the first Spanish grammar, Gramática de la lengua castellana, in 1492. During the 16th-century Italian Renaissance, the Questione della lingua was the discussion on the status and ideal form of the Italian language, initiated by Dante's de vulgari eloquentia ( Pietro Bembo, Prose della volgar lingua Venice 1525). The first grammar of Slovene was written in 1583 by Adam Bohorič.
Grammars of some languages began to be compiled for the purposes of evangelism and Bible translation from the 16th century onward, such as Grammatica o Arte de la Lengua General de los Indios de los Reynos del Perú (1560), a Quechua grammar by Fray Domingo de Santo Tomás.
From the latter part of the 18th century, grammar came to be understood as a subfield of the emerging discipline of modern linguistics. The Deutsche Grammatik of the Jacob Grimm was first published in the 1810s. The Comparative Grammar of Franz Bopp, the starting point of modern comparative linguistics, came out in 1833.
Frameworks of grammar which seek to give a precise scientific theory of the syntactic rules of grammar and their function have been developed in theoretical linguistics.
- Functional grammar (structural–functional analysis):
- Dependency grammar: dependency relation ( Lucien Tesnière 1959)
- Montague grammar
Other frameworks are based on an innate " universal grammar", an idea developed by Noam Chomsky. In such models, the object is placed into the verb phrase. The most prominent biologically-oriented theories are:
- Transformational grammar (1960s)
Generative semantics (1970s)
- Semantic Syntax (1990s)
- Generalised phrase structure grammar (late 1970s)
- Lexical functional grammar
- Categorial grammar ( lambda calculus)
- Minimalist program-based grammar (1993)
- Cognitive grammar / Cognitive linguistics
- Stochastic grammar: probabilistic
Parse trees are commonly used by such frameworks to depict their rules. There are various alternative schemes for some grammars:
- Constraint grammar
- Tree-adjoining grammar
- Affix grammar over a finite lattice
- Lambda calculus
- X-bar theory
- Backus–Naur form
This section needs additional citations for verification. (June 2020) ( Learn how and when to remove this template message)
Grammars evolve through usage and also due to separations of the human population. With the advent of written representations, formal rules about language usage tend to appear also. Formal grammars are codifications of usage which are developed by repeated documentation and observation over time. As rules are established and developed, the prescriptive concept of grammatical correctness can arise. This often produces a discrepancy between contemporary usage and that which has been accepted, over time, as being standard or "correct". Linguists tend to view prescriptive grammars as having little justification beyond their authors' aesthetic tastes, although style guides may give useful advice about standard language employment, based on descriptions of usage in contemporary writings of the same language. Linguistic prescriptions also form part of the explanation for variation in speech, particularly variation in the speech of an individual speaker (for example, why some speakers say "I didn't do nothing", some say "I didn't do anything", and some say one or the other depending on social context).
The formal study of grammar is an important part of children's schooling from a young age through advanced learning, though the rules taught in schools are not a "grammar" in the sense that most linguists use, particularly as they are prescriptive in intent rather than descriptive.
Constructed languages (also called planned languages or conlangs) are more common in the modern-day, although still extremely uncommon compared to natural languages. Many have been designed to aid human communication (for example, naturalistic Interlingua, schematic Esperanto, and the highly logic-compatible artificial language Lojban). Each of these languages has its own grammar.
Syntax refers to the linguistic structure above the word level (for example, how sentences are formed) – though without taking into account intonation, which is the domain of phonology. Morphology, by contrast, refers to the structure at and below the word level (for example, how compound words are formed), but above the level of individual sounds, which, like intonation, are in the domain of phonology.  However, no clear line can be drawn between syntax and morphology. Analytic languages use syntax to convey information which is encoded by inflection in synthetic languages. In other words, word order is not significant and morphology is highly significant in a purely synthetic language, whereas morphology is not significant and syntax is highly significant in an analytic language. For example, Chinese and Afrikaans are highly analytic, thus meaning is very context-dependent. (Both have some inflections, and both have had more in the past; thus, they are becoming even less synthetic and more "purely" analytic over time.) Latin, which is highly synthetic, uses affixes and inflections to convey the same information that Chinese does with syntax. Because Latin words are quite (though not totally) self-contained, an intelligible Latin sentence can be made from elements that are arranged almost arbitrarily. Latin has a complex affixation and simple syntax, whereas Chinese has the opposite.
Prescriptive grammar is taught in primary and secondary school. The term " grammar school" historically refers to a school (attached to a cathedral or monastery) that teaches Latin grammar to future priests and monks. In its earliest form, "grammar school" referred to a school that taught students how to read, scan, interpret, and declaim Greek and Latin poets (including Homer, Virgil, Euripides, and others). These should not be mistaken for the related, albeit distinct, modern British grammar schools.
A standard language is the dialect which is promoted above other dialects in writing, education and, broadly speaking, in the public sphere; it contrasts with vernacular dialects, which may be the objects of study in academic, descriptive linguistics but which are rarely taught prescriptively. The standardized " first language" taught in primary education may be subject to political controversy, because it may sometimes establish a standard defining nationality or ethnicity.
Recently, efforts have begun to update grammar instruction in primary and secondary education. The main focus has been to prevent the use of outdated prescriptive rules in favor of setting norms based on earlier descriptive research and to change perceptions about relative "correctness" of prescribed standard forms in comparison to non-standard dialects.
The preeminence of Parisian French has reigned largely unchallenged throughout the history of modern French literature. Standard Italian is not based on the speech of the capital, Rome, but on the speech of Florence because of the influence Florentines had on early Italian literature. Likewise, standard Spanish is not based on the speech of Madrid, but on that of educated speakers from more northern areas such as Castile and León (see Gramática de la lengua castellana). In Argentina and Uruguay the Spanish standard is based on the local dialects of Buenos Aires and Montevideo ( Rioplatense Spanish). Portuguese has, for now, two official standards, respectively Brazilian Portuguese and European Portuguese.
The Serbian variant of Serbo-Croatian is likewise divided; Serbia and the Republika Srpska of Bosnia and Herzegovina use their own distinct normative subvarieties, with differences in yat reflexes. The existence and codification of a distinct Montenegrin standard is a matter of controversy, some treat Montenegrin as a separate standard lect and some think that it should be considered another form of Serbian.
Norwegian has two standards, Bokmål and Nynorsk, the choice between which is subject to controversy: Each Norwegian municipality can either declare one as its official language or it can remain "language neutral". Nynorsk is backed by 27 percent of municipalities. The main language used in primary schools, chosen by referendum within the local school district, normally follows the official language of its municipality. Standard German emerged from the standardized chancellery use of High German in the 16th and 17th centuries. Until about 1800, it was almost exclusively a written language, but now it is so widely spoken that most of the former German dialects are nearly extinct.
Standard Chinese has official status as the standard spoken form of the Chinese language in the People's Republic of China (PRC), the Republic of China (ROC) and the Republic of Singapore. Pronunciation of Standard Chinese is based on the local accent of Mandarin Chinese from Luanping, Chengde in Hebei Province near Beijing, while grammar and syntax are based on modern vernacular written Chinese.
- Ambiguous grammar
- Constraint-based grammar
- Linguistic error
- Harmonic Grammar
- Higher order grammar (HOG)
- Linguistic typology
- Speech error (slip of the tongue)
- Usage (language)
- Traditionally, the mental information used to produce and process linguistic utterances is referred to as "rules". However, other frameworks employ different terminology, with theoretical implications. Optimality theory, for example, talks in terms of "constraints", while construction grammar, cognitive grammar, and other "usage-based" theories make reference to patterns, constructions, and "schemata"
- O'Grady, William; Dobrovolsky, Michael; Katamba, Francis (1996). Contemporary Linguistics: An Introduction. Harlow, Essex: Longman. pp. 4–7, 464–539. ISBN 978-0-582-24691-1.
- Holmes, Janet (2001). An Introduction to Sociolinguistics (second ed.). Harlow, Essex: Longman. pp. 73–94. ISBN 978-0-582-32861-7.; for more discussion of sets of grammars as populations, see: Croft, William (2000). Explaining Language Change: An Evolutionary Approach. Harlow, Essex: Longman. pp. 13–20. ISBN 978-0-582-35677-1.
- Rodney Huddleston and Geoffrey K. Pullum, 2002, The Cambridge Grammar of the English Language. Cambridge (UK): Cambridge University Press, p. 627f.
- Lundin, Leigh (23 September 2007). "The Power of Prepositions". On Writing. Cairo: Criminal Brief.
- Jeremy Butterfield, (2008). Damp Squid: The English Language Laid Bare, Oxford University Press, Oxford. ISBN 978-0-19-957409-4. p. 142.
- Harper, Douglas. "Grammar". Online Etymological Dictionary. Retrieved 8 April 2010.
- The Editors of Encyclopaedia Britannica (2013). Ashtadhyayi, Work by Panini. Encyclopædia Britannica. Retrieved 23 October 2017., Quote: "Ashtadhyayi, Sanskrit Aṣṭādhyāyī (“Eight Chapters”), Sanskrit treatise on grammar written in the 6th to 5th century BCE by the Indian grammarian Panini."
- McGregor, William B. (2015). Linguistics: An Introduction. Bloomsbury Academic. pp. 15–16. ISBN 978-0-567-58352-9.
- Casson, Lionel (2001). Libraries in the Ancient World. New Haven, Connecticut: Yale University Press. p. 45. ISBN 978-0-300-09721-4.CS1 maint: ref=harv ( link)
- G. Khan, J. B. Noah, The Early Karaite Tradition of Hebrew Grammatical Thought (2000)
- Pinchas Wechter, Ibn Barūn's Arabic Works on Hebrew Grammar and Lexicography (1964)
- Schäfer, Roland (2016). Einführung in die grammatische Beschreibung des Deutschen (2nd ed.). Berlin: Language Science Press. ISBN 978-1-537504-95-7.
- Butler, Christopher S. (2003). Structure and Function: A Guide to Three Major Structural-Functional Theories, part 1 (PDF). John Benjamins. pp. 121–124. ISBN 9781588113580. Retrieved 19 January 2020.
- Gussenhoven, Carlos; Jacobs, Haike (2005). Understanding Phonology (second ed.). London: Hodder Arnold. ISBN 978-0-340-80735-4.
- "National Grammar Day: Brought to you by Grammar Girl and the Society for the Promotion of Good Grammar".
- American Academic Press, The (ed.). William Strunk, Jr., et al. The Classics of Style: The Fundamentals of Language Style From Our American Craftsmen. Cleveland: The American Academic Press, 2006. ISBN 0-9787282-0-3.
- Rundle, Bede. Grammar in Philosophy. Oxford: Clarendon Press; New York: Oxford University Press, 1979. ISBN 0-19-824612-9.
|Look up grammar in Wiktionary, the free dictionary.|
|German Wikisource has original text related to this article:|
- Sayce, Archibald Henry (1911). Encyclopædia Britannica (11th ed.). .
- Grammar from the Oxford English Dictionary
|Wikimedia Commons has media related to Grammar.|
|Wikiquote has quotations related to: Grammar|