HOME

TheInfoList



OR:

In the
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
of
binary relation In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over sets and is a new set of ordered pairs consisting of elements in and in ...
s, the composition of relations is the forming of a new binary relation from two given binary relations ''R'' and ''S''. In the calculus of relations, the composition of relations is called relative multiplication, and its result is called a relative product.
Function composition In mathematics, function composition is an operation that takes two functions and , and produces a function such that . In this operation, the function is applied to the result of applying the function to . That is, the functions and ...
is the special case of composition of relations where all relations involved are functions. 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 In mathematical logic, algebraic logic is the reasoning obtained by manipulating equations with free variables. What is now usually called classical algebraic logic focuses on the identification and algebraic description of models appropriate for ...
it is said that the relation of Uncle (x U z) is the composition of relations "is a brother of" (x B y) and "is a parent of" (y P z). U = BP \quad \text \quad xByPz \text xUz. Beginning with Augustus De Morgan, the traditional form of reasoning by
syllogism A syllogism ( grc-gre, συλλογισμός, ''syllogismos'', 'conclusion, inference') is a kind of logical argument that applies deductive reasoning to arrive at a conclusion based on two propositions that are asserted or assumed to be tru ...
has been subsumed by relational logical expressions and their composition.


Definition

If R \subseteq X \times Y and S \subseteq Y \times Z are two binary relations, then their composition R; S is the relation R; S = \. In other words, R; S \subseteq X \times Z is defined by the rule that says (x,z) \in R; S if and only if there is an element y \in Y such that x\,R\,y\,S\,z (that is, (x,y) \in R and (y,z) \in S).


Notational variations

