Q:

Finding a Jordan normal form and basis for matrix

I want to find a Jordan normal form and bases for matrix: 
$A = \begin{pmatrix}
1&1&-1\\-3&-3&3\\-2&-2&2
\end{pmatrix}$
But it's characteristic polynomial is -$x^3$ which root is equal to 0.
Along with this result I see that this matrix do have a Jordan form:
https://www.wolframalpha.com/input/?i=jordan+normal+form+calculator&rawformassumption=%7B%22F%22,+%22JordanDecompositionCalculator%22,+%22theMatrix%22%7D+-%3E%22%7B%7B1,+1,+-1%7D,+%7B-3,+-3,+3%7D,+%7B-2,+-2,+2%7D%7D%22
What should I do to find J matrix?
Thanks!

A:

The standard method consists, for each eigenvalue $\lambda$, in considering the sequence
$$\ker(A-\lambda I)\subset \ker(A-\lambda I)^2\subset \ker(A-\lambda I)^3\subset \dotsm$$
This sequence is first increasing, then stabilises. The stabilised subspace is the generalised eigenspace. If we denote   $d_k=\dim \ker(A-\lambda I)^k$ and set $d_0=0$, the sequence $(d_k-d_{k-1})$ decreases to $0$, and the value of $d_k-d_{k-1}$ is equal to the number of Jordan blocks of size $\ge k$.
Here we have $d_1=2$ since $A$ has rank $1$. Hence there will be $2$ Jordan blocks, $d_2=3$ since $A^2=0$, hence there will be $1$ Jordan block of size $\ge 2$. Of course, we could find this result without this calculation, but I mention it for illustrative purposes.
Thus we arrive at $1$ Jordan block of size $1$ and $1$ Jordan block of size $2$. To find a Jordan basis, we take any vector in $\ker A^2\smallsetminus\ker A=\mathbf R^3\smallsetminus\ker A$, viz. $u_3=(0,0,1)$, then set
$$u_2=Au_3=(-1,3,2)$$
Note $u_2$ is an eigenvector. Complete into a basis of $\ker A$ (the eigenspace) with, say $u_1=(1,0,1)$.
The change of basis matrix will be
$$P=\begin{bmatrix}1&-1&0\\0&3&0\\1&2&1\end{bmatrix},$$
its inverse is
$$P^{-1}=\begin{bmatrix}1&\frac13&0\\0&\frac13&0\\-1&-1&1\end{bmatrix},$$
and the Jordan normal form of $A$  in this basis is
$$\begin{bmatrix}0&0&0\\0&0&1\\0&0&0\end{bmatrix}$$

