Is this a correct basis for the Jordan normal form? I'm supposed to calculate the Jordan normal form of the matrix
$$A=\begin{pmatrix}-2&0&1&0&0\\0&-1-i&0&i&0\\-1&0&0&0&0\\0&-i&0&-1+i&0\\1&-1&1&-1&-1\end{pmatrix}$$
and I've been having trouble finding an appropriate Jordan basis. The matrix has just one eigenvalue $-1$ and I believe I have calculated the successive eigenspaces correctly: if $A+I=N$ and $\{e_i\}$ are the standard basis, then
$$N=\begin{pmatrix}-1&0&1&0&0\\0&-i&0&i&0\\-1&0&1&0&0\\0&-i&0&i&0\\1&-1&1&-1&0\end{pmatrix},\quad N^2=\begin{pmatrix}0&0&0&0&0\\0&0&0&0&0\\0&0&0&0&0\\0&0&0&0&0\\-2&2i&2&-2i&0\end{pmatrix},\quad N^3=0\\\ker N=\langle e_1+e_2+e_3+e_4,e_5\rangle\subset\ker N^2=\langle ie_1+e_2,e_1+e_3,-ie_1+e_4,e_5\rangle\subset\ker N^3=\mathbb{C}^5$$
My guess is the basis ought to consist of $2$ chains, of lengths $2$ and $3$. For the  first chain, I've chosen $e_1$, since $e_1\in\ker N^3\setminus\ker N^2$, i.e. $N^2e_1,Ne_1,e_1$.
I had real trouble finding a second chain directly (whatever vector I took from $\ker N^2\setminus\ker N$ seemed to produce the same eigenvector as $N^2e_1$) and was stuck on this for a while, until I decided to try finding one indirectly. The matrix $A$ has $2$ eigenvectors, one of which has already appeared in the basis ($N^2e_1$), so I tried finding a vector $x$, such that $Nx$ would be the other eigenvector, which is $\begin{pmatrix}1&1&1&1&0\end{pmatrix}^T$. I ended up solving a linear system and got that any of the vectors $\begin{pmatrix}-\frac{1}{2}+\frac{1}{2}i+t&i+t&\frac{1}{2}+\frac{1}{2}i+t&t&0\end{pmatrix}^T$ would do, so I took $x=\begin{pmatrix}-\frac{1}{2}+\frac{1}{2}i&i&\frac{1}{2}+\frac{1}{2}i&0&0\end{pmatrix}^T$, making my Jordan basis $\{Nx,x,N^2e_1,Ne_1,e_1\}$ and my JNF
$$\begin{pmatrix}-1&1&0&0&0\\0&-1&0&0&0\\0&0&-1&1&0\\0&0&0&-1&1\\0&0&0&0&-1\end{pmatrix}$$
Is this solution correct? I'm somewhat new to the JNF and most of the exercises up to this point have been relatively easy, with the appropriate basis simply dropping into my lap. This is the first time I had to try and find one indirectly, so I wanted to make sure this approach is correct.
 A: Method in a book by Evar Nering; first find your basis $a_1,a_2,a_3,a_4, a_5$  so that $a_1,a_2$ span the eigenvectors and are independent, then $a_1,a_2,a_3,a_4$  span the kernel of $N^2$  and $a_5$  need just be independent. I picked your $e_1$  as $a_5$
https://en.wikipedia.org/wiki/Flag_(linear_algebra)
$$
\left(
\begin{array}{ccccc}
1&0&i&-i& 1  \\
1&0&1&0& 0\\
1&0&0&0& 0\\
1&0&0&1& 0 \\
0&1&0&0& 0 \\
\end{array}
\right)
$$
the first two columns span kernel of $N,$ the first four columns span the kernel of $N^2,$  the five columns $a_1,a_2, a_3,a_4,a_5$ span the kernel of $N^3$
Now we force consistency by calling $b_5 = a_5$ and demanding $b_3 =N a_5,$   are going to have one chain $135$ and the other numbered $24.$ Next we find $b_1 = N b_3$  which is an eigenvector.
At this point we still need a choice for $b_4$ in the kernel of $N^2$ that keeps the flag basis idea working; I see that your $b_4 =(-i,0,0,1,0)^T$   is independent. Then $b_2 = (i,i,i,i,-i-1)^T$  is required
the columns of $P$ are numbered in order 13524.
$$
P=
\left(
\begin{array}{ccccc}
0&-1&1&i&-i \\
0&0&0&i&0 \\
0&-1&0&i&0 \\
0&0&0&i&1 \\
-2&1&0&-i-1&0 \\
\end{array}
\right)
$$
Then
$$
P^{-1}=
\frac{1}{2i}
\left(
\begin{array}{ccccc}
0&-1&-i&0&-i \\
0&2i&-2i&0&0 \\
2i&2&-2i&-2&0 \\
0&2&0&0& 0\\
0&-2i&0&2i&0 \\
\end{array}
\right)
$$
and $J = P^{-1} A P $ is as desired. With things in this order, the 3 block is the upper left, the 2 block is the lower right.
I would summarize by saying that he expands to a flag basis, then force consistency (not only the eigenvalues on the diagonal, but  the cycle structure as well)
