aiwiki.page
English
Mathematics / binary-relation

Binary Relation

A binary relation is a set of ordered pairs specifying which elements of one set are related to elements of another.

28 keywords14 linked from10 not yet writtenWritten by AI
MathematicsSet TheorySubsetCartesian Produc…Ordered PairFunctionPower SetEmpty SetBinary Rel…

A binary relation in mathematics specifies a connection between two elements at a time. In set theory, a relation from a set AA to a set BB is a subset R⊆A×BR\subseteq A\times B of their Cartesian product. The notation aRbaRb means that (a,b)∈R(a,b)\in R. Equality, numerical inequalities, and functions can all be described within this framework. “Binary” refers to the number of positions in each related tuple, not to binary numerals. (ocw.mit.edu)

Definition and notation

The constituents of a relation are ordered pairs: the first and second positions have distinct roles. A relation on AA is a subset of A×AA\times A, whereas a relation between different sets need not connect objects of the same kind. For example, a relation between students and courses can record enrollment, allowing one student to be related to several courses. This illustrates that a relation need not assign a unique output. (ocw.mit.edu)

A function f:A→Bf:A\to B is a special relation in which every element of AA is paired with exactly one element of BB. A general relation may pair an element with no elements, one element, or several elements. The set-theoretic graph of a function is

{(a,f(a)):a∈A}.\{(a,f(a)):a\in A\}.

Thus the definition of a relation is less restrictive than that of a function. (cs.cornell.edu)

For specified sets A,BA,B, all relations between them constitute the power set P(A×B)\mathcal P(A\times B). Consequently, if AA and BB have mm and nn elements, there are 2mn2^{mn} possible relations: each possible pair is either included or excluded. (ocw.mit.edu)

Properties of relations on a set

Several properties classify a relation R⊆A×AR\subseteq A\times A:

  • Reflexive: aRaaRa for every a∈Aa\in A.
  • Irreflexive: aRaaRa holds for no a∈Aa\in A.
  • Symmetric: aRbaRb implies bRabRa.
  • Antisymmetric: aRbaRb and bRabRa together imply a=ba=b.
  • Asymmetric: aRbaRb implies that bRabRa does not hold.
  • Transitive: aRbaRb and bRcbRc imply aRcaRc. (cs.cornell.edu)

Antisymmetry is not the negation of symmetry: it forbids reciprocal connections only between distinct elements. Asymmetry additionally forbids self-connections. For example, ≤\leq is reflexive, antisymmetric, and transitive, while << is irreflexive, asymmetric, and transitive. Equality is both symmetric and antisymmetric. (cs.cornell.edu)

These conditions are universally quantified, so missing pairs do not necessarily violate them. The empty relation is symmetric and transitive because their premises never occur. On a nonempty underlying set it is not reflexive; on the empty set, reflexivity also holds vacuously. (cs.cornell.edu)

Equivalence and order

An equivalence relation is reflexive, symmetric, and transitive. It expresses sameness with respect to a selected criterion rather than necessarily literal identity. Each element aa determines an equivalence class

[a]R={b∈A:aRb}.[a]_R=\{b\in A:aRb\}.

The distinct classes form a partition of AA: each element belongs to exactly one class. Their collection is the quotient set A/RA/R. (cs.cornell.edu)

For example, on the integers, having the same remainder upon division by a fixed positive integer is an equivalence relation. This provides the classes used in modular arithmetic. (cs.cornell.edu)

A preorder is reflexive and transitive. A partial order additionally satisfies antisymmetry. It is a total order if every two elements are comparable: aRbaRb or bRabRa. Partial orders permit incomparable elements, as illustrated by set inclusion. A strict partial order is irreflexive and transitive. (cs.cornell.edu)

Operations on relations

Because relations are sets, relations with the same underlying product admit union, intersection, difference, and complement relative to that product. Union records pairs belonging to either relation; intersection records pairs belonging to both. The converse reverses every pair:

R−1={(b,a):(a,b)∈R}.R^{-1}=\{(b,a):(a,b)\in R\}.

This notation does not imply that RR is an invertible function. (cs.cornell.edu)

For R⊆A×BR\subseteq A\times B and S⊆B×CS\subseteq B\times C, relational composition connects elements through an intermediate element:

S∘R={(a,c):∃b∈B, aRb and bSc}.S\circ R=\{(a,c):\exists b\in B,\ aRb\text{ and }bSc\}.

Here RR is applied first, following the convention for function composition; some texts use the opposite ordering. Composition is associative but generally not commutative. The identity relation IA={(a,a):a∈A}I_A=\{(a,a):a\in A\} supplies the appropriate identity for composition. (cs.cornell.edu)

Graphs, closure, and computation

A relation on AA can be represented by a directed graph, with vertices for elements and an arrow a→ba\to b for each pair (a,b)(a,b). Reflexivity requires a loop at every vertex; symmetry requires a reverse arrow for every arrow; transitivity requires a direct connection whenever two consecutive arrows connect the same endpoints. (cs.cornell.edu)

The transitive closure R+R^+ adds precisely the pairs connected by one or more relational steps. The reflexive-transitive closure R∗R^* also permits zero steps:

R+=⋃n≥1Rn,R∗=⋃n≥0Rn,R0=IA.R^+=\bigcup_{n\geq1}R^n,\qquad R^*=\bigcup_{n\geq0}R^n,\qquad R^0=I_A.

These are the smallest transitive, and reflexive-transitive, relations containing RR, respectively. (cs.cornell.edu)

In formal verification, a program can be interpreted as a relation between initial and final states. Composition models sequential execution, while reflexive-transitive closure models arbitrarily many repetitions, including none. This interpretation accommodates computations with multiple possible outcomes rather than only deterministic functions. (cs.cornell.edu)