Inverse Relations and Composition
Reverse first; match the middle for composition
A relation from a set A to a set B is a collection of ordered pairs. The order matters: (a,b) says that a is related to b. Two operations on such pairs are especially useful: taking an inverse and composing relations.
Inverse relation
The inverse relation reverses every pair. If R={(a,b),(c,d)}, then R−1={(b,a),(d,c)}. This is a reversal of arrows, not an arithmetic reciprocal. A relation can have an inverse relation even when it is not a one-to-one function.
An arrow representation of a relation R. Element labels are used in the questions.
Composition
Suppose R relates elements of A to elements of B, and S relates elements of B to elements of C. The composite S∘R relates a to c exactly when there is some middle element b with aRb and bSc:
Read the notation right to left: apply R first, then S.
Worked example
Let R={(p,1),(q,2)} and S={(1,u),(2,v)}. Start at p: R sends it to 1, then S sends 1 to u, so (p,u) appears in S∘R. Repeat only where the middle value matches. There is no reason to pair p with v.
Let R={(1,a),(2,b)} and S={(a,x),(b,y)}. Which pair belongs to S∘R?
Refer to the figure. Which pair belongs to the inverse relation R−1?
An arrow representation of a relation R. Element labels are used in the questions.