Relation
A relation records which objects are connected to which other objects. Formally, a relation from a set to a set is a subset of the Cartesian product: If , we say that is related to .
Examples
Let and . The set is a relation from to . It says is related to both and , is related to , and is related to nothing.
A Function is a special kind of relation: every input in the Domain must be related to exactly one output. The example above is not a function, because has two outputs and has none.
Relations on one set
A relation on is a subset of . Important properties include reflexive, symmetric, transitive, and antisymmetric. These lead to equivalence relations, order relations, partitions, and quotient spaces.
Why it matters
Relations are the broad language behind equality, ordering, adjacency, graphs, and constraints. In physics, “can transition to”, “is adjacent to”, or “has the same energy as” can be modelled as relations before adding functions or dynamics.
Related: Set, Mapping, Function, Set theory index.