# What is the composition of relations like this? With no transitive relations between them?

Given

$R_1 = \{(1,2),(5,3)\}\quad\quad R_2 = \{(6,4),(5,7)\}$

What is $R_2 \circ R_1$?

Because in my understanding, using the example

$R_3 = \{(1,2),(3,4)\} \quad\quad R_4 = \{ (2,5),(6,7)\}$

Then $R_4\circ R_3 = \{(1,5)\}.\;$ Am I correct?

So given that case, if $R_2 \circ R_1 = (a,b),\;a$ comes from $R_1$, right? While $b$ comes from $R_2$?

-

## 1 Answer

We have by definition (assembled from your example) $$R_2 \circ R_1 = \{(a,b) \mid \exists c : (a,c) \in R_1, (c,b) \in R_2\}$$ In the $R_4 \circ R_3$ example $(1,5) \in R_4 \circ R_3$ as we can "plug in" $2$ in the middle where $(1,2) \in R_3$, $(2,5) \in R_4$.

If there is no "matching" pair from $R_1$ and $R_2$ as it is in your case, there is no $(a,b)$ fulfilling the condition for being a member of $R_2 \circ R_1$, we have by definition $R_2 \circ R_1 = \emptyset$.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 18, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9691492915153503, "perplexity_flag": "head"}