Lably
Skip to content

Composition of relations

Operation on binary relations

  • 6 min read
  • 7 chapters

Related on Lably

Through Mathematics, Function composition and Function (mathematics)

The word uncle indicates a compound relation: for a person to be an uncle, he must be the brother of a parent. In algebraic logic it is said that the relation "is uncle of" (xUz) is the composition of relations "is a brother of" (xBy) and "is a parent of" (yPz). U=B;P is equivalent to: xUz if and only if ∃y.xBy and yPz.

Beginning with Augustus De Morgan, the traditional form of reasoning by syllogism has been subsumed by relational logical expressions and their composition.

Definition

If R⊆X×Y and S⊆Y×Z are two binary relations, then their composition R;S is the relation R;S={(x,z)∈X×Z: there exists y∈Y such that (x,y)∈R and (y,z)∈S}.

In other words, R;S⊆X×Z is defined by the rule that says (x,z)∈R;S if and only if there is an element y∈Y such that xRySz (that is, (x,y)∈R and (y,z)∈S).

Notational variations

The semicolon as an infix notation for composition of relations dates back to Ernst Schröder's textbook of 1895. Gunther Schmidt has renewed the use of the semicolon, particularly in Relational Mathematics (2011). The use of the semicolon coincides with the notation for function composition used (mostly by computer scientists) in category theory, as well as the notation for dynamic conjunction within linguistic dynamic semantics.

A small circle (R∘S) has been used for the infix notation of composition of relations by John M. Howie in his books considering semigroups of relations. However, the small circle is widely used to represent composition of functions g(f(x))=(g∘f)(x), which reverses the text sequence from the operation sequence. The small circle was used in the introductory pages of Graphs and Relations until it was dropped in favor of juxtaposition (no infix notation). Juxtaposition (RS) is commonly used in algebra to signify multiplication, so too, it can signify relative multiplication.

Further with the circle notation, subscripts may be used. Some authors prefer to write ∘l and ∘r explicitly when necessary, depending whether the left or the right relation is the first one applied. A further variation encountered in computer science is the Z notation: ∘ is used to denote the traditional (right) composition, while left composition is denoted by a fat semicolon. The unicode symbols are ⨾ and ⨟.

Mathematical generalizations

Binary relations R⊆X×Y are morphisms R:X→Y in the category of relations Rel. Its objects are sets, its morphisms are binary relations and the composition of morphisms is exactly composition of relations as defined above. The category of sets Set of sets and functions is a subcategory of Rel where the maps X→Y are functions f:X→Y.

Given a regular category X, its category of internal relations Rel(X) has the same objects as X, but now the morphisms X→Y are given by subobjects R⊆X×Y in X. Formally, these are jointly monic spans between X and Y. Categories of internal relations are allegories. In particular Rel(Set)≅Rel. Given a field k (or more generally a principal ideal domain), the category of relations internal to matrices over k, Rel(Mat(k)), has morphisms n→m the linear subspaces R⊆kn⊕km. The category of linear relations over the finite field F2 is isomorphic to the phase-free qubit ZX-calculus modulo scalars.

Sign in to keep reading

6 more chapters are free with a Lably account.

More in Topics in mathematics