Syntax is the formal study of how words combine into phrases and sentences, governed by hierarchical rules rather than simple linear order. Sentences have internal structure — groups of words form constituents (phrases) that behave as single units in movement and substitution tests. Tree diagrams (phrase structure trees) represent this hierarchical organization visually. The rules generating these structures capture native speakers' implicit grammatical knowledge.
Practice constituency tests: substitution (can a pronoun replace the group?), movement (can the group move together?), and question formation. Draw phrase structure trees for increasingly complex sentences before attempting formal rule writing.
Consider the sentence "I saw the man with the telescope." Did you use the telescope to see him, or did the man have a telescope? Both readings are grammatically valid, and both use exactly the same words in exactly the same order. This is structural ambiguity — and it reveals something fundamental: the order of words and the hierarchical structure of a sentence are not the same thing. Two different syntactic structures can produce the same linear string of words. Syntax is the study of that structure.
Syntax formalizes the tacit knowledge that allows you to instantly recognize "Colorless green ideas sleep furiously" as grammatical (if nonsensical) and "Sleep ideas furiously green colorless" as not. This knowledge is not simply about which words can follow which other words. It is about which words form groups, how those groups are nested within larger groups, and what grammatical relations hold among them. That knowledge is hierarchical, and hierarchy is what syntax makes explicit.
Constituency tests are the empirical tools syntacticians use to identify which words form units. The substitution test asks: can this group be replaced by a single word? If "the old red barn" can be replaced by "it," then those four words form a noun phrase — a single syntactic unit. The movement test asks: can this group shift to the front of the sentence together? If "On the table" can become "On the table, the book was placed," then "on the table" is a constituent (a prepositional phrase). These tests are diagnostic — they expose structure that is invisible on the surface.
Phrase structure trees make that hidden structure visible. A sentence (S) branches into a noun phrase (NP) and a verb phrase (VP); those phrases branch into their own sub-constituents. The tree shows not just which words are present but how they are organized — which words belong to the same phrase, which phrases are embedded inside other phrases, and where modification and agreement relations apply. An ambiguous sentence has one surface string but two trees; drawing both trees is the precise way of showing what the two readings are.
A final important clarification: syntax describes structure, not correctness. Every dialect of every language has syntactic structure — regular, rule-governed constituency and hierarchical organization. "They was going" has perfectly analyzable syntactic structure, just as "They were going" does; the two differ in morphological agreement, not structural complexity. Syntax is a descriptive science of grammatical knowledge, not a prescriptive guide to formal usage. The syntactic structures you draw represent the implicit competence all native speakers have, which is far richer and more systematic than any explicit rule you learned in school.