# Thread: Composite of relations R and S

1. ## Composite of relations R and S

R={(1,1),(1,4),(2,3),(3,1),(3,4)}
S={(1,0),(2,0),(3,1),(3,2),(4,1)}

S o R={(1,0),(1,1),(2,1),(2,2),(3,0),(3,1)}

The book I am using is very unclear about how to construct S o R from the
ordered pairs. I tried searching around for a quick explanation, but most of results confused me even more. If somebody could explain step by step how to get the composite of the relations R and S in this case I would really appreciate it.
Thank you.

2. R={(1,1),(1,4),(2,3),(3,1),(3,4)}
S={(1,0),(2,0),(3,1),(3,2),(4,1)}

S o R={(1,0),(1,1),(2,1),(2,2),(3,0),(3,1)}
A relation is like a set of allowed steps. For example, the relation R allows stepping from 1 to 4, from 2 to 3, from 3 to 1, from 3 to 4, or remain at 1.

For the composition S o R, one has to make two steps: first according to R, the second according to S, e.g., 2 -> 3 -> 1. Of course, the intermediate point 3 is not recorded, S o R contains just a pair (2, 1).

3. e.g., 2 -> 3 -> 1

In this example I see 1 as the final step, but how did you arrive at that?
Does it have something to do with 1 being the second element in the pair below it?

4. Originally Posted by JazzGuitarist01
R={(1,1),(1,4),(2,3),(3,1),(3,4)}
S={(1,0),(2,0),(3,1),(3,2),(4,1)}
S o R={(1,0),(1,1),(2,1),(2,2),(3,0),(3,1)}
After many years of doing this, I find that if a student will just learn the definition the process will follow.
$\left( {a,b} \right) \in S \circ R$ if and only if there is some $c$ such that $(a,c)\in R$ and $(c,b)\in S$.

In this case $(2,1)\in S\circ R$ because $(2,3)\in R$ and $(3,1)\in S$.

We can take each pair in $R$ look at the second term and see if that term is the first term in $S$.
If so choose its second term.
Example $(3,{\color{blue}4})\in R$ and $({\color{blue}4},1)\in S$ so $(3,1)\in S\circ R$

,
,

,

,

,

,

,

,

,

,

,

,

,

,

# composition of relation in discrete maths

Click on a term to search for related topics.