<s>[INST] How do I write this matrix in Jordan-Normal Form I have the matrix $A=\begin{pmatrix}2&2&1\\-1&0&1\\4&1&-1\end{pmatrix}$, I want to write it in  Jordan-Normal Form. I have $x_1=3,x_2=x_3=-1$ and calculated eigenvectors $v_1=\begin{pmatrix}1\\0\\1\end{pmatrix},v_2=\begin{pmatrix}1\\-4\\5\end{pmatrix},v_3=\begin{pmatrix}0\\0\\0\end{pmatrix}$. But, the matrix $Z=\begin{pmatrix}1&1&0\\0&-4&0\\1&5&0\end{pmatrix}$ is not invertible since $\text{det}(Z)=0$. Does this mean the matrix cannot be written in JNF or do I need to find different eigenvectors?
I have tried to find different eigenvectors, but keep arriving at the same problem, any suggestions?
Thanks
 [/INST] You need a generalized eigenvector for the third eigenvalue and it looks like that went wrong somehow, so lets fix it.
We have $\left(A - \lambda_2 I\right)v_3 = v_2$
From this, we get:
$\begin{pmatrix}3&2&1&1\\-1&1&1&-4\\4&1&0&5\end{pmatrix}$
The RREF yields:
$\displaystyle \begin{pmatrix}1&0&-\frac{1}{5}&\frac{9}{5}\\0&1&\frac{4}{5}&-\frac{11}{5}\\0&0&0&0\end{pmatrix}$
This gives us a generalized eigenvector of: $\displaystyle \left(\frac{9}{5}, -\frac{11}{5}, 0 \right)$.
To write the Jordan Normal Form, we form:
$\displaystyle A = S\cdot J\cdot S^{-1} = \begin{pmatrix} 1 & \frac{9}{5} & 1\\
-4 & -\frac{11}{5} & 0 \\ 5 & 0 & 1\end{pmatrix} \cdot \begin{pmatrix} -1 & 1 & 0\\ 0 & -1 & 0\\ 0 & 0 & 3 \end{pmatrix} \cdot \begin{pmatrix} -\frac{11}{80} & -\frac{9}{80} & \frac{11}{80} \\ \frac{1}{4} & -\frac{1}{4} & -\frac{1}{4} \\ \frac{11}{16} & \frac{9}{16} & \frac{5}{16}\end{pmatrix}$.
Notice the structure of the Jordan block. Also, notice what the columns of $S$ and $J$ are made of? Clear?
</s>