Let $$A = \left(\begin{array}{cccc} 3&4&-1\\0&-2&0\\1&-4&1 \end{array}\right)$$ Find the Jordan form $J$ and $P$ such that $P^{-1}AP = J$.
So here's what I did:
$f_A(x) = m_A(x) = (x+2)(x-2)^2$ so it must be that:
$$J = \left(\begin{array}{cccc} -2&0&0\\0&2&0\\0&1&2 \end{array}\right)$$
Great. Now let's find $P$
$$\ker (A-2I) = \text{span}\{(1,0,1)\} \\ \ker (A-2I)^2 = \text{span}\{(1,0,0), (0,0,1)\}$$
We chose $v_1 = (0,0,1)$. And therefore, $v_2 = (A-2I)v_1 = (-1,0,-1)$
Finally, for $v_3$ we may choose any eigenvector of $V_{\lambda = 2}$.
$$\ker (A+2I) = \text{span}\{(-8, 7, 12)\}$$
So we have $$P = (v_1,v_2, v_3) = \left(\begin{array}{cccc} 0&-1&-8\\0&0&7\\1&-1&12 \end{array}\right)$$
I've calculated $P^{-1}AP$ but it doesn't come up to be the desired result.
Why?
EDIT:
I wish to $1$-s to be as I wrote, at the subdiagonal (this is how we were taught at class)
You did actually everything alright, but as already pointed out in the comment $$ v=\begin{pmatrix}-8\\7\\12\end{pmatrix} $$ is simply not an eigenvector to the eigenvalue $\lambda=-2$. You can choose for example $$ \hat{v}=\begin{pmatrix}-1\\2\\3\end{pmatrix} \in ker(A+2I) $$ and then everything works flawless, then you can further take $v_1=\begin{pmatrix}0\\0\\1\end{pmatrix}$ which is not an element of $ker(A-2I)$ and put $$ P=\begin{pmatrix}v_1 & ker(A-2I)v_1 &\hat{v} \end{pmatrix}=\left(\begin{array}{cccc} 0&-1&-1\\0&0&2\\1&-1&3 \end{array}\right) $$ and you get $$ P^{-1}AP=\left(\begin{array}{cccc} 2&0&0\\1&2&0\\0&0&-2 \end{array}\right) $$