Let $R_1$, $R_2$ be two equivalence relations on $X$, prove that $R_1\circ R_2$ is an equivalence relation if and only if $R_1\circ R_2= R_2\circ R_1$
First I´m trying to prove that $R_1\circ R_2= R_2\circ R_1$ $\Rightarrow R_1\circ R_2$ is an equivalence relation; I have already shown that $R_1\circ R_2$ is reflexive and symmetric; to prove that is transitive: $(x,y)\in R_1\circ R_2$ and $(y,z)\in R_1\circ R_2$ $\Rightarrow (x,z)\in R_1\circ R_2$ but I don´t how to proceed from here, I would appreciate your help
I'm going to give this a shot (but to be honest I haven't worked with "composition" of relations before so I'm hoping I found the correct definition).
From my understanding, $R_1\circ R_2$ is interpreted as: $(x,y) \in R_1\circ R_2$ if there exists some other element $\alpha\in X$ such that $(x,\alpha)\in R_1 $ and $(\alpha,y)\in R_2$.
So here's my proof:
Using the definition above,
$(x,y)\in R_1\circ R_2$ means there is some $t\in X$ such that $(x,t)\in R_1$ and $(t,y)\in R_2$.
$(y,z)\in R_1\circ R_2$ means there is some $s\in X$ such that $(y,s)\in R_1$ and $(s,z)\in R_2$.
Then from the assumption we have that $R_1\circ R_2= R_2\circ R_1$. So we can also say:
$(x,y)\in R_1\circ R_2 = R_2\circ R_1\Rightarrow (x,t)\in R_2 \text{ and } (t,y)\in R_1$.
$(y,z)\in R_1\circ R_2 = R_2\circ R_1\Rightarrow (y,s)\in R_2 \text{ and } (s,z)\in R_1$.
So taking all the bits we need: $$(x,t)\in R_1, (t,y)\in R_1 \Rightarrow (x,y)\in R_1$$ $$(y,s)\in R_2, (s,z)\in R_2 \Rightarrow (y,z)\in R_2$$ (and these follow because $R_1$ and $R_2$ are each transitive equivalence relations).
Then put these together and you get $$(x,y)\in R_1\text{ and }(y,z)\in R_2 \Rightarrow (x,z)\in R_1\circ R_2$$
Which shows that if $(x,y)\in R_1\circ R_2$ and $(y,z)\in R_1\circ R_2$ then $(x,z)\in R_1\circ R_2$.