\[A\]
and \[B\]
are similar if there exists an invertible matrix \[P\]
such that \[B=P^{-1}AP\]
The matrices
\[ \left( \begin{array}{cc} 4 & 3 \\ 2 & 1 \end{array} \right) \]
and \[ \left( \begin{array}{cc} 1 & 2 \\ 3 & 4 \end{array} \right) \]
are similar with \[P= \left( \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array} \right) \]
Note that
\[ \left( \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array} \right)^{-1} =\left( \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array} \right) \]
so that \[P\]
is self inverse.\[ \left( \begin{array}{cc} 4 & 3 \\ 2 & 1 \end{array} \right) = \left( \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array} \right)^{-1} \left( \begin{array}{cc} 1 & 2 \\ 3 & 4 \end{array} \right) \left( \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array} \right) \]
\[B\]
is also said to be conjugate to \[B\]
and vice versa.Only square matrices can be similar.