The
semicolon The semicolon or semi-colon is a symbol commonly used as orthographic punctuation. In the English language, a semicolon is most commonly used to link (in a single sentence) two independent clauses that are closely related in thought. When a ...
as an infix notation for composition of relations dates back to Ernst Schroder's textbook of 1895. Gunther Schmidt has renewed the use of the semicolon, particularly in ''Relational Mathematics'' (2011). A free HTML version of the book is available at http://www.cs.man.ac.uk/~pt/Practical_Foundations/ The use of semicolon coincides with the notation for function composition used (mostly by computer scientists) in
category theory Category theory is a general theory of mathematical structures and their relations that was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Nowadays, ca ...
, as well as the notation for dynamic conjunction within linguistic dynamic semantics. A small circle (R \circ S) has been used for the infix notation of composition of relations by John M. Howie in his books considering semigroups of relations. John M. Howie (1995) ''Fundamentals of Semigroup Theory'', page 16, LMS Monograph #12,
Clarendon Press Oxford University Press (OUP) is the university press of the University of Oxford. It is the largest university press in the world, and its printing history dates back to the 1480s. Having been officially granted the legal right to print books ...
However, the small circle is widely used to represent composition of functions g(f(x)) = (g \circ 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 \circ_l and \circ_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: \circ is used to denote the traditional (right) composition, but ⨾ () denotes left composition. The binary relations R \subseteq X\times Y are sometimes regarded as the morphisms R : X\to Y in a category Rel which has the sets as objects. In Rel, composition of morphisms is exactly composition of relations as defined above. The category
Set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
of sets is a subcategory of Rel that has the same objects but fewer morphisms.


Properties

* Composition of relations is associative: R;(S;T) = (R;S);T. * The converse relation of R \, ; S is (R \, ; S)^\textsf = S^ \, ; R^. This property makes the set of all binary relations on a set a semigroup with involution. * The composition of (partial) functions (that is, functional relations) is again a (partial) function. * If R and S are
injective In mathematics, an injective function (also known as injection, or one-to-one function) is a function that maps distinct elements of its domain to distinct elements; that is, implies . (Equivalently, implies in the equivalent contrapositi ...
, then R \, ; S is injective, which conversely implies only the injectivity of R. * If R and S are
surjective In mathematics, a surjective function (also known as surjection, or onto function) is a function that every element can be mapped from element so that . In other words, every element of the function's codomain is the image of one element o ...
, then R \, ; S is surjective, which conversely implies only the surjectivity of S. * The set of binary relations on a set X (that is, relations from X to X) together with (left or right) relation composition forms a
monoid In abstract algebra, a branch of mathematics, a monoid is a set equipped with an associative binary operation and an identity element. For example, the nonnegative integers with addition form a monoid, the identity element being 0. Monoid ...
with zero, where the identity map on X is the neutral element, and the empty set is the zero element.


Composition in terms of matrices

Finite binary relations are represented by logical matrices. The entries of these matrices are either zero or one, depending on whether the relation represented is false or true for the row and column corresponding to compared objects. Working with such matrices involves the Boolean arithmetic with 1 + 1 = 1 and 1 \times 1 = 1. An entry in the matrix product of two logical matrices will be 1, then, only if the row and column multiplied have a corresponding 1. Thus the logical matrix of a composition of relations can be found by computing the matrix product of the matrices representing the factors of the composition. "Matrices constitute a method for ''computing'' the conclusions traditionally drawn by means of hypothetical syllogisms and sorites."


Heterogeneous relations

Consider a heterogeneous relation R \subseteq A \times B; that is, where A and B are distinct sets. Then using composition of relation R with its converse R^\textsf, there are homogeneous relations R R^\textsf (on A) and R^\textsf R (on B). If for all x \in A there exists some y \in B, such that x R y (that is, R is a (left-)total relation), then for all x, x R R^\textsf x so that R R^\textsf is a reflexive relation or I \subseteq R R^\textsf where I is the identity relation \. Similarly, if R is a
surjective relation In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over sets and is a new set of ordered pairs consisting of elements in and ...
then R^\textsf R \supseteq I = \. In this case R \subseteq R R^\textsf R. The opposite inclusion occurs for a
difunctional In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over sets and is a new set of ordered pairs consisting of elements in and i ...
relation. The composition \bar^\textsf R is used to distinguish relations of Ferrer's type, which satisfy R \bar^\textsf R = R.


Example

Let A = and B = with the relation R given by a R b when b is a
national language A national language is a language (or language variant, e.g. dialect) that has some connection—de facto or de jure—with a nation. There is little consistency in the use of this term. One or more languages spoken as first languages in the te ...
of a. Since both A and B is finite, R can be represented by a
logical matrix A logical matrix, binary matrix, relation matrix, Boolean matrix, or (0, 1) matrix is a matrix (mathematics), matrix with entries from the Boolean domain Such a matrix can be used to represent a binary relation between a pair of finite sets. ...
, assuming rows (top to bottom) and columns (left to right) are ordered alphabetically: \begin 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 1 & 1 \end. The converse relation R^\textsf corresponds to the
transposed matrix In linear algebra, the transpose of a matrix is an operator which flips a matrix over its diagonal; that is, it switches the row and column indices of the matrix by producing another matrix, often denoted by (among other notations). The t ...
, and the relation composition R^\textsf; R corresponds to the matrix product R^\textsf R when summation is implemented by
logical disjunction In logic, disjunction is a logical connective typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is raining or it is snowing" can be represented in logic using the disjunctive formula R \lor ...
. It turns out that the 3 \times 3 matrix R^\textsf R contains a 1 at every position, while the reversed matrix product computes as: R R^\textsf = \begin 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 \\ 1 & 1 & 1 & 1 \end. This matrix is symmetric, and represents a homogeneous relation on A. Correspondingly, R^\textsf \, ; R is the universal relation on B, hence any two languages share a nation where they both are spoken (in fact: Switzerland). Vice versa, the question whether two given nations share a language can be answered using R \, ; R^\textsf.


Schröder rules

For a given set V, the collection of all
binary relation In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over sets and is a new set of ordered pairs consisting of elements in and in ...
s on V forms a
Boolean lattice In abstract algebra, a Boolean algebra or Boolean lattice is a complemented distributive lattice. This type of algebraic structure captures essential properties of both set operations and logic operations. A Boolean algebra can be seen as a ge ...
ordered by inclusion (\subseteq). Recall that complementation reverses inclusion: A \subseteq B \text B^ \subseteq A^. In the calculus of relations it is common to represent the complement of a set by an overbar: \bar = A^. If S is a binary relation, let S^\textsf represent the converse relation, also called the ''transpose''. Then the Schröder rules are Q R \subseteq S \quad \text \quad Q^\textsf \bar \subseteq \bar \quad \text \quad \bar R^\textsf \subseteq \bar. Verbally, one equivalence can be obtained from another: select the first or second factor and transpose it; then complement the other two relations and permute them. Gunther Schmidt & Thomas Ströhlein (1993) ''Relations and Graphs'',
Springer books Springer Science+Business Media, commonly known as Springer, is a German multinational publishing company of books, e-books and peer-reviewed journals in science, humanities, technical and medical (STM) publishing. Originally founded in 1842 i ...
Though this transformation of an inclusion of a composition of relations was detailed by Ernst Schröder, in fact Augustus De Morgan first articulated the transformation as Theorem K in 1860.Daniel D. Merrill (1990) ''Augustus De Morgan and the Logic of Relations'', page 121,
Kluwer Academic Springer Science+Business Media, commonly known as Springer, is a German multinational publishing company of books, e-books and peer-reviewed journals in science, humanities, technical and medical (STM) publishing. Originally founded in 1842 in ...
He wrote L M \subseteq N \text \bar M^\textsf \subseteq \bar. With Schröder rules and complementation one can solve for an unknown relation X in relation inclusions such as R X \subseteq S \quad \text \quad XR \subseteq S. For instance, by Schröder rule R X \subseteq S \text R^\textsf \bar \subseteq \bar, and complementation gives X \subseteq \overline, which is called the left residual of S by R.


Quotients

Just as composition of relations is a type of multiplication resulting in a product, so some operations compare to division and produce quotients. Three quotients are exhibited here: left residual, right residual, and symmetric quotient. The left residual of two relations is defined presuming that they have the same domain (source), and the right residual presumes the same codomain (range, target). The symmetric quotient presumes two relations share a domain and a codomain. Definitions: * Left residual: A\backslash B \mathrel \overline * Right residual: D/C \mathrel \overline * Symmetric quotient: \operatorname (E, F) \mathrel \overline \cap \overline Using Schröder's rules, A X \subseteq B is equivalent to X \subseteq A \setminus B. Thus the left residual is the greatest relation satisfying A X \subseteq B. Similarly, the inclusion Y C \subseteq D is equivalent to Y \subseteq D \setminus C, and the right residual is the greatest relation satisfying Y C \subseteq D.Gunther Schmidt (2011) ''Relational Mathematics'', Encyclopedia of Mathematics and its Applications, vol. 132,
Cambridge University Press Cambridge University Press is the university press of the University of Cambridge. Granted letters patent by King Henry VIII in 1534, it is the oldest university press in the world. It is also the King's Printer. Cambridge University Pr ...
One can practice the logic of residuals with Sudoku.


Join: another form of composition

A fork operator (<) has been introduced to fuse two relations c : H \to A and d : H \to B into c \,(<)\, d : H \to A \times B. The construction depends on projections a : A \times B \to A and b : A \times B \to B, understood as relations, meaning that there are converse relations a^ and b^. Then the of c and d is given by Gunther Schmidt and Michael Winter (2018): ''Relational Topology'', page 26, Lecture Notes in Mathematics vol. 2208,
Springer books Springer Science+Business Media, commonly known as Springer, is a German multinational publishing company of books, e-books and peer-reviewed journals in science, humanities, technical and medical (STM) publishing. Originally founded in 1842 i ...
,
c\,(<)\,d ~\mathrel~ c ;a^\textsf \cap\ d ;b^\textsf. Another form of composition of relations, which applies to general n-place relations for n \geq 2, is the ''
join Join may refer to: * Join (law), to include additional counts or additional defendants on an indictment *In mathematics: ** Join (mathematics), a least upper bound of sets orders in lattice theory ** Join (topology), an operation combining two topo ...
'' operation of relational algebra. The usual composition of two binary relations as defined here can be obtained by taking their join, leading to a ternary relation, followed by a projection that removes the middle component. For example, in the query language SQL there is the operation Join (SQL).


See also

* *


Notes


References

* M. Kilp, U. Knauer, A.V. Mikhalev (2000) ''Monoids, Acts and Categories with Applications to Wreath Products and Graphs'', De Gruyter Expositions in Mathematics vol. 29,
Walter de Gruyter Walter de Gruyter GmbH, known as De Gruyter (), is a German scholarly publishing house specializing in academic literature. History The roots of the company go back to 1749 when Frederick the Great granted the Königliche Realschule in Be ...
,. {{Order theory Algebraic logic Binary operations Mathematical relations