I am solving an example to find the Jordan form and the transformation matrix of the following $4 \times 4$ matrix:
\begin{pmatrix}a&0&1&0\\ 1&a&1&1\\ 0&0&a&0\\ 0&0&1&a\end{pmatrix} I went through the solution manually as follows:
(1). Eigenvalue $(a- \lambda)^4$, so $\lambda=a$ with an algebraic multiplicity of $4$.
(2). Geometric multiplicities
$$\ker(A-\lambda I) = \begin{pmatrix}1&0&1&1\\ 0&0&1&0\\ 0&0&0&0\\ 0&0&0&0\end{pmatrix} $$
so $\dim(\ker(A-\lambda I)) = 2$ and
$$\ker(A- \lambda I) = \text{span}\{\begin{pmatrix}0\\ 1\\ 0\\ 0\end{pmatrix},\begin{pmatrix}-1\\ 0\\ 0\\ 1\end{pmatrix}\}$$
$$ \ker(a-\lambda I)^2 = \begin{pmatrix}0&0&2&0\\ 0&0&0&0\\ 0&0&0&0\\ 0&0&0&0\end{pmatrix} $$
so $\dim(\ker(A-\lambda I)^2) = 3$ and $$\ker(A-\lambda I)^2 = \text{span}\{\begin{pmatrix}1\\ 0\\ 0\\ 0\end{pmatrix},\begin{pmatrix}0\\ 1\\ 0\\ 0\end{pmatrix},\begin{pmatrix}0\\ 0\\ 0\\ 1\end{pmatrix}\}$$
$$ \ker(a-\lambda I)^3 = \begin{pmatrix}0&0&0&0\\ 0&0&0&0\\ 0&0&0&0\\ 0&0&0&0\end{pmatrix} $$
so $\dim(\ker(A-\lambda I)^3) = 4$ and $$\ker(A-\lambda I)^3 = \text{span}\{\begin{pmatrix}1\\ 0\\ 0\\ 0\end{pmatrix},\begin{pmatrix}0\\ 1\\ 0\\ 0\end{pmatrix},\begin{pmatrix}0\\ 0\\ 1\\ 0\end{pmatrix},\begin{pmatrix}0\\ 0\\ 0\\ 1\end{pmatrix}\}$$
(3). Transformation matrix $w_3 \in \ker(A-\lambda I)^3$, and $w_3 \not\in \ker(A-\lambda I)^2$
So let we say,
$w_{k-1}=(A-\lambda I) \cdot w_k$
so I can get:
$$ w3=\begin{pmatrix}0\\ 0\\ 0\\ 1\end{pmatrix}, w2=\begin{pmatrix}0\\ 1\\ 0\\ 0\end{pmatrix}, w2=\begin{pmatrix}0\\ 0\\ 0\\ 0\end{pmatrix} and u1 = \begin{pmatrix}1\\ 0\\ 0\\ 0\end{pmatrix}$$
So the Jordan form is $$\begin{pmatrix}a&1&0&0\\ 0&a&1&0\\ 0&0&a&0\\ 0&0&0&a\end{pmatrix}$$
the Trans. matrix is $$\begin{pmatrix}0&0&0&1\\ 0&1&0&0\\ 0&0&0&0\\ 1&0&0&0\end{pmatrix}$$
I am not sure of my hand solution, but using the Matlab function, gives
V =
[0 1 -2 -1]
[ ]
[2 0 0 0]
[ ]
[0 0 1 0]
[ ]
[0 1 1 1]
J =
[a 1 0 0]
[ ]
[0 a 1 0]
[ ]
[0 0 a 0]
[ ]
[0 0 0 a]
I want to know what is the wrong step in my hand solution to get the same result! Thank you!