Matrix similarity is an equivalence relation Recall that for $ A,B \in \mathsf{M}_n$, we say that $A$ is similar to $B$, denoted $A \sim B$, if there is an invertible matrix $S \in \mathsf{M}_n$ such that $A = S B S^{-1}$. Prove that similarity is an equivalence relation on $\mathsf{M}_n$.
I have no idea on what to do here, what i have tried is to say that $A = S A S^{-1} = A I_n = B = BI_n = S B S^{-1} $ which i have a very strong feeling is completely wrong. What should i do? how do i do this proof?
if yall can come up with a better title feel free to replace or change mine.
 A: I'm not sure how you get any of the equalities in your work, except for $B=BI_n$. Since $S$ is just some invertible matrix, how do you get $A=SAS^{-1}=AI_n$ and $BI_n=SBS^{-1}$? I suspect you are commuting $SAS^{-1}$ into $ASS^{-1}$ and similarly $SBS^{-1}$ into $BSS^{-1}$, but remember that matrix multiplication is not commutative. For example, if
$$
S:=\begin{pmatrix}
2 & 0 \\ 0 & 1
\end{pmatrix}
\quad\text{and}\quad
B:=\begin{pmatrix}
1 & 1 \\ 1 & 1
\end{pmatrix},
$$
then
$$
SBS^{-1} = \begin{pmatrix}
2 & 0 \\ 0 & 1
\end{pmatrix}
\begin{pmatrix}
1 & 1 \\ 1 & 1
\end{pmatrix}
\begin{pmatrix}
1/2 & 0 \\ 0 & 1
\end{pmatrix}
= \begin{pmatrix}
2 & 2 \\ 1 & 1
\end{pmatrix}
\begin{pmatrix}
1/2 & 0 \\ 0 & 1
\end{pmatrix}
=
\begin{pmatrix}
1 & 2 \\ 1/2 & 1
\end{pmatrix}
$$
is not equal to $B$. Also, when you write $AI_n=B$, you seem to be assuming that $A$ is equal to $B$. But this isn't true, even for similar matrices. For instance, if
$$A:=\begin{pmatrix}
0 & 1 \\ 0 & 0
\end{pmatrix}
\quad\text{and}\quad
B:=\begin{pmatrix}
0 & 0 \\ 1 & 0
\end{pmatrix}
\quad\text{and}\quad
S:=\begin{pmatrix}
0 & -1 \\ 1 & 0
\end{pmatrix}
,$$
then $A\ne B$ are similar because $S$ is invertible and
$$
SBS^{-1} = 
\begin{pmatrix}
0 & -1 \\ 1 & 0
\end{pmatrix}
\begin{pmatrix}
1 & 0 \\ 0 & 0
\end{pmatrix}
\begin{pmatrix}
0 & -1 \\ 1 & 0
\end{pmatrix}^{-1}
=
\begin{pmatrix}
1 & 0 \\ 0 & 0
\end{pmatrix}
\begin{pmatrix}
0 & 1 \\ -1 & 0
\end{pmatrix}
=\begin{pmatrix}
0 & 1 \\ 0 & 0
\end{pmatrix}
= A.
$$

Now, onto the question.
We need to prove that $\sim$ is reflexive ($A\sim A$ for all $A\in\mathsf{M}_n$), symmetric ($A\sim B$ implies $B\sim A$), and transitive ($A\sim B$ and $B\sim C$ implies $A\sim C$).
I'll let you do reflexivity.
For symmetry, suppose $A\sim B$. Then there exists an invertible matrix $S$ such that $A=SBS^{-1}$. Hence $S^{-1}$ is invertible and $B=S^{-1}A(S^{-1})^{-1}$, so $B\sim A$.
For transitivity, assume $A\sim B$ and $B\sim C$. Then there are invertible matrices $S$ and $T$ such that $A=SBS^{-1}$ and $B=TCT^{-1}$. Then $ST$ is invertible and
$$
A = SBS^{-1} = S(TCT^{-1})S^{-1} = (ST)C(ST)^{-1},
$$
so $A\sim C$.
