# Given a square matrix, how to find the transformation to a rational canonical form?

Given a square matrix

$B=\begin{bmatrix}5 & -6 & -6\\-1 & 4 & 2\\3 & -6 & -4\end{bmatrix}$

with eigenvalues $1,2,2$, I am interested to find a rational canonical form of the matrix $B$. In the book of Linear Algebra by Hoffman & Kunje, I found that the rational form of the matrix being

$A=\begin{bmatrix}0 & -2 & 0\\1 & 3 & 0\\0 & 0 & 2\end{bmatrix}=\begin{bmatrix}A_{1} & \mathbf{0}_{2\times{1}}\\\mathbf{0}_{1\times{2}} & 2\end{bmatrix}$,

in which the first block $A_1$ has dimension $2$ corresponding to a cyclic subspace $Z(\alpha_{1},B)$ spanned by the vectors

$\alpha_{1}=\begin{bmatrix}1\\0\\0\end{bmatrix}$ and $B\alpha_{1}=\begin{bmatrix}5 \\-1\\3\end{bmatrix}$.

The last diagonal block corresponds to the eigenspace spanned by

$\alpha_{2}=\begin{bmatrix}2\\1\\0\end{bmatrix}$

for eigenvalue $2$. However, I am curious if I can transform $B$ into a different rational canonical form $B_{R}$ as follows

$B_{R}=\begin{bmatrix}0 & -4 & 0\\1 & 4 & 0\\0 & 0 & 1\end{bmatrix}=\begin{bmatrix}B_{1} & \mathbf{0}_{2\times{1}}\\\mathbf{0}_{1\times{2}} & 1\end{bmatrix}$

where $B_{1}$ is of dimension $2$ corresponding to a cyclic subspace $Z(\gamma_{1},B)$ and the last block corresponding to eigenspace spanned by eigenvector

$\begin{bmatrix}1\\-1/3\\1\end{bmatrix}$ with eigenvalue $1$.

My question is whether such a transformation matrix $T$ exists that $B_{R}={T}^{-1}B{T}?$ If yes, then how to find cyclic vector $\gamma_{1}$. Any hints or suggestions are highly appreciated.

• Your matrix $B$ is diagonalizable...and so its diagonal form is the same as the rational canonical form. – Christiaan Hattingh Aug 6 '18 at 18:41
• Rational canonical form is different than the diagonal form, no? Because the diagonal form will be $\begin{bmatrix}2 & 0 & 0\\0 & 2 & 0\\0 & 0 & 1\end{bmatrix}$ and the rational canonical form I am interested in is $B_{R}$. – jbgujgu Aug 6 '18 at 18:48
• I think there is maybe some confusion regarding rational canonical form here: there is only one rational canonical form associated with $B$ and $B_R$ is not it...the rational canonical form require that the diagonal blocks are hypercompanion matrices associated with the elementary divisors, which in turn combine to form blocks associated with the invariant factors of $xI-B$. Now each invariant factor of lower index (in some texts higher index) must divide the invariant factor of higher index (in some texts lower). In $B_R$ this is not the case... – Christiaan Hattingh Aug 6 '18 at 19:39