ArticleslgStudy

mathematics

Composition of relations

Composition of relations is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Composition of relations rather than just read about it. In short: In the mathematics of binary relations, the composition of relations is the forming of a new binary relation R;S 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.

Composition of relations — main illustration
Composition of relations — illustration

Key takeaways

  • Composition of relations belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Composition of relations to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Composition of relations from memory before moving on to harder problems.

Reference excerpt

In the mathematics of binary relations, the composition of relations is the forming of a new binary relation R;S 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 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 "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 𝖱𝖾𝗅. 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 𝖲𝖾𝗍 of sets and functions is a subcategory of 𝖱𝖾𝗅 where the maps X→Y are functions f:X→Y. Given a regular category 𝕏, its category of internal relations 𝖱𝖾𝗅(𝕏) has the same objects as 𝕏, but now the morphisms X→Y are given by subobjects R⊆X×Y in 𝕏. Formally, these are jointly monic spans between X and Y. Categories of internal relations are allegories. In particular 𝖱𝖾𝗅(𝖲𝖾𝗍)≅𝖱𝖾𝗅. Given a field k (or more generally a principal ideal domain), the category of relations internal to matrices over k, 𝖱𝖾𝗅(𝖬𝖺𝗍(k)), has morphisms n→m the linear subspaces R⊆kn⊕km. The category of linear relations over the finite field 𝔽2 is isomorphic to the phase-free qubit ZX-calculus modulo scalars.

Properties Composition of relations is associative: R;(S;T)=(R;S);T. The converse relation of R;S is (R;S)𝖳=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, then R;S is injective, which conversely together with the requirement that S is also left total on range(R) implies the injectivity of only R. If R and S are surjective, then R;S is surjective, which conversely implies the surjectivity of only 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 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×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⊆A×B, that is, where A and B may be distinct sets. Then using composition of relation R with its converse R𝖳, there are homogeneous relations R;R𝖳 (on A) and R𝖳;R (on B). If for all x∈A there exists some y∈B, such that xRy (that is, R is a (left-)total relation), then for all x, xR;R𝖳x so that R;R𝖳 is a reflexive relation or I⊆R;R𝖳 where I is the identity relation {(x,x):x∈A}. Similarly, if R is a surjective relation then R𝖳;R⊇I={(x,x):x∈B}. In this case R⊆R;R𝖳;R. The opposite inclusion occurs for a difunctional relation. The composition R¯𝖳;R is used to distinguish relations of Ferrer's type, which satisfy R;R¯𝖳;R=R.

… excerpt ends here. Continue reading the full article.

Illustrations

Composition of relations: Composition R;S (@media screen{html.skin-theme-clientpref-night .mw-parser-output div:not(.notheme)>.tmp-color,html.skin-theme-clientpref-night .mw-parser-output p>.tmp-color,html.skin-theme-clientpref-night .mw-parser-output table:not(.notheme) .tmp-color{color:inherit!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output div:not(.notheme)>.tmp-color,html.skin-theme-clientpref-os .mw-parser-output p>.tmp-color,html.skin-theme-clientpref-os .mw-parser-output table:not(.notheme) .tmp-color{color:inherit!important}}magenta arrows) of example binary relations R (red) and S (blue)
Composition R;S (@media screen{html.skin-theme-clientpref-night .mw-parser-output div:not(.notheme)>.tmp-color,html.skin-theme-clientpref-night .mw-parser-output p>.tmp-color,html.skin-theme-clientpref-night .mw-parser-output table:not(.notheme) .tmp-color{color:inherit!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output div:not(.notheme)>.tmp-color,html.skin-theme-clientpref-os .mw-parser-output p>.tmp-color,html.skin-theme-clientpref-os .mw-parser-output table:not(.notheme) .tmp-color{color:inherit!important}}magenta arrows) of example binary relations R (red) and S (blue)

Worked examples

Example 1 — a first encounter with Composition of relations

Start with the simplest possible case. Write down what Composition of relations claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Composition of relations before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Composition of relations ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Composition of relations

In research
Composition of relations appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Composition of relations in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Composition of relations is common in secondary-school and first-year university syllabi. It links to neighbouring topics Algebraic logic, Binary operations, Mathematical relations, so understanding it makes those chapters shorter.
In everyday life
Look for Composition of relations outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Composition of relations” →

How to study Composition of relations in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Composition of relations means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Composition of relations out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Composition of relations in simple terms?

In the mathematics of binary relations, the composition of relations is the forming of a new binary relation R;S 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.

Why does Composition of relations matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Composition of relations?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Composition of relations.

Tags

  • Algebraic logic
  • Binary operations
  • Mathematical relations

Keep exploring