Let $\mathscr{C}$ be a category. $X,Y \in ob(\mathscr{C})$, $X$ and $Y$ are said to be equivalent if there is an equivalence $f:X \rightarrow Y$. Show this is an equivalence relation.
For the equivalence $f:X \rightarrow Y$ we know that there exists a $g: Y \rightarrow X$ such that $g \circ f= {id}_{X}, f \circ g={id}_{Y}$.
I'm not too sure how to show this is an equivalence relation but have got the following:
Let ~ be the equivalence relation on X such that $x~y \Rightarrow f(x)=f(y)$.
We can then see this relation is:
reflexive since f~f
symmetric since $g(f(x))=x$ ~ $y=f(g(y))$
transistive for x~y, y~z
$f(x)=f(y), f(y)=f(z) \Rightarrow f(x)=f(z)$ so x~z
Is this the right way to prove the morphism equivalence relation?