In the
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 Set (mathematics), sets and is a new set of ordered pairs consisting of ele ...
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 it is said that the relation of Uncle () is the composition of relations "is a brother of" () and "is a parent of" ().
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 true ...
has been subsumed by relational logical expressions and their composition.[
]
Definition
If and are two binary relations, then
their composition is the relation
In other words, is defined by the rule that says if and only if there is an element such that (that is, and ).[
]
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
Infix notation is the notation commonly used in arithmetical and logical formulae and statements. It is characterized by the placement of operators between operands—"infixed operators"—such as the plus sign in .
Usage
Binary relations are ...
for composition of relations dates back to Ernst Schroder
Ernst is both a surname and a given name, the German, Dutch, and Scandinavian form of Ernest. Notable people with the name include:
Surname
* Adolf Ernst (1832–1899) German botanist known by the author abbreviation "Ernst"
* Anton Ernst (1975- ...
'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, as well as the notation for dynamic conjunction within linguistic dynamic semantics Dynamic semantics is a framework in logic and natural language semantics that treats the meaning of a sentence as its potential to update a context. In static semantics, knowing the meaning of a sentence amounts to knowing when it is true; in dynam ...
.
A small circle has been used for the infix notation of composition of relations by John M. Howie in his books considering semigroup
In mathematics, a semigroup is an algebraic structure consisting of a Set (mathematics), set together with an associative internal binary operation on it.
The binary operation of a semigroup is most often denoted multiplication, multiplicatively ...
s of relations.John M. Howie
John Mackintosh Howie (23 May 1936 – 26 December 2011) was a Scottish mathematician and prominent semigroup theorist.
Biography
Howie was educated at Robert Gordon's College, Aberdeen, the University of Aberdeen and Balliol College, Oxfo ...
(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 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 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 and 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, but ⨾ () denotes left composition.
The binary relations are sometimes regarded as the morphisms in a ]category
Category, plural categories, may refer to:
Philosophy and general uses
*Categorization, categories in cognitive science, information science and generally
* Category of being
* ''Categories'' (Aristotle)
* Category (Kant)
* Categories (Peirce) ...
Rel which has the sets as objects. In Rel, composition of morphisms is exactly composition of relations as defined above. The category Set of sets is a subcategory of Rel that has the same objects but fewer morphisms.
Properties
* Composition of relations is associative
In mathematics, the associative property is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a valid rule of replacement ...
:
* The converse relation of is This property makes the set of all binary relations on a set a semigroup with involution In mathematics, particularly in abstract algebra, a semigroup with involution or a *-semigroup is a semigroup equipped with an involutive anti-automorphism, which—roughly speaking—brings it closer to a group because this involution, consider ...
.
* The composition of (partial) functions (that is, functional relations) is again a (partial) function.
* If and 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 contraposi ...
, then is injective, which conversely implies only the injectivity of
* If and are surjective, then is surjective, which conversely implies only the surjectivity of
* The set of binary relations on a set (that is, relations from to ) 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.
Monoids ...
with zero, where the identity map on is the neutral element, and the empty set is the zero element
In mathematics, a zero element is one of several generalizations of 0, the number zero to other algebraic structures. These alternate meanings may or may not reduce to the same thing, depending on the context.
Additive identities
An additive iden ...
.
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 and 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 that is, where and are distinct sets. Then using composition of relation with its converse there are homogeneous relations (on ) and (on ).
If for all there exists some such that (that is, is a (left-)total relation), then for all so that is a reflexive relation or where I is the identity relation Similarly, if 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 in ...
then
In this case 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 in ...
relation.
The composition is used to distinguish relations of Ferrer's type, which satisfy
Example
Let and with the relation given by when 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
Since both and is finite, can be represented by a logical matrix
A logical matrix, binary matrix, relation matrix, Boolean matrix, or (0, 1) matrix is a matrix with entries from the Boolean domain Such a matrix can be used to represent a binary relation between a pair of finite sets.
Matrix representation ...
, assuming rows (top to bottom) and columns (left to right) are ordered alphabetically:
The converse relation corresponds to the transposed matrix, and the relation composition corresponds to the matrix product 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 matrix contains a 1 at every position, while the reversed matrix product computes as:
This matrix is symmetric, and represents a homogeneous relation on
Correspondingly, is the universal relation on 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
Schröder rules
For a given set 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 Set (mathematics), sets and