# Hunting for a basis: Rational Canonical Form

I am trying to understand how to find the matrix of transition for the rational canonical form purely using linear algebra (so no $F[x]$ modules). I do realize that Dummit & Foote provide a method for finding the matrix of transition for both RCF and JCF that involves keeping track of the row and column operations done to put our matrix in smith normal form. However, I am trying to do this without that trouble.

Here is the particular matrix I'm going to work with:

$$A = \begin{bmatrix} 2 & 0 & 0 \\ 9 & 7 & 5 \\ -9 & -5 & -3 \end{bmatrix}$$

With little to no effort, we get that the minimal polynomial of $A$ is $m(x) = (x-2)^2$ so that the largest invariant factor, and hence the largest block has size 2. All in all we know that the corresponding matrix is $$R = \begin{bmatrix} 0 & -4 & 0 \\ 1 & 4 & 0 \\ 0 & 0 & 2 \end{bmatrix}$$

A basis vector corresponding to the block of size 1 is just an eigenvector, and should be easy enough to find once we have found the other two vectors for the block of size 2.

The block of size 2 should have as a basis $\{v, Av\}$. Now I'm not sure where to hunt for the vector $v$.

I realize that we need for $Av = Av$ and $A^2 v = 4Av - 4v$.

So the question is, where do we hunt for these basis vectors when finding the matrix of transition to the rational canonical form?

We begin by finding the Smith Normal Form of $A$ by using elementary row and column operations to transform the matrix $xI - A$ into a diagonal matrix with each diagonal entry dividing the next. Be sure to keep track of your elementary row operations, and use elementary column operations whenever possible because they do not affect your basis. We find that the Smith Normal Form of $A$ is given by $$\begin{pmatrix} 1 & 0 & 0 \\ 0 & x-2 & 0 \\ 0 & 0 & (x-2)^2 \end{pmatrix}.$$ We note that the elementary row operations used to find the Smith Normal Form were (1.) $R_1 - \frac{1}{9}(x-2) R_3 \mapsto R_1,$ (2.) $R_2 + R_3 \mapsto R_2,$ (3.) $R_1 + \frac{5}{9} R_2 \mapsto R_1,$ and (4.) swap $R_1$ and $R_3.$ We perform the inverse elementary row operations on the $3 \times 3$ identity matrix to obtain the generators of the cyclic factors in the invariant factor decomposition of $V$ as an $F[x]$-module. We have that $$(1.) \, [e_1, e_2, e_3] \to [e_1, e_2, e_3 + \frac{1}{9}(x-2) e_1],$$ $$(2.) \, [e_1, e_2, e_3 + \frac{1}{9}(x-2) e_1] \to [e_1, e_2, e_3 + \frac{1}{9}(x-2) e_1 - e_2],$$ $$(3.) \, [e_1, e_2, e_3 + \frac{1}{9}(x-2) e_1 - e_2] \to [e_1, e_2 - \frac{5}{9}e_1, e_3 + \frac{1}{9}(x-2) e_1 - e_2],$$ and $$(4.) \, [e_1, e_2 - \frac{5}{9}e_1, e_3 + \frac{1}{9}(x-2) e_1 - e_2] \to [e_3 + \frac{1}{9}(x-2) e_1 - e_2, e_2 - \frac{5}{9}e_1, e_1].$$ Considering that $x$ acts on $V$ as the linear transformation $T$ whose matrix with respect to the standard basis is given by $A,$ it is not difficult to verify that this matrix reduces to $[0, e_2 - \frac{5}{9} e_1, e_1].$ We conclude that $\{e_2 - \frac{5}{9} e_1, e_1, T(e_1)\} = \{(-\frac{5}{9}, 1, 0), (1,0,0), (2,9,-9)\}$ is the desired basis for $V.$