Computation of generalized eigenvectors Suppose we wish to find the eigenvectors of the matrix $$A=\begin{bmatrix}3&2&1\\0&3&2\\0&0&3\end{bmatrix}.$$
The first eigenvector is $x_1=\begin{bmatrix}1\\0\\0\end{bmatrix}$. We get the second (generalized) eigenvector by solving the equation
\begin{equation}(A-3I)x_2=x_1.\tag{*}\end{equation}
Alternatively, we know that $x_2$ belongs to the kernel of $(A-3I)^2$:
\begin{equation}x_2\in\mathcal{N}\left((A-3I)^2\right).\tag{**}\end{equation}
But ($*$) and ($**$) are not equivalent!
In ($*$), the set of solutions is an 1D affine subspace, while ($**$) is a 2D linear subspace. For instance, $x_2=\begin{bmatrix}0\\1\\0\end{bmatrix}$ satisfies ($**$), but not ($*$). In this sense ($*$) is  the correct expression, while using ($**$) can be misleading. However, this does not seem to be reflected/mentioned in most texts treating Jordan forms. Or do I miss something?
 A: When the matrix elements and eigenvalues are integers, I like doing the backwards direction, it puts off the fractions until the end. I make a change of basis matrix $P,$  the determinant of $P$ is the only denominator, and can even be displayed as a scalar multiplier when writing $P^{-1},$ so the the elements of all the matrices appear as integers, good for reducing errors.
My new basis of (column) vectors  will be called $(u,v,w)$ and the matrix with those columns $P.$  The final outcome will be $P^{-1} AP = J$ in Jordan form. The size of the largest Jordan block is the degree of the minimal polynomial, which is three. A single block.
As $(A-3I)^2 \neq 0,$  we take $w$ that is not annihilated, I like $w= (0,0,1)^T.$  Next, $v = (A-3I)w = (1,2,0)^T.$  Finally $u = (A-3I)v = (4,0,0)^T.$
This $u$ is the only genuine eigenvector.
$$
\left(
\begin{array}{ccc}
&& \\
&& \\
&& \\
\end{array}
\right)
$$
$$
P= 
\left(
\begin{array}{ccc}
4&1&0 \\
0&2&0 \\
0&0&1 \\
\end{array}
\right)
$$
so
$$
P^{-1} = \frac{1}{8}
\left(
\begin{array}{ccc}
2&-1&0 \\
0&4&0 \\
0&0&1 \\
\end{array}
\right) \; . \; \; 
$$
Then
$$
\frac{1}{8}
\left(
\begin{array}{ccc}
2&-1&0 \\
0&4&0 \\
0&0&1 \\
\end{array}
\right) 
\left(
\begin{array}{ccc}
3&2&1 \\
0&3&2 \\
0&0&3 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
4&1&0 \\
0&2&0 \\
0&0&1 \\
\end{array}
\right) =
\left(
\begin{array}{ccc}
3&1&0 \\
0&3&1 \\
0&0&3 \\
\end{array}
\right)
$$
