$A = \begin{pmatrix} 1&1&1 \\ 0 & 2 & 2 \\ 0 & 0 & 2 \end{pmatrix}$, find the jordan form and the invertible $P$ such that: $A = P J P^{-1}$.
Now I found the characteristic polynomial and minimal polynomials: $P_A(x) = (x-1)(x-2)^2 = m_A(x)$.
And from the minimal polynomial I found out that the maximal block size for the eigenvalue $1$ is $1$ so we have one block of size $1$ for that eigenvalue. And in the same way that the maximal jordan block size for eigenvalue $2$ is $2$ and I calculated $N=A-2I$ and figured that there is only one block of size $2$ for eigenvalue $2$. And so I found the Jordan Form:
$$J_A = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 2 & 1 \\ 0 & 0 & 2 \end{pmatrix}$$
Now what I am having trouble with is finding $P$. I know that $Ker(N) = Ker(N-2I) = (1,1,0$ and $Ker(Z) = Ker(A-I) = (1,0,0)$ But how do I exactly calculate the spans to know the basis for the Jordan form if I have two eigenvalues? This is an algorithm that I was not taught!
Any help will be appreciated
We have $v_1=(1,0,0)^T\in \ker(A-I)$ is an eigenvector associated to the eignevalue $1$
moreover, since $\ker(1-2I)=\mathrm{span}((1,1,0)^T)$ then $v_2=(1,1,0)^T$ is an eigenvector of $A$ associted to the eigenvalue $2$ and the matrix $A$ isn't diagonalizable. Finally we look for a vector $v_3$ s.t. $Av_3=v_2+2v_3$ and we find $v_3= (0,\frac{1}{2},\frac{1}{2})^T$ hence with $$P=(v_1\ v_2\ v_3)=\left(\begin{matrix}1&1&0\\ 0&1&\frac{1}{2}\\ 0&0&\frac{1}{2}\end{matrix}\right)\quad\text{and}\quad J=\left(\begin{matrix}1&0&0\\ 0&2&1\\ 0&0&2\end{matrix}\right)$$ we have $$J=P^{-1}AP$$