Transforming of a nilpotent matrix to a specific form I wish to build a question in the field of discrete state spaces representation (control theory). The canonical form has a very unique, but not singular, representation. I am focusing on the $A$ matrix of the representation of the form:
$$\begin{bmatrix} 
-a_1   & -a_2   & \cdots & -a_{N-1}& -a_N\\
1      & 0      & \cdots & 0       & 0   \\
0      & 1      & \cdots & \cdots  & 0   \\
\vdots & \vdots & \vdots & \ddots  & \vdots   \\
0      & 0      & \cdots & 1       &0   \\
\end{bmatrix}$$
That is a subdiagonal matrix + a matrix of the same size where only the first row has specific values.
Other representations can be generated using a transformation matrix $T$ by $T^{-1}AT$. In my case, $A\in3\times3$.
I want to use a representation with a nilpotentic matrix $B$. Given, $A$ and $B$ which answer these definitions, is there a way to calculate $T$ which transition between them so that  $B=T^{-1}AT$? I do not mind the values of $a_1,\ldots,a_N$ being dictated by $B$. All I care about is the form of the resulting $A$.
For example:
$$B=\begin{bmatrix} 
2 & 2 & -2\\
5 & 1 & -3\\
1 & 5 & -3\\
\end{bmatrix},
A=\begin{bmatrix} 
-a_1 & -a_2 & -a_3\\
1 & 0 & 0\\
0 & 1 & 0\\
\end{bmatrix}$$
Is it even possible to transform between the two or am I missing a limitation here? If it is possible, is there a close solution for $T$?
 A: It is impossible for any regular matrix $A$. Proof:
Let's suppose that there is a regular matrix $T$ for such $B = T^{-1}AT$ is nilpotent. Therefore there exists $n$ for such $B^n=0$.
$$
0 = B^n=(T^{-1}AT)^n=T^{-1}A^nT\\
T0T^{-1}=A^n\\
0=A^n
$$
However, $A$ is regular, so $A^n\neq0$. This is a contradiction.
A: This is an extended comment rather than a solution.
Your matrix $A$ is in what is called Rational Canonical Form. Note that the characteristic equation of $A$ is $X^n +a_1 X^{n-1} +\dots + a_n$.
If $B$ is nilpotent then the characteristic polynomial of $B$ is $X^n$.
Similar matrices have the same characteristic polynomial, so if you want $A$ to be in this shape, and want it to be similar to a nilpotent matrix $B$ then we must have that all the $a_j=0$.
Now if you start with a nilpotent $B$ then it is indeed similar to a matrix whose only non-zero elements lie on the subdiagonal, and are all either $1$ or $0$. There are algorithmic ways of finding an appropriate $T$: if you search for "finding a Jordan basis" you'll find them.
In the explicit case of the $3\times 3$ $B$ you give, you can do the following to find the columns of $T$: (i) find an eigenvector and call it $u_3$; (ii) find a solution of $Bx=u_3$ and call it $u_2$; (iii) find a solution of $Bx=u_2$ and call it $u_1$. (These steps just require us to solve linear equations.)
