# Understanding the rational canonical form

I have trouble understanding the rational canonical form of endomorphisms over finite dimensional vector spaces. This is roughly how the rational canonical form was introduced in class:

Let $\phi \in \operatorname{Hom}(V,V)$ be an endomorphism over a finite-dimensional vector space $V$ with associated minimal polynomial $\psi(x)=\prod_{i=1}^{t}p_i^{m_i}$, where the $p_i$ are normed and irreducibel. We construct the rational canonical form of $\phi$ as follows:

(i) We decompose $V$ into a direct sum of the generalised eigenspaces $\ker(p_i^{m_i}(\phi))$, so $V$ looks like this: $V=\bigoplus_{i=1}^{t}\ker(p_i^{m_i}(\phi))$, and the representation matrix of $\phi$ is a diagonal block matrix consisting of blocks $(A_i)_{i=1}^t$, where the block $A_i$ has minimal polynomial $p_i^{m_i}$ (This is clear).

(ii) Every generalised eigenspace $\ker(p_i^{m_i}(\phi))$ gets now further decomposed into $\phi$-indecomposable subspaces $(U_j^{(i)})_{j=1}^k$ such that $\ker(p_i^{m_i}(\phi))=\bigoplus_{j=1}^{k}U_j^{(i)}$, and the degree of the minimal polynomial of $\phi$ restricted to $U_j^{(i)}$ is equal to the dimension of $U_j^{(i)}$. Now the diagonal block matrix $A_i$ is again a diagonal block matrices with matrices corresponding to the subspaces $U_i^{(j)}$ on the diagonal. (This is the step I have trouble with).

(iii) Now for every $U_j^{(i)}$ a basis is chosen such that the corresponding block matrix is of the form \begin{pmatrix} T& & & & \\ 1& T& & & \\ & & .& & \\ & & & .& \\ & & & 1 & T \end{pmatrix} where $T$ is the companion matrix of the minimal polynomial restricted to the subspace $U_j^{(i)}$ (which is some power of $p_i$). (This step is perfectly clear to me).

I don't exactly understand step (ii). If I have a matrix of which I want to find the rational canonical form, how do I find out how many subspaces $U_i^{(j)}$ there are and what dimension they have? I understand the proof why a decomposition into indecomposable subspaces is always possible, but I don't quite understand how they are constructed.

So I guess my question is: Given an irreducible factor $p_i^{m_i}$ of the minimal polynomial, how do I decompose the associated generalised eigenspace into indecomposable subspaces as described above?

• Finite and finite dimensional are not quite the same, although the former implies the latter. – Arnaud Mortier Aug 8 '18 at 11:34
• @ArnaudMortier That was a typo, I meant finite-dimensional. – Jannik Pitt Aug 8 '18 at 11:35
• Try working out an explicit example. What does step (1) give you for the matrix $$x=\left(\begin{matrix}0\\1&0\\&&0&\\&&1&0\end{matrix}\right)\:?$$ What about step (3)? Can you see what is missing from the analysis? – kneidell Aug 8 '18 at 12:01

I'm not sure how this is taught elsewhere, but to me it is much easier to understand step two in terms of the invariant factors of the associated characteristic matrix (so of $xI-A$ where $A$ is the matrix representation of $\phi$).

So here is a small explicit example where the matrix is already in rational canonical form, but I will point out the different steps:$$A = \left(\begin{matrix}0\\&0\\&1&0\\&&&0&\\&&&1&0\\&&&&&1\end{matrix}\right).$$

The minimal polynomial is $x^2(x-1)$, so step 1 is to find the blocks associated with $x^2$ and $x-1$, this you say you have no problem understanding, and so we have $$A_1 =\left(\begin{matrix}0\\&0\\&1&0\\&&&0&\\&&&1&0\end{matrix}\right)$$ is associated with $x^2$ and $$A_2=(1)$$ is associated with $x-1$.

Now in the given example the decomposition of the space associated with $x-1$ is finished, but we can decompose the space associated with $x^2$ further: it should be easy to see that there are three linearly independent characteristic vectors associated with this space, and therefore we must have three indecomposable subspaces (in this example you can already see the three matrices associated with each of the subspaces, and in fact since the minimum polynomial is $x^2$ we know the largest subspace must have dimension 2, and since $A_1$ is order 5 there is then really only one way to split it into 3 indecomposable subspaces)

BUT there could be more complicated scenarios where it could be more difficult ...so how to construct these...for me the easiest way here is to use the Smith normal form of $xI-A_1$: $$xI-A_1 = \left(\begin{matrix}x\\&x\\&-1&x\\&&&x&\\&&&-1&x\end{matrix}\right)$$ has Smith normal form $$\left(\begin{matrix}1\\&1\\&&x\\&&&x^2&\\&&&&x^2\end{matrix}\right).$$ If you read the link you will see that this form is determined by dividing the greatest common divisor among successive orders of subdeterminants of the characteristic matrix, and it always gives you a diagonal form with the "invariant factors" on the diagonal. These factors have some amazing properties including that they are invariant with respect to the underlying field, i.e. a matrix over the smallest field in a chain will have the same invariant factors as all containing fields.

Each invariant factor also divides the next and the last entry on the diagonal is the minimal polynomial. Multiplying the invariant factors yields the characteristic polynomial, but I digress...

To make a long story short, from theory it can be proved that the companion matrices of the nonconstant diagonal entries of this Smith normal form gives you exactly step 2, so $C(x), C(x^2), C(x^2)$ are the matrices associated with the nondecomposable subspaces we are looking for: in this simple example we already have these three blocks on the diagonal.

I hope this helps to answer your question: so typically for me finding the rational canonical form involves calculating the Smith normal form of the characteristic matrix...it gives you the number and dimensions of the $U_i^{(j)}$ as you would need, but it does not give you the change of basis matrix that would produce the transformation...in most cases this is not necessary though.

Final remark, the $U_i^{(j)}$ are formally known as elementary divisors. You can replace step 1 and 2 by calculating the Smith normal form of $xI-A$ directly - as the Smith normal form yields the elementary divisors (a good source that explains this very clearly), and then you can apply 3 directly.