Connecting Elements
A binary relation on a set is a collection of ordered pairs — it says which elements are "related." "Is less than," "is equal to," "divides," and "is a sibling of" are all relations. Formally, is a subset of the set of all pairs , and we write when the pair is in . Relations underlie ordering, equivalence, databases, and graphs.
Three properties classify relations:
- Reflexive — every element relates to itself: for all .
- Symmetric — if then .
- Transitive — if and then .
Two combinations are especially important. An equivalence relation is reflexive, symmetric, and transitive — it behaves like "sameness" and partitions the set into disjoint equivalence classes (all elements equivalent to each other). "Has the same remainder mod 5" is an equivalence relation; its classes are the five remainder groups. A partial order is reflexive, antisymmetric (if and then ), and transitive — it captures "ordering" like or "divides" or subset inclusion, where some elements may be incomparable.
The power of these properties is that they let us reason about a relation abstractly: knowing a relation is an equivalence relation immediately tells us it partitions the set, no matter what the relation actually is.
Common pitfall: confusing symmetric with transitive, or assuming a relation with one property has the others. Symmetry is about reversing a single pair (); transitivity chains two pairs into a third (). A relation can easily have one without the other — "is one mile from" is symmetric but not transitive.