A relation records which things are connected to which. “Is less than”, “divides”, “has the same remainder as”, “is a friend of”, “is a prerequisite of” — each is simply a set of ordered pairs. It is the same raw material as Chapter 7: a function is a special relation (every input related to exactly one output), so here we drop that restriction and study connection in full generality. Relations are the backbone of databases, graphs, equality up to a rule, and modular arithmetic.
The thread. Section 8.1 defines a relation and gives three equivalent pictures — the arrow diagram, the 0/1 matrix, and the directed graph — plus domain, range, inverse and complement. Section 8.2 asks three yes/no questions about a relation on one set — reflexive, symmetric, transitive — shows what each looks like in the graph, and how to prove and disprove them; then it builds the smallest fix, the closure. Section 8.3 combines all three into an equivalence relation, the exact idea of “being the same in some respect”, which cuts a set cleanly into classes.
That one line is the whole idea: a relation is a chosen set of ordered pairs. Chapter 6 built A × B (every possible pair); a relation simply selects the pairs you care about. Because it is a set, the language of sets — subset, union, intersection, complement — transfers to relations directly.
The 8.1.1 explorer prints R⁻¹ for whatever you type. A relation that satisfies R⁻¹ = R is precisely a symmetric one — the first hint that the next section’s properties are really statements about this algebra of relations.
For a relation on one set A, three properties come up everywhere. Each is a statement about all elements, so you prove it by arguing an arbitrary case and disprove it with a single counterexample. Crucially, each has a picture in the directed graph — learn the picture and the verdict becomes something you can see.
The negations tell you exactly what a counterexample looks like — you only need one:
The shape is always the same: to prove a “for all” property, start from an arbitrary case using the definition and derive the conclusion; to disprove it, produce a single concrete failure.
Beyond the core three, two more properties are worth recognising — they are what turn “divides” and “≤” into orderings rather than equivalences:
Reflexive + antisymmetric + transitive defines a partial order (Section 8.5); reflexive + symmetric + transitive defines an equivalence relation (Section 8.3, next). Same three slots, two famous combinations.
The reason equivalence relations matter so much is that they are exactly the tool for grouping: deduplicating records by a key, bucketing by a hash, identifying states in an automaton, reducing fractions (every fraction names one rational number, and “equals the same rational” is an equivalence relation). The grouping is never arbitrary — it is forced to be a clean split:
The partition theorem rests on three short facts. They are worth seeing because they show where each of the three properties is used.
Together: the classes are non-empty (Lemma 1), they cover A (Lemma 1), and any two are equal or disjoint (Lemma 3) — the definition of a partition.