Jordan canonical form of an upper triangular matrix 
Find the Jordan canonical form of the matrix. Justify your answer.
$A=\begin{bmatrix} 
1 & 2 & 3 \\ 
0 & 4 & 5 \\
0 & 0 & 4
\end{bmatrix}
$

My Try:
The eigenvalues are $1$ and $4$. We have to find $P$ such that $P^{-1}AP=J$. But it is difficult to find two linearly independent vectors for the eigenvalue $4$, since $A-4I$ is of rank $2$. How would I find $J$ in such case? Can somebody please help me?
 A: Firstly, we have that $\dim\ker(\mathbf A-4\mathbf I) = 1$. That means the eigenvalue $\lambda = 4$ is not semi - simple *, thus we have to add a unit above the main diagonal on the Jordan block that corresponds to the eigenvalue $\lambda = 4$, i.e.
$$\mathbf J = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 4 & 1 \\ 0 & 0 & 4 \end{bmatrix}.$$
*An eigenvalue $\lambda$ is called semi - simple, when: $$\operatorname{algebraic\, mult}\, \lambda =\operatorname{geometric\, mult} \lambda.$$

The matrix $\mathbf P$ will contain (as its columns) the eigenvectors that correspond to the eigenvalues. It is easy to find $2$ eigenvectors that correspond to $\lambda_1=1$ and $\lambda_2 = 4$, say $\mathbf u$ and $\mathbf v_1$ respectively. 
However, we need to find an extra generalized eigenvector $\mathbf v_2$ that corresponds to the eigenvalue $\lambda_2 =4$. To do so, we may solve the equation:
$$(\mathbf A-\lambda_2 \mathbf I)\cdot \mathbf v_2 = \mathbf v_1.\tag{1}$$ 

We can check that $\mathbf u = (1,0,0)^\top$ is an eigenvector that corresponds to $\lambda_ 1 = 1$. Also, we can check that $\mathbf v_1 = (1, \frac{3}{2}, 0)^\top$ is an eigenvector that corresponds to the eigenvalue $\lambda_2 = 4$.
For $\mathbf v_2 $ it must hold:
$$(\mathbf A - 4\mathbf I) \cdot  \mathbf v_2 \neq \mathbf 0 \text{ and }(\mathbf A - 4\mathbf I)^2 \cdot \mathbf v_2 = \mathbf 0. $$
By $(1)$ we can compute $\mathbf v_2 = (1,\frac {31}{20},\frac{3}{10})^\top$. That means our matrix $\mathbf P$ is:
$$\mathbf  P = \begin{bmatrix} \mathbf u &\mid &\mathbf v_1 & \mid &\mathbf v_2 \end{bmatrix}.$$ 
If we do the math, we will see that $$\mathbf P^{-1} \cdot \mathbf A \cdot \mathbf P = \mathbf J.$$
