1. Forward composition: $p\,;q$

    $$\forall p,q\cdot p\in S\leftrightarrow T\land q\in T\leftrightarrow U\implies\\p\,;q=\{x\mapsto y\mid(\exists z\cdot x\mapsto z\in p\land z\mapsto y\in q)\}$$

  2. Backward composition: $p\circ q$

    $$p\circ q=q\,;p$$

I am having trouble understanding what forward composition and backward composition mean. The content above is from my unit notes and I just fail to see any intuition reading it.

up vote 3 down vote accepted

Consider two relations $A \leftrightarrow^R B \leftrightarrow^S C$, then forward composition says that for two-elements $a,c$ we have $a (R;S) c$ precisely when there's an intermediary connecting them ---ie $\exists b \in B :: a R b \land b S c$.

The notion of backwards-compostion is more of a classical taste and usually used mainly when discussing functions ---a special kind of relations. Usually this style has more flaws for beginners and makes diagrams a bit difficult to work with.

For diagram $A \leftrightarrow^R B \leftrightarrow^S C$, it is clear that the composition $R;S$ has type $A \leftrightarrow C$. Whereas the diagram does not immediatly make it clear the type of $S \circ R$ ---this has a more right-to-left flavour of diagram-reading, but English is left-to-right.

Hope that helps!


It is common to write $xRy$ or $(x,y) \in R$ to mean that $x,y$ are related via relation $R$.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.