The compactness theorem states: a set of first-order formulas has a model if and only if every finite subset has a model. This seemingly simple result has striking consequences. It implies that first-order logic cannot express finiteness (no set of formulas says 'the domain is finite'), enables the construction of non-standard models (e.g., non-standard arithmetic), and shows that certain properties (like well-foundedness) are not first-order expressible. Compactness is the linchpin connecting finite, algorithmic proof systems to infinite model-theoretic truth.
Start with the statement and intuition. Understand that compactness is a consequence of completeness (or can be proved directly). Work through key applications: non-standard models, showing non-first-order-expressibility, combining theories. Relate to the Löwenheim-Skolem theorem and Herbrand's theorem.
You know the compactness theorem: a set of first-order sentences has a model if and only if every finite subset has a model. At first glance this seems like a technical lemma. But it is one of the most powerful tools in mathematical logic, precisely because it lets you transfer finite satisfiability to infinite models — and infinite structures can have properties that no finite structure can realize. The key move in every application is the same: build an extended theory by adding infinitely many sentences, argue that every *finite* piece of that theory has a model, then invoke compactness to get a model of the whole thing.
The flagship application is the construction of non-standard models of arithmetic. Start with the axioms of Peano arithmetic (PA), which describe the natural numbers ℕ. Add a new constant symbol c, together with the infinitely many sentences "c > 0", "c > 1", "c > 2", and so on. Every finite subset of this extended theory has a model: just take ℕ and interpret c as a natural number large enough to satisfy all the finitely many "c > k" sentences in that subset. By compactness, the *entire* extended theory has a model — but in that model, c must be larger than every standard natural number. This is an infinite element: a number greater than all of 0, 1, 2, 3,... Non-standard arithmetic is a genuine model of PA that contains "infinite integers" invisible in ℕ.
The same argument shows that first-order logic cannot express finiteness. Suppose for contradiction that some set Σ of first-order sentences characterizes exactly the finite structures. Add sentences asserting "there exist at least n distinct elements" for each n ≥ 1. Every finite subset of this augmented theory has a model (take a finite structure large enough). By compactness, the full theory has a model — which must satisfy "there are at least n elements" for all n, so it is infinite. This contradicts the assumption that Σ forces finiteness. No first-order theory can force all its models to be finite. Finiteness, well-foundedness, and Archimedean properties are all not first-order expressible — compactness is the systematic proof technique for each of these non-expressibility results.
The deeper lesson is that compactness reveals a fundamental gap between finite and infinite in first-order logic. Any property that can only be violated "at infinity" — well-foundedness of an order, the Archimedean property of a field, connectedness of a graph — cannot be captured by first-order sentences alone. Compactness always produces a model that agrees with your theory on every finite witness but fails the global property you hoped to enforce. This is why first-order logic is weaker than second-order logic: it cannot quantify over sets of elements, only individual elements, and compactness is the precise formulation of that limitation in model-theoretic terms.