<s>[INST] How to find transformation matrix which converts matrix to simple standard form I have a matrix A$$  \left( \begin{array}{ccc}
0 & 1 \\
a^2 & 0\\
\end{array} \right) $$
Using eigen values, I convert it into simple standard form B:
$$\left( \begin{array}{ccc}
a & 0 \\
0 & -a\\
\end{array} \right) $$
How can I find the transformation matrix M which converts this to simple standard form. In other words, how to find M such that $MAM^{-1}=B$. I am actually interested in knowing the nature of the transformation. Also in general how does one find it?
 [/INST] *

*find it's eigenvalues using $|\lambda I -A| = 0$ equation, you must find them $a$ and $-a$.


Hint: $\lambda^2-a^2 = (\lambda-a)(\lambda+a)$


*find their corresponding eigenvectors $e_1$ and $e_2$, using the criteria of eigen-value-vector 
$\lambda_1 e_1 = Ae_1 $


$$a\left(\!
    \begin{array}{c}
      x \\
      y
    \end{array}
  \!\right)=\left(\!
    \begin{array}{c}
      0 & 1 \\
      a^2 & 0
    \end{array}
  \!\right)\left(\!
    \begin{array}{c}
      x \\
      y
    \end{array}
  \!\right)$$
\begin{cases} 
ax=y \\ 
ay=a^2x
\end{cases}
so we notice that a set of solutions is of the form $\left(\!
    \begin{array}{c}
      x \\
      ax
    \end{array}
  \!\right)$ let's pick the vector $e_1=\left(\!
    \begin{array}{c}
      1 \\
      a
    \end{array}
  \!\right)$
(Do the same to find $e_2$)
according to my calculations $$e_1=\left(\!
    \begin{array}{c}
      1 \\
      a
    \end{array}
  \!\right)$$
$$e_2=\left(\!
    \begin{array}{c}
      1 \\
      -a
    \end{array}
  \!\right)$$


*construct the matrix $M$ with those eigenvectors


$$M=\left(\!
    \begin{array}{c}
      1 & 1 \\
      a & -a
    \end{array}
  \!\right)$$
And you are done
$$M^{-1}=\left(\!
    \begin{array}{c}
      \frac{1}{2} & \frac{1}{2a} \\
      \frac{1}{2} & \frac{-1}{2a}
    \end{array}
  \!\right)$$
Now :
$$M^{-1}AM=\left(\!
    \begin{array}{c}
      \frac{1}{2} & \frac{1}{2a} \\
      \frac{1}{2} & \frac{-1}{2a}
    \end{array}
  \!\right)\left(\!
    \begin{array}{c}
      0 & 1 \\
      a^2 & 0
    \end{array}
  \!\right)
\left(\!
    \begin{array}{c}
     1 & 1 \\
      a & -a
    \end{array}
  \!\right)$$
$$M^{-1}AM=\left(\!
\begin{array}{c}
      a & 0 \\
      0 & -a
    \end{array}
  \!\right)$$
</s>