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?
 A: *

*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)$$
A: If $a \ne 0$, the eigenvalues of $A$ are $\pm a$; this is tacitly given in the problem, by stipulating the diagonalized form of $A$, $B$, is diagonal with diagonal entries $a$, $-a$, but it is also easy to see since the characteristic polynomial of $A$ is
$\det (A - \lambda I) = (-\lambda)^2 - a^2 = \lambda^2 - a^2; \tag{1}$
the roots are clearly $\lambda = \pm a$.  Since they are distinct, the corresponding eigenectors are linearly independent; we can in fact almost without effort write them down; indeed, direct calculation reveals that
$A \begin{pmatrix} 1 \\ a \end{pmatrix} = \begin{pmatrix} a \\ a^2 \end{pmatrix} = a \begin{pmatrix} 1 \\ a \end{pmatrix} \tag{2}$
and
$A \begin{pmatrix} 1 \\ -a \end{pmatrix} = \begin{pmatrix} -a \\ a^2 \end{pmatrix} = -a \begin{pmatrix} 1 \\ -a \end{pmatrix}; \tag{3}$
one can also validate the linear independence of $v_a = (1, a)^T$ and $v_{-a} = (1, -a)^T$ directly; this is an easy exercise working from the definitions so I leave it to the reader.  Suppose we set up the matrix
$E = \begin{bmatrix} 1 & 1 \\ a & -a \end{bmatrix} = \begin{bmatrix} v_a & v_{-a} \end{bmatrix}; \tag{4}$
i.e., the columns of $E$ are the eigenvectors of $A$.  Then it is easy to see that
$AE = \begin{bmatrix} Av_a & Av_{-a} \end{bmatrix} = \begin{bmatrix} a v_a & -a v_{-a} \end{bmatrix}. \tag{5}$
We next observe that, the columns of $E$ being linearly independent, $E$ is nonsingular, so we have $E^{-1}$ with
$E^{-1} \begin{bmatrix} v_a & v_{-a} \end{bmatrix} = \begin{bmatrix} E^{-1} v_a & E^{-1} v_{-a} \end{bmatrix} = I, \tag{6}$
i.e.,
$E^{-1} v_a = \begin{pmatrix} 1 \\ 0 \end{pmatrix} \tag{7}$
and
$E^{-1} v_{-a} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}. \tag{8}$
Thus
$E^{-1}AE = E^{-1}  \begin{bmatrix} Av_a & Av_{-a} \end{bmatrix} = \begin{bmatrix} a E^{-1}(v_a) & -a E^{-1}(v_{-a}) \end{bmatrix} = \begin{bmatrix} a & 0 \\ 0 & -a \end{bmatrix}. \tag{9}$
We see the matrix $E$ of eigenvectors of $A$ diagonalizes $A$ via the prescription
$A \to E^{-1}AE$; if one really needs the answer to read $MAM^{-1}$, simply set $M = E^{-1}$ so that $M^{-1} = E$ and proceed from there.
This technique obviously generalizes to matrices of any size $n$, as long as there are $n$ linearly independent eigenvectors, which will always be the case if the eigenvalues are distinct.  Finally, we note that the case $a = 0$ is tacitly excluded by the question itself, since $A$ then becomes nilpotent and can't be diagonalized.
Hope this helps.  Cheers,
and as always,
Fiat Lux!!!
