We have:
$$A = \begin{bmatrix}1&1&1\\0&2&0 \\ 0&0&2\end{bmatrix}$$
We find the eigenvalues of $|A - \lambda I| = 0$, hence:
$$\lambda_1 = 1, \lambda_{2,3} = 2$$
That is, we have a single root and a double root eigenvalue, algebraic multiplicity.
To find the eigenvectors, we set up and solve $[A - \lambda_i I]v_i = 0$.
For $\lambda_1 = 1$, we get the eigenvector:
$$v_1 = (1,0,0)$$
For $\lambda_{2,3} = 2$, we get the eigenvectors (normally, we do not get two linearly independent eigenvectors):
$$v_2 = (1,0,1), v_3 = (1,1,0)$$
We now can write $P$ using the eigenvectors as columns. We have,
$$P = [v_1 | v_2 | v_3 ] = \begin{bmatrix}1&1&1\\0&0&1 \\ 0&1&0\end{bmatrix}$$
We can write the Jordan Normal Form (notice that we do not have any Jordan blocks), $J$, using the corresponding eigenvalues:
$$J = P^{-1} A P$$
However, we can also write this straight off from the eigenvalues and knowing we do not need any Jordan blocks.
$$J = \begin{bmatrix}1&0&0\\0&2&0 \\ 0&0&2\end{bmatrix}$$
Lastly, we should verify:
$$A = P J P^{-1}$$
I purposely left things so you can fill in the details of the calculations.
The first important thing to remember is that the Jordan form is only unique up to rearranging the blocks which appear in it. You have found the eigenvalues and the sizes of the blocks and written them in a specific order given by your $J$. Now, you want to find $P$ such that $P^{-1}AP = J$. Let's call the columns of $J$ by the names $u_1,u_2,u_3,u_4$. Then the following must be true:
- The first column $u_1$ must be an eigenvector of $A$ corresponding to the eigenvalue $-1$.
- The second the and the fourth columns $u_2,u_4$ must be (linearly independent) eigenvectors which correspond to the eigenvalue $1$. In fact, they will be a basis for the corresponding eigenspace.
- The third column $u_3$ must satisfy $(A - I)u_3 = u_2$ (and should be linearly independent from $u_2,u_4$).
Let's see what this means.
- You can take $v_1 = (0,0,0,1)^t$ to be the first column $u_1$ of $J$ but you an also take any other eigenvector corresponding to the eigenvalue $-1$ such as $(0,0,0,2)^t$. In this case, it is not really important which one you take because the coresponding eigenspace is one dimensional.
- The eigenspace corresponding to the eigenvalue $1$ is two dimensional and you have found that it is spanned by $v_2,v_3$. Now, you can try and take them as columns (say $u_2 = v_2, u_4 = v_3$) but you can also take as columns any other basis for the eigenspace.
- After you have chosen $u_2,u_4$, the third column $u_3$ must satisfy $(A - I)u_3 = u_2$. Here is where you run into a problem. It turns out that if you try and take $u_2 = v_2$ then the equation $(A - I)u_3 = u_2$ has no solution! However, if you take $u_2 = 8v_2 - 2v_3$ (or any other multiple of this) then the equation has a solution (in fact, infinitely many of them) and one of them is given by $u_3 = v_5$.
Since you don't want to "try" all possible vectors $v$ in the eigenspace and see if the equation $(A - I)u_3 = v$ has a solution, you work backwards. You find an element $u_3 \in \ker (A - I)^2$ (not all elements will work because you want at the end a basis) and then set $u_2 = (A - I)u_3$.
Best Answer
To put a matrix in Jordan normal form requires to know three matrices such that $A=PJP^{-1}$ i.e: a matrix $P^{-1}$ that transform to the canonical basis $(\mathbf{i},\mathbf{j},\mathbf{k})$ to a new basis in which the matrix $J$ represents the transformation of a vector $\mathbf{v}$ such that the transformed vector $\mathbf{v'}$ is the same as we find when we transform $\mathbf{v}$ with $A$ in the canonical basis. Last the matrix $P$ returns this result to the canonical basis.
As noted in OP the matrix $A$ has eigenvalues $\lambda_1=\lambda_2=1$ and a single eigenvector $$ \mathbf{u_1}=\left[ \begin{array}{cccc} 2\\ 1 \end {array} \right] $$
So the main problem is to find another vector that completes the new basis.
To find such a vector notes that all vectors $\mathbf{x}$ such that $(A-\lambda I)\mathbf{x}=0$ are transformed in the eigenspace generated by the eigenvector $\mathbf{u_1}$, so we want a vector $\mathbf{u_2}$ such that $(A-\lambda I)\mathbf{u_2} \ne 0$, and the way to do this is to find a vector such that : $(A-\lambda I)\mathbf{u_2} = \mathbf{u_1}$. (Note that this equation is the same as $(A-\lambda I)^2\mathbf{u_2}= 0$).
Solving in our case we find: $$ \left[ \begin{array}{cccc} 2&-4\\ 1&-2 \end {array} \right] \left[ \begin{array}{cccc} x\\ y \end {array} \right]= \left[ \begin{array}{cccc} 2\\ 1 \end {array} \right] $$
so that the components $x$ and $y$ of the searched vector must satisfies $x-2y=1$, and we can find the vector $$ \mathbf{u_2}= \left[ \begin{array}{cccc} 1\\ 0 \end {array} \right] $$ So the matrix $P$ we are searching is $$ P=[\mathbf{u_1},\mathbf{u_2}]= \left[ \begin{array}{cccc} 2&1\\ 1&0 \end {array} \right] $$ And the inverse is: $$ P^{-1}= \left[ \begin{array}{cccc} 0&1\\ 1&-2 \end {array} \right] $$ The matrix $J$ is a typical Jordan block, with the eigenvalues as diagonal elements and an entry $1$ up-right them: $$ J= \left[ \begin{array}{cccc} 1&1\\ 0&1 \end {array} \right] $$ and we can easily verify that $A=PJP^{-1}$.