A Complete Interactive Course · with GNU Octave

Lingui/stɪks/

The scientific study of human language — its sounds, structures, meanings, and life in the world — taught with a clickable IPA chart, a live syntax parser, and quantitative labs you can run.

Chapter 00

00What Linguistics Is

Linguistics is the scientific study of language: not the mastery of many languages (that's a polyglot), but the systematic investigation of how language works in the human mind and in human societies. Linguists ask what all languages share, how they differ, how children acquire them effortlessly, and how they change over time.

Descriptive, not prescriptive Linguistics is descriptive: it describes how people actually speak, not how some authority says they ought to. "Ain't" and double negatives are studied as rule-governed features of particular varieties, not "errors." A construction is grammatical if native speakers produce and accept it — the grammar lives in the speaker, not in a style manual.

The field is organized as a layered hierarchy, each level built on the one below. We'll climb it in order:

LevelUnit of studyCore question
Phoneticsspeech sounds (physical)How are sounds produced and heard?
Phonologysound systems (mental)How do sounds pattern in a language?
Morphologyword structureHow are words built from pieces?
Syntaxsentence structureHow do words combine into phrases?
Semanticsliteral meaningWhat do words and sentences mean?
Pragmaticsmeaning in useHow does context shape meaning?
Hockett's design features What makes human language special? Among the design features linguist Charles Hockett identified: arbitrariness (no natural link between "dog" and dogs), productivity (we generate sentences never before uttered), discreteness (a finite set of sounds recombine endlessly), displacement (we talk about the past, the future, the absent, the fictional), and duality of patterning (meaningless sounds combine into meaningful units). Together these give language its open-ended power.
Chapter 01

01Phonetics — The Sounds of Speech

Phonetics studies the physical reality of speech sounds (phones): how they are articulated, their acoustic properties, and how they are perceived. Because ordinary spelling is wildly inconsistent — English "ough" has six pronunciations — linguists use the International Phonetic Alphabet (IPA), where one symbol always maps to one sound.

Articulatory phonetics: describing a consonant

Every consonant is pinned down by three coordinates:

The three dimensions of a consonant

1. Voicing — do the vocal folds vibrate? /z/ is voiced; /s/ is voiceless. (Put a finger on your throat and alternate "sss"–"zzz".)

2. Place of articulation — where the airflow is constricted: lips (bilabial /p b m/), teeth (dental /θ ð/), the alveolar ridge (/t d s/), the soft palate (velar /k g/), and more.

3. Manner of articulation — how the airflow is shaped: full closure (plosive /p t k/), turbulent friction (fricative /f s ʃ/), nasal airflow (/m n ŋ/), or near-open (approximant /ɹ l j w/).

So /b/ is "a voiced bilabial plosive" and /ʃ/ (the "sh" in ship) is "a voiceless postalveolar fricative." The interactive chart in the next chapter speaks every sound.

Vowels & acoustic phonetics

Vowels are open sounds shaped by tongue position, described by height (high /i/ vs. low /ɑ/), backness (front /i/ vs. back /u/), and lip rounding. Acoustically, each vowel has characteristic resonant frequencies called formants: the first two, F1 (inversely tracks height) and F2 (tracks frontness), are enough to identify most vowels — which is why we can plot the whole vowel inventory on a 2-D chart, as the lab below does in Octave.

Chapter 02 · Interactive Tool

The IPA Explorer & Vowel Space

Click any consonant to see its full articulatory description and hear an English example word. (Audio uses your device's speech synthesis — example words, not the bare symbol.)

Pulmonic Consonants (English subset)
Click a symbol above…

And here is the vowel space — front is left, high is top, exactly mirroring tongue position in the mouth. Click a vowel to hear its example word and read its formants.

The Vowel Quadrilateral (F1 × F2)
Click a vowel dot…
Chapter 03

03Phonology — The System Behind the Sounds

Phonetics catalogues every possible sound; phonology studies how a particular language organizes sounds into a mental system. The key abstraction is the phoneme: a sound that distinguishes meaning.

Phoneme vs. allophone

A phoneme is a contrastive sound unit, written in /slashes/. Its predictable physical variants are allophones, written in [brackets]. English /p/ is aspirated [pʰ] in pin but plain [p] in spin — same phoneme, two allophones in complementary distribution (each appears only where the other can't).

How do we find a language's phonemes? The minimal pair test: two words differing in exactly one sound and one meaning prove those sounds are separate phonemes.

Minimal pairs pat / bat/p/ vs /b/ are phonemes (voicing contrast). ship / sip/ʃ/ vs /s/. bit / bet / bat / but / bought → five vowel phonemes from one frame. If swapping a sound never changes meaning anywhere, it's an allophone, not a phoneme.

Phonology also studies phonological rules (e.g. assimilation — the negative prefix surfaces as in-possible → im-possible before a bilabial), syllable structure (onset–nucleus–coda; the sonority sequencing principle governs which clusters are legal), and suprasegmentals like stress and tone. In Mandarin, tone is phonemic: (mother) vs (horse) differ only in pitch contour.

Chapter 04

04Morphology — The Structure of Words

Morphology studies the internal structure of words, built from morphemes — the smallest units that carry meaning or grammatical function.

Kinds of morpheme

Free morphemes stand alone (book, run, happy). Bound morphemes must attach to something (un-, -s, -ed, -ly).

Roots carry the core meaning; affixes (prefixes, suffixes, infixes, circumfixes) modify it.

Derivational affixes create new words, often changing category: happyhappi-ness (adj → noun). Inflectional affixes mark grammatical features without changing category or core meaning: catcat-s, walkwalk-ed. English has only eight inflectional suffixes; derivation is open-ended.

So unbelievably = un- (negative prefix) + believe (root) + -able (adj-forming) + -ly (adverb-forming) — four morphemes, built up in layers. The analyzer below shows this for many words.

Morphological typology

Languages package morphemes differently — a spectrum:

TypeIdeaExample
Isolatingone morpheme per wordMandarin Chinese
Agglutinativemany morphemes, cleanly separableTurkish, Swahili, Japanese
Fusionalone affix fuses several meaningsSpanish, Russian, Latin
Polysyntheticwhole sentences in one wordInuktitut, Mohawk
Chapter 05 · Interactive Tool

The Morpheme Analyzer

Click a word to break it into its morphemes, colour-coded by type, with a gloss of each piece and how the meaning is assembled.

Word Decomposition
Click a word above…
Legend: rootprefixsuffix
Chapter 06

06Syntax — How Words Combine

Syntax studies how words assemble into phrases and sentences according to rules every native speaker knows unconsciously. We sense that "the dog chased the cat" is well-formed and "chased dog the cat the" is not, without ever being taught why.

Constituency & phrase structure

Sentences aren't flat strings — they have hierarchical structure. Words group into constituents (phrases) that behave as units. In "the small dog," the words form a noun phrase (NP) you can replace with a single pronoun ("it") or move as a block. We capture this with phrase-structure rules:

A small grammar of English

S  → NP VP
NP → Det Nom | Pronoun | NP PP
Nom → Adj Nom | N
VP → V NP | VP PP | V
PP → P NP

These few rules are recursive — NP contains PP which contains NP — so a finite grammar generates infinitely many sentences. That recursion is the engine of linguistic productivity.

Structural ambiguity

When one string fits more than one tree, it has two meanings. "I saw the man with the telescope" can mean I used a telescope (the PP attaches to the verb phrase) or the man had a telescope (the PP attaches to the noun phrase). Same words, two structures — the parser below draws both.

Beyond phrase structure Modern syntax adds X-bar theory (all phrases share a head-driven template), movement/transformations (relating "You saw who?" to "Who did you see?"), and the search for Universal Grammar — the innate structural scaffolding Chomsky argued underlies every human language.
Chapter 07 · Interactive Tool

The Syntax-Tree Parser

Type a sentence using the toy lexicon below; a real chart parser builds every valid phrase-structure tree and draws it. Ambiguous sentences yield multiple trees — switch between them to see how structure encodes meaning.

Lexicon (mix and match) Det: the, a, an, my, this · N: dog, cat, man, woman, telescope, boy, ball, park, pajamas, elephant · Pronoun: I, he, she, it, they · V: saw, chased, ate, hit, watched, shot · Adj: old, big, small, red, hungry · P: with, in, on, by, near
Phrase-Structure Parser
simple ambiguous PP ambiguous PP 2 stacked adjectives
Chapter 08

08Semantics — Literal Meaning

Semantics studies meaning that is built into words and structures, independent of context. It splits into the meaning of words (lexical semantics) and how meanings combine (compositional semantics).

Lexical relations

RelationMeaningExample
Synonymysame meaningbig / large
Antonymyoppositehot / cold
Hyponymykind-of (subtype)rose is a hyponym of flower
Meronymypart-ofwheel is a meronym of car
Polysemyone word, related senses"head" (body / of a company)
Homonymyone form, unrelated senses"bank" (river / money)

A key distinction is sense vs reference: "the morning star" and "the evening star" have different senses but the same referent (Venus). Sense is the concept; reference is the thing picked out in the world.

The bridge to logic Compositional semantics often uses predicate logic as its meaning representation. "Every student laughed" becomes ∀x (Student(x) → Laughed(x)); "some dog barked" becomes ∃x (Dog(x) ∧ Barked(x)). The principle of compositionality — the meaning of a whole is a function of the meanings of its parts and how they combine — lets a finite vocabulary yield infinite meanings, mirroring syntactic recursion. (See the companion Predicate Logic course.)
Chapter 09

09Pragmatics — Meaning in Context

Pragmatics studies how context supplies meaning beyond the literal. "It's cold in here" can mean, on its surface, a fact about temperature — but do the work of a request to close the window.

Core phenomena

Deixis — words whose reference depends on the utterance situation: I, you, here, now, this, tomorrow. ("Meet me here tomorrow" is useless on a note with no time or place.)

Speech acts (Austin, Searle) — utterances do things: asserting, promising, warning, christening. "I now pronounce you married" doesn't describe an act; it performs one.

Presupposition — background taken for granted: "Have you stopped smoking?" presupposes you smoked.

Grice's cooperative principle

Paul Grice observed that conversation is cooperative, governed by four maxims: Quantity (be as informative as needed, no more), Quality (be truthful), Relation (be relevant), and Manner (be clear). We convey implicatures by appearing to flout them. If asked "How was the dinner?" and you say "Well, the candles were nice," you observe Quantity's letter while implying — without stating — that the food was not. Hearers compute the implication automatically.

Chapter 10

10Sociolinguistics — Language in Society

Sociolinguistics studies how language varies with social factors — region, class, age, gender, ethnicity, situation — and what that variation reveals.

  • Dialects are full, rule-governed varieties differing in pronunciation, vocabulary, and grammar. The line between "language" and "dialect" is political, not linguistic — "a language is a dialect with an army and a navy."
  • Registers are situational styles: you speak differently in a job interview than at a barbecue. Shifting between them is code-switching.
  • Variation is structured. William Labov's studies showed that features like dropping post-vocalic /r/ correlate systematically with class and formality — variation follows patterns, never chaos.
  • Prestige & change. "Standard" varieties carry overt prestige, but non-standard forms carry covert prestige (identity, solidarity) and often drive language change from below.
No variety is "better" Every natural variety is equally systematic and expressive. Judgments that one dialect is "lazy" or "incorrect" are social attitudes about its speakers, not linguistic facts about the variety.
Chapter 11 · with Interactive Tool

11Historical Linguistics & Cognates

Historical linguistics studies how languages change and how they are related. Change is constant and largely regular — especially sound change, which tends to apply across the board.

Grimm's Law A systematic consonant shift separating Germanic from the rest of Indo-European: Proto-Indo-European *p, *t, *k became f, θ, h. That's why Latin pater / tres / cornu correspond to English father / three / horn. Regular correspondences like these are the fingerprints of common descent.

The comparative method uses sets of cognates — words descended from a common ancestor — to reconstruct unattested proto-languages and to build the family tree of languages (Indo-European, Sino-Tibetan, Niger-Congo, Austronesian, and more). Cognates often look similar but have diverged by regular changes: English night, German Nacht, Latin nox/noct-.

One quantitative handle on similarity is edit distance (Levenshtein distance): the minimum number of insertions, deletions, and substitutions to turn one word into another. Dialectometry and computational historical linguistics use it to measure relatedness. Try it:

Edit-Distance / Cognate Comparator
night / Nacht three / drei water / Wasser father / pater kitten / sitting
Chapter 12

12Language, Acquisition & the Mind

Psycholinguistics studies how language is processed, stored, and acquired in the brain.

First-language acquisition

Children master their native language with astonishing speed and uniformity — babbling by 6 months, first words around 1 year, two-word combinations by 2, and complex grammar by 4 or 5 — without explicit instruction and on impoverished input. They overregularize ("goed," "foots"), revealing that they extract rules rather than merely imitating. This led Chomsky to posit an innate Language Acquisition Device and the poverty of the stimulus argument: children know more than the input alone could teach.

The critical period The ability to acquire language natively appears to decline sharply after puberty (the critical period hypothesis), evidenced by late learners and tragic cases of early deprivation. Second-language learning past this window rarely reaches native-like grammar or accent.

Language & thought

Does the language you speak shape how you think? Strong linguistic determinism (language fixes thought) is rejected, but a weaker linguistic relativity (the Sapir–Whorf hypothesis) — that language can influence habitual cognition, e.g. in colour categorization or spatial reckoning — has modest experimental support.

The brain reflects this specialization: damage to Broca's area impairs fluent production while comprehension survives; damage to Wernicke's area yields fluent but meaningless speech — early evidence that grammar and meaning are partly distinct neural systems.

Chapter 13 · Interactive Tool

Quantitative Linguistics & Zipf's Law

Language obeys striking statistical regularities. The most famous is Zipf's law: in any large text, a word's frequency is roughly inversely proportional to its frequency rank. The most common word appears about twice as often as the second, three times as often as the third, and so on — a straight line on a log-log plot.

Paste any text below (or use the sample) to see its words ranked by frequency. Watch the steep drop-off that signals Zipf's law in action.

Zipf's Law Explorer
More language laws Heaps' law: vocabulary size grows as a sublinear power of text length (you keep meeting new words, but ever more slowly). Menzerath's law: the longer a linguistic unit, the shorter its constituents (longer words have shorter syllables). Such regularities make language a quantitative science — and connect it to the Octave lab below.
Chapter 14 · Computational Lab

14The GNU Octave Linguistics Lab

Linguistics is increasingly quantitative. Below, six runnable GNU Octave programs cover Zipf's law, edit distance, vowel formants, distinctive-feature distances, letter statistics, and distributional semantics. Run them at octave-online.net or in a local Octave.

Lab 1 — Zipf's law from a word list

zipf.m
% A small bag of words (token list). Count, rank, and check Zipf's law.
words = {'the','cat','the','dog','the','the','cat','sat','the','dog','ran','the','cat'};
[uniq,~,idx] = unique(words);
counts = accumarray(idx, 1);
[freq, order] = sort(counts, 'descend');
rank = (1:numel(freq))';

printf('rank  word     freq   rank*freq\n');
for i = 1:numel(freq)
  printf('%3d   %-7s  %3d    %3d\n', i, uniq{order(i)}, freq(i), i*freq(i));
end
% Zipf: freq ~ C / rank, so log(freq) is linear in log(rank).
loglog(rank, freq, 'o-'); xlabel('log rank'); ylabel('log frequency');
title("Zipf's law");

Lab 2 — Levenshtein edit distance (dynamic programming)

edit_distance.m
function d = edit_distance(a, b)
  m = numel(a); n = numel(b);
  D = zeros(m+1, n+1);
  D(:,1) = 0:m;  D(1,:) = 0:n;     % base cases
  for i = 2:m+1
    for j = 2:n+1
      cost = (a(i-1) != b(j-1));        % 0 if match, 1 if substitution
      D(i,j) = min([D(i-1,j)+1, D(i,j-1)+1, D(i-1,j-1)+cost]);
    end
  end
  d = D(m+1, n+1);
end

printf('night ~ nacht : %d\n', edit_distance('night', 'nacht'));
printf('three ~ drei  : %d\n', edit_distance('three', 'drei'));
printf('water ~ wasser: %d\n', edit_distance('water', 'wasser'));

Lab 3 — The vowel space (formant plot)

vowel_space.m
% Approximate F1/F2 (Hz) for English monophthongs
labels = {'i (beet)','I (bit)','E (bet)','ae (bat)','A (father)','U (book)','u (boot)'};
F1 = [280 400 550 690 710 450 310];
F2 = [2250 1920 1770 1660 1100 1030 870];

plot(F2, F1, 'o', 'MarkerSize', 8, 'MarkerFaceColor', 'r');
set(gca, 'XDir', 'reverse', 'YDir', 'reverse');   % front=left, high=top
text(F2+30, F1, labels);
xlabel('F2 (Hz) -- backness'); ylabel('F1 (Hz) -- height');
title('English vowel space');

Lab 4 — Distinctive features & phoneme distance

features.m
% Binary distinctive features:  [voiced nasal labial coronal dorsal continuant]
ph = {'p','b','m','t','d','n','k','g','s'};
M = [ 0 0 1 0 0 0;   % p  voiceless bilabial stop
      1 0 1 0 0 0;   % b
      1 1 1 0 0 0;   % m
      0 0 0 1 0 0;   % t
      1 0 0 1 0 0;   % d
      1 1 0 1 0 0;   % n
      0 0 0 0 1 0;   % k
      1 0 0 0 1 0;   % g
      0 0 0 1 0 1 ]; % s  voiceless coronal fricative

% Feature distance = number of differing features (Hamming).
printf('p vs b (voicing only) : %d\n', sum(M(1,:) != M(2,:)));
printf('p vs t (place only)   : %d\n', sum(M(1,:) != M(4,:)));
printf('p vs n (very different): %d\n', sum(M(1,:) != M(6,:)));
% Natural classes share feature columns; minimal pairs differ in one feature.

Lab 5 — Letter bigrams & type-token ratio

bigrams.m
text = 'the theme of these theories';
text = text(text != ' ');              % strip spaces
n = numel(text);

% Count letter bigrams (pairs of adjacent letters)
bg = {};
for i = 1:n-1; bg{end+1} = text(i:i+1); end
[u,~,idx] = unique(bg);
c = accumarray(idx,1);
[c,o] = sort(c,'descend');
printf('Top bigram: "%s" (x%d)\n', u{o(1)}, c(1));

% Type-token ratio: vocabulary richness (unique words / total words)
words = strsplit('the cat the dog the cat ran');
TTR = numel(unique(words)) / numel(words);
printf('Type-token ratio = %.3f\n', TTR);

Lab 6 — Distributional semantics (cosine similarity)

word_vectors.m
% "You shall know a word by the company it keeps." (Firth)
% Context-count vectors over features [furry, barks, purrs, drives, wheels]
dog = [5 4 0 0 0];
cat = [5 0 4 0 0];
car = [0 0 0 5 4];

cosine = @(u,v) dot(u,v) / (norm(u)*norm(v));
printf('sim(dog,cat) = %.3f\n', cosine(dog,cat));   % high: both animals
printf('sim(dog,car) = %.3f\n', cosine(dog,car));   % low: unrelated
% This is the seed of modern word embeddings (word2vec, GloVe).
The quantitative thread Counting (Zipf, bigrams, TTR), dynamic programming (edit distance), geometry (formants, feature vectors, cosine similarity) — the same mathematics that powers logic and data science now drives phonetics, historical linguistics, and natural-language processing.
Chapter 15 · Interactive Tool

Self-Test Quiz

Twelve questions spanning every subfield. Click an answer for instant feedback and explanation.

Score: 0 / 12
Chapter 16

16Reference & Further Study

SubfieldStudiesKey concept
Phoneticsphysical speech soundsIPA, place/manner/voicing, formants
Phonologysound systemsphoneme vs allophone, minimal pairs
Morphologyword structuremorphemes, inflection vs derivation
Syntaxsentence structureconstituency, phrase-structure rules, recursion
Semanticsliteral meaningsense/reference, compositionality
Pragmaticsmeaning in contextimplicature, speech acts, deixis
Sociolinguisticslanguage & societyvariation, register, prestige
Historicallanguage changesound change, cognates, comparative method
Psycholinguisticslanguage & mindacquisition, critical period
Computationallanguage & computationZipf's law, parsing, embeddings
Companion volumes This course completes a quartet with Symbolic Logic, Predicate Logic, and Logical Fallacies. The links are deep: phrase-structure grammars are formal systems; compositional semantics is built on predicate logic; and the parser here is a cousin of the truth-table and model evaluators in those courses.
Where to go next Dive deeper into generative syntax (Minimalism), formal semantics (lambda calculus, Montague grammar), typology (what's possible across the world's ~7,000 languages), field methods, language documentation of endangered languages, and computational linguistics / NLP.