A subset of a finite Cartesian product specifies which tuples of elements satisfy a relation. A first-order structure interprets a relation symbol with argument places as such a subset of the -fold Cartesian product of its domain of a first-order structure. For two argument places this is a binary relation; for three, the set of triples satisfying is an example involving addition.
A binary relation on a set is a subset of .
A binary relation is right Euclidean when any two successors of the same element are related in the indicated order. A reflexive relation with this property is an equivalence relation: reflexivity gives symmetry, and symmetry followed by the Euclidean property gives transitivity. Without reflexivity, even the empty binary relation is Euclidean.
Reversing every ordered pair of a binary relation. Swapping the two components is its own inverse and therefore preserves distinctness of a representation by a list of distinct pairs.
For a binary relation on a set , define and for nonnegative integers , using composition of relations. A pair belongs to precisely when a sequence has for every . This follows by mathematical induction, splitting off one step in the recurrence. Thus records paths with exactly steps, rather than at most steps. The union is the transitive closure of a relation; including gives its reflexive transitive closure. The powers of a single relation agree under the two common composition-order conventions.
Two expressions are equal when they denote the same mathematical object. An equality test in a program implements a specified comparison of represented values; for example, approximate floating-point arithmetic comparison is not identical to exact equality of real numbers.
A binary relation is serial when every domain element has at least one outgoing related element. A serial relation may have cycles; combining seriality with an irreflexive relation and a transitive relation instead forces a nonempty domain to be infinite, by the infinite-model property of a serial strict partial order.
A binary relation is irreflexive when no element is related to itself. An irreflexive relation that is also a transitive relation is a strict partial order. Transitivity then excludes every finite directed cycle, since a cycle would imply at its starting element.
A binary relation is irreflexive exactly when it contains no diagonal pair . Its negation requires at least one diagonal pair, whereas a reflexive relation requires every diagonal pair.
Represent a binary relation on an -element finite set by its zero-one incidence matrix. If no column may be empty, each column has choices. Apply the inclusion-exclusion principle to empty rows: fixing empty rows leaves allowed matrices. Summing over those row sets with alternating signs yields the displayed count.
A weak preference relation records that one alternative is at least as desirable as another. Rational preferences are complete and transitive. Their strict preference and indifference relation are the asymmetric and symmetric parts. On a consumption space, continuity is expressed by a closed set of weakly ranked pairs.
A preference relation on lotteries is complete when every pair is comparable, allowing an indifference relation. Completeness does not require strict ranking of distinct lotteries. Together with a transitive relation, it gives the ordering assumption in the Von Neumann-Morgenstern utility theorem.
This is the Fell topology restricted to closed graphs of complete, transitive, continuous preference relations. Both the upper limit condition and approximation of every limiting weak comparison are needed. A large limiting indifference class can make the second requirement stronger than convergence of numerical utility differences.
On the utility functions converge uniformly on every bounded set to . Their preference relations remain the usual order, while the limiting utility function makes all pairs indifferent. The weak comparison in the limit cannot be approximated by comparisons from the varying graphs. Uniform convergence does guarantee the upper graph-limit condition, because convergent pairs remain in a fixed bounded set.
For a preorder, the indifference relation is an equivalence relation. Passing to its equivalence classes removes ties and produces a partial order.
The strict preference associated with a weak preference relation retains comparisons that do not hold in the reverse direction.
This convention composes paths in their written order; some sources instead reverse that convention. Composition of relations is associative. Taking inverse relations reverses the order: .
If and , then . A witness joining a pair through and then also joins it through the larger relations. If both and are reflexive relations on the same set, inserting an identity step gives , so monotonicity also gives .
If and expose only membership predicates, composition requires finding whether some middle value satisfies both. A complete finite enumeration of makes the query decidable by scanning until a witness is found or all values fail. Without an enumeration or equivalent access operation, generic membership oracles do not supply enough information: a finite query transcript can agree with an all-false case yet omit a fresh middle witness that makes composition true. Known finiteness is not the same as an available traversal. A separate carrier argument preserves the variance of the base predicate interfaces.
A relation on is reflexive when for every .
The reflexive closure of a binary relation is , where . Every reflexive relation containing must contain the diagonal, so this is the least such extension.
A relation is symmetric when implies .
The symmetric closure of a binary relation is , where means . Every symmetric relation containing contains all these reversed pairs, proving minimality.
A relation is antisymmetric when and together imply .
The property of a binary relation that opposite directed relationships between two elements can hold only when those elements are equal. It does not require every pair to be comparable and does not prohibit a longer directed cycle whose reverse edges are initially absent. Taking reflexive transitive closure can therefore destroy this property.
The union of two antisymmetric relations need not be an antisymmetric relation. On , take and . Each is an antisymmetric relation, but contains both directions between distinct elements. This counterexample shows why testing each binary relation separately does not control cross-pairs in their union.
A relation is transitive when and imply .
The transitive closure of a relation connects to when a finite nonempty chain of -steps leads from to . Concatenation proves transitivity, and induction along a chain shows that any transitive relation containing contains . This concerns closure of a relation, rather than the transitive closure of a set under membership.
An equivalence relation says which set elements should count as the same for a particular purpose. In modular arithmetic, for example, distinct integers with the same remainder are equivalent. The relation gathers interchangeable set elements into equivalence classes; the quotient set then treats each whole equivalence class as one object.
Formally, an equivalence relation on a set is a binary relation , written , satisfying three conditions for all :
These conditions make the equivalence classes a partition of a set: each set element belongs to exactly one class. [ref]
For a worked example, take the finite set and restrict integer congruence modulo three to :
Reflexivity follows because . The symmetric relation property follows by changing the sign of a difference, and transitivity follows by adding and : divisibility by three is preserved in both steps. Thus and force . The three equivalence classes are , and . Their members alternate along the number line; membership in an equivalence class need not mean being close together.
Figure 1.
Congruence modulo three divides the integers from zero through eight into three equivalence classes
. Details.
The transitivity requirement rules out a tempting alternative. On , define nearness by the absolute value condition . This binary relation is reflexive and symmetric, but is near and is near while is not near . Its neighborhoods , and overlap without being equal. They are not equivalence classes or a partition of a set.
A congruence relation on a first-order structure is an equivalence relation compatible with each interpreted function and relation. Equivalent input tuples give equivalent function outputs, and an atomic relation has the same truth value on equivalent input tuples. This compatibility makes the functions and relations well-defined on the quotient set. In a Henkin term model with equality, membership of a formal equality in the maximal consistent theory gives precisely the equivalence relation used for this quotient.
Using the left-to-right convention for composition of relations, two equivalence relations have an equivalence-relation composite exactly when . Its inverse is . Commutation gives , proving transitivity. Every equivalence relation containing contains their two-step composite, so this is their least common extension.
// Destination: combinatorics.bigb
For two equivalence relations on the same set, their composite contains each and is reflexive. It is symmetric exactly when the relations commute. It is transitive exactly when , which by inversion is also equivalent to commutation. Under these conditions the composite is the smallest equivalence relation containing both. For congruences modulo on the integers, their composite is congruence modulo .
// Target: combinatorics.bigb
The equivalence closure of a binary relation is the least equivalence relation containing it. Add diagonal and reversed pairs, then connect points by finite chains. Constant chains prove reflexivity, reversed chains prove symmetry, and concatenated chains prove transitivity. Any equivalence relation extending contains every such chain endpoint by induction.
A union of equivalence relations on the same set is reflexive and symmetric, but can fail transitivity. On a three-point set, partitions into blocks and make the union relate to and to without relating to . An equivalence relation containing both requires transitive closure as well.
The intersection of any family of equivalence relations on one set is an equivalence relation. Reflexivity and symmetry hold in every component. A pair of consecutive related points belongs to every component, so each component's transitivity supplies the required final pair. Its equivalence classes refine the component partitions. The empty intersection is the universal relation.
For positive integers , partition the nonnegative integers by equality of and separately by equality of . The intersection of equivalence relations gives nonempty intersections of these consecutive blocks. Its boundaries occur at multiples of either or .
Let . Translating by increases the two floor quotients by the fixed integers and , so it preserves all within-block equalities and all block boundaries. Thus the refinement repeats in intervals of length . If lists the multiples of or within one period, its blocks are exactly for and . The pattern repeats, but blocks in different periods remain distinct equivalence classes.
An equivalence relation on the natural numbers is co-computably enumerable when its complement as a set of pairs is computably enumerable. Inequivalence can then be positively recognized, even when equivalence cannot be decided. This is sufficient for a semidecidable least-representative transversal.
For a co-computably enumerable equivalence relation, the least element of each equivalence class forms a complete transversal of a set family. Membership is semidecidable: run the finitely many inequivalence tests against smaller numbers in parallel and accept when all succeed. Infinitely many classes are needed only to make the resulting transversal infinite.
Two functions and , whose domains lie in one ambient set, are equivalent modulo finite changes when is a finite set and the functions disagree at only finitely many points of . The symmetric difference inclusion handles domains in a transitive chain. An exceptional set for values must also include points of absent from the middle domain ; these lie in the finite difference .
An equivalence class collects all the set elements indistinguishable from a specified set element under an equivalence relation. For an equivalence relation on a set , the precise definition is
The ambient set matters: a finite class for integer congruence restricted to differs from the infinite residue class for the same integer congruence on all integers. We write when the equivalence relation and ambient set are clear.
In the finite modulo-three example,
There are nine names but only three distinct equivalence classes. In particular, , whereas : the first statement is membership of a set element; the second is equality of two sets.
For any equivalence relation on , the essential rule is
Reflexivity puts in , so the equivalence classes are nonempty and cover . If two equivalence classes share , the symmetric relation property and transitivity relate their defining elements through ; transitivity then makes their members coincide. Thus distinct equivalence classes are disjoint, giving a partition of a set. Conversely, declare two set elements equivalent when they belong to the same block of a partition of a set. The three relation properties follow immediately and its equivalence classes recover the blocks. [ref]
An equivalence class representative is any set element belonging to that equivalence class. In the finite modulo-three example, either , or represents . Changing the equivalence class representative changes its name but preserves the equivalence class itself. Choosing gives one representative of an equivalence class from each class; the quotient set consists of the three whole sets.
Every function induces an equivalence relation on by exactly when . Reflexivity, symmetry, and transitivity follow from the corresponding properties of equality in ; the equivalence classes are the nonempty fibers of .
Positive integers are equivalent when they have the same finite set of prime factors. Equivalently, each divides a positive power of the other. This equivalence relation is induced by the radical of an integer; its equivalence classes correspond to finite prime supports. The empty support gives the singleton , and every nonempty support gives an infinite class by varying exponents.
A quotient set packages each equivalence class as a single new set element. It remembers which class an original set element belongs to and forgets which member of that class it was. For an equivalence relation on a set ,
Each set element of the quotient set is itself a nonempty subset of . The canonical projection of a quotient set sends an original set element to this entire equivalence class. [ref]
For integer congruence modulo three restricted to , the quotient set is
It has cardinality three. The set is a choice of equivalence class representatives, not literally this quotient set: is an integer, while is a set. The function sending each chosen equivalence class representative to its equivalence class is a bijection between these two different sets.
Figure 1.
The quotient projection sends nine elements to three classes, with each class appearing as one fiber
. Details.
A quotient set alone specifies no arithmetic. To obtain the familiar modular arithmetic example with addition, use integer congruence on the whole set of integers. Its quotient set is , where is an infinite residue class. Define addition by
The answer must be independent of the equivalence class representatives. If and , then , so both sums have the same residue class. This is what it means for the group operation to be well-defined. With this addition, the quotient set is a cyclic group, with identity and inverse for . [ref]
For example, . Choosing and as different representatives of an equivalence class for gives the same sum; choosing and gives again. These calculations use residue classes of all integers. Raw addition on the finite does not stay in : . The formula for addition on therefore cannot be applied as a raw inherited operation on that finite example.
The canonical projection of a quotient set is the function . It is surjective: every set element of is for some . Two set elements have the same image exactly when they are related by the equivalence relation. Its fibers are precisely the equivalence classes:
Here the left side is the preimage of a singleton subset of the quotient set; its members are the original set elements in the class . In the diagram, the three arrows arriving at start at , and .

Articles by others on the same topic (1)

A **finitary relation** in mathematics, particularly in the context of formal logic, set theory, and database theory, refers to a relationship that involves a finite number of elements. More precisely, a relation can be thought of as a subset of a Cartesian product of sets, and when we specify that a relation is finitary, we mean that it is defined for a finite number of tuples.