/ˈsɪntæks/
[noun] The set of rules that explain how words are arranged to form correct sentences in a language. It can also refer to the rules that control how code is written in a computer programming language.
Every sentence you have ever spoken follows invisible military orders — 'syntax' literally means 'to arrange troops together.'
The story of 'syntax' begins in ancient Greece, where the verb 'tassein' meant to arrange or to put in order — a word that was used most often in a military context, describing the disciplined arrangement of soldiers into formation. From this verb, the Greeks built the compound 'syntassein', joining the prefix 'syn-' (meaning together, or with) to 'tassein', creating a word that described the act of arranging things together into a coherent whole. The noun that followed, 'syntaxis', referred to any kind of organised arrangement, whether of an army, a fleet, or a set of ideas.
Greek grammarians — scholars who were remarkably systematic in their study of language — adopted 'syntaxis' to describe the way words line up and relate to each other inside a sentence. The great Alexandrian grammarian Apollonius Dyscolus, writing in the 2nd century AD, used it in what is considered the first serious work of syntactic analysis. For these early linguists, a sentence was a kind of army: every word had its rank, its position, its duty, and the whole only worked when everything stood in the right order.
Latin scholars absorbed the word directly from Greek, keeping both the spelling and the meaning largely intact as 'syntaxis'. This was natural, since educated Romans read Greek fluently and frequently borrowed Greek technical vocabulary into Latin rather than inventing new terms. From Latin, the word passed into the learned languages of medieval and Renaissance Europe. French scholars used 'syntaxe', and the word appeared in Spanish and Italian in similarly close forms.
English acquired 'syntax' in the 16th century, primarily through the Latin form and through the French 'syntaxe', as Renaissance scholars began writing detailed grammars of English and classical languages. The earliest recorded use in English dates to around 1580, when scholars were deeply engaged in comparing Latin, Greek, and English grammar. At this point, the word was strictly a grammatical term used by educated people writing about language — far removed from everyday conversation.
Over the following centuries, 'syntax' settled comfortably into the language as a technical term of linguistics, describing the branch of grammar concerned with sentence structure rather than individual word forms (which is the domain of morphology) or meaning (semantics). Then, in the 20th century, the word underwent a remarkable second life. The rise of computer programming gave 'syntax' an entirely new audience, as coders borrowed it to describe the strict rules governing how instructions must be written for a machine to understand them. A 'syntax error' became one of the most familiar phrases in the digital world — and in doing so, the ancient Greek military metaphor found itself at home in the most modern of technologies.
What makes 'syntax' so quietly remarkable is how it carries its original meaning perfectly intact across twenty-five centuries. Arranging troops in formation and arranging words in a sentence are, in the minds of those first Greek grammarians, exactly the same kind of act — an imposition of order onto separate units so that they can function together as one. Every time a writer places a verb after a subject, or a programmer places a semicolon at the end of a line, they are, in a small way, arranging troops.