# Find basis so matrix is in Jordan Canonical Form

$M = \left(\begin{array}{ccc}0 & -3 & -2 \\1 & 3 & 1 \\1 & 2 & 3\end{array}\right)$

I want to find a basis $B$ such that matrix for $M$ w.r.t $B$ has the form:

$\left(\begin{array}{ccc}2 & 1 & 0 \\0 & 2 & 1 \\0 & 0 & 2\end{array}\right)$

The eigenvalues for $M = 2,2,2$.

$M-2I = \left(\begin{array}{ccc}-2 & -3 & -2 \\1 & 1 & 1 \\1 & 2 & 1\end{array}\right)$.

I tried to find eigenvectors. This is what I came up with.

$(M-2I)v_1 = 0$, then $v_1$ = $(-1,0,1)^t$

And so forth but I either get a wrong answer or it's not invertible.

How do I find the generalized eigenvectors so M is in Jordan Normal Form?

let us call $$A- 2I = B = \left(\begin{array}{ccc}-2 & -3 & -2 \\1 & 1 & 1 \\1 & 2 & 1\end{array}\right).$$ row reducing we find that $B \to \pmatrix{1&0&1\\0&1&0\\0&0&0}$ so that the null of $B$ has dimension one and $$u = \pmatrix{1\\0\\-1}, Bu= 0$$ is a basis.

you can also find that null of $B^2$ has dimension $2.$ let $v$ solve $Bv = u.$ we will find $v$ by row reducing the augmented matrix $[B|u].$ we find that $$[B|u] \to \pmatrix{1&0&1&1\\0&1&0&-1\\0&0&0&0}$$ and $$v = \pmatrix{1\\-1\\0}, Bv = u$$

now, we solve $Bw = v$ and find $$[B|v] \to \pmatrix{1&0&1&-2\\0&1&0&1\\0&0&0&0}$$ and $$w = \pmatrix{-2\\1\\0}, Bw = v$$

you can verify that $\{u, v, w\}$ is a basis and with respect to this basis $B, A = B+2I$ have the representations $$\pmatrix{0&1&0\\0&0&1\\0&0&0}, \pmatrix{2&1&0\\0&2&1\\0&0&2}$$

Since $(M-2I)^2=\begin{pmatrix}-1&-1&-1\\0&0&0\\1&1&1\end{pmatrix}$, we can choose any vector $v_3=\begin{pmatrix}a\\b\\c\end{pmatrix}$

which is not in the nullspace of $(M-2I)^2$, so $a+b+c\ne0$, and

then let $v_2=(M-2I)v_3$ and $v_1=(M-2I)v_2$

to get a basis $B=\{ v_1, v_2, v_3\}$ with respect to which M will be in this form.

For example, $v_3=\begin{pmatrix}0\\0\\1\end{pmatrix}$ gives $v_2=\begin{pmatrix}-2\\1\\1\end{pmatrix}$ and $v_1=\begin{pmatrix}-1\\0\\1\end{pmatrix}$;

$\;\;\;\;$similarly, $v_3=\begin{pmatrix}-2\\1\\0\end{pmatrix}$ gives $v_2=\begin{pmatrix}1\\-1\\0\end{pmatrix}$ and $v_1=\begin{pmatrix}1\\0\\-1\end{pmatrix}$.