Let $R$ be a relation over $A$. Define $R^{-1}, R^2$ like so:
$aR^{-1}b \iff bRa\\ aR^2b\iff\exists _{c\in A}(aRc\wedge cRb)$
Prove:
$R$ is transitive $\iff$ $R^2\subseteq R$
$R$ is transitive and reflexive $\to$ $R=R^2$
$\Rightarrow$ is fairly simple, let $a,b,c\in A$ since $R$ is transitive then $(a,b),(b,c)\in R$ so there exists $b\in A$ such that from the definition of $R^2$: $(a,b),(b,c)\in R \iff a R^2c$ therefore $R^2\subseteq R$.
But I get stuck with $\Leftarrow$, suppose $R^2\subseteq R$ so let $a,b\in A$ such that $aR^2b\iff\exists _{c\in A}\color{red}{(aRc\wedge cRb)}\subseteq R$ but now I can't just use the definition of transitivity on the red part to get $aRc$ and I can't assume anything else...
We have from definition: $\forall a,b,c\in A(aRa)\wedge((aRb\wedge bRc)\to(aRc))$ $(*)$ and we need to show that $R\subseteq R^2$ and $R^2\subseteq R$.
So maybe this would work: $aR^2b\iff\exists _{a\in A}(aRa\wedge aRb)$ but I'm not sure how to apply it in the subsets...
$(*)$ Question about this, is there a way to simplify it? is it equivalent to $(aRa)\wedge(aRc)$ or $(aRa)\wedge(aRb\wedge bRc)$? or we can't simplify it any further?
For 1. : consider $a,b,c \in A$ such that $aRc$ and $cRb$.
This means that $aR^2b$ and we have that $R_2 ⊆ R$, and this means that : : $(a,b) \in R^2 \subseteq R$ and thus $(a,b) \in R$.
Thus we have that, from $aRc, cRb$, follows : $aRb$, and this is transitivity.
For 2. : we have $R^2 \subseteq R$ form 1. (transitivity); thus we have to check that reflexivity is enough to ensure : $R \subseteq R^2$.
In order that $(a,b) \in R \rightarrow (a,b) \in R^2$, we have to check that :
then assume $c=a$ and we have : $aRa$ (by reflexivity) and : $aRb$.