I think I may not be understanding the composition of a relation, especially when it is composed with itself. Here is an example I am struggling with and my reasoning...
Prove or give a counterexample to each of the following statements:
If $R$ is a reflexive relation on $A$, then $ R \circ R$ is a reflexive relation on A.
Let $a∈A$ and $R = f(a)$
Since R is reflexive we know that $\forall a∈A \,\,\,,\,\, \exists (a,a)∈R$ then $f(a)=(a,a)$
Since $R \circ R = f(f(a))$ and $f(a)=(a,a)\implies f(f(a))=f((a,a))$
This is where I get confused with this proof. I can't seem to wrap my head around this composed relation. I know there must be something I am not understanding.
Yes, that is an awkward "proof".
Is this clearer?:
For any relations $S\subseteq X\times Y, T\subseteq Y\times Z$, the definition of composition is that: $$(x,z)\in T\circ S ~\iff ~\exists y\in Y~((x,y)\in S\wedge (y,z)\in T)$$
So clearly we have that for any $a\in A$ we have $(a,a)\in R\circ R$, if $(a,a)\in R$.
Now, $R$ is reflexive on $A$, iff $\forall a\in A: (a,a)\in R$.
Apply universal modus ponens.
$$\begin{align}&\forall a\in A:((a,a)\in R) && \text{assuming $R$ is reflexive}\\& \forall a\in A:((a,a)\in R\to (a,a)\in R\circ R) && \text{from the definition of composition}\\ \hline &\forall a\in A:((a,a)\in R\circ R) && \text{conclude $R\circ R$ is reflexive}\end{align}$$
So therefore $R\circ R$ is reflexive on $A$, if $R$ is reflexive on $A$.
[Remark: note the swap of order in the definition of composition. Well, it is not relavant for this, but worth remembering.]