# Putting a matrix into Rational Canonical Form

by imurme8
Tags: canonical, form, matrix, putting, rational
 P: 46 I'm trying to put a matrix into RCF, and I keep running into problems. I've checked my work a few times, so I think I must be making a conceptual error. Here's what I've got: $$A=\left( \begin{matrix}2 & -2 & 14 \\ 0 & 3 & -7 \\ 0 & 0 & 2\end{matrix}\right)\quad \text{ so }\quad xI-A=\left( \begin{matrix}x-2 & 2 & -14 \\ 0 & x-3 & 7 \\ 0 & 0 & x-2\end{matrix}\right).$$Diagonalizing gives $$\overset{C_1\leftrightarrow C_2}{\longrightarrow}\left( \begin{matrix}2 & x-2 & -14 \\ x-3 & 0 & 7 \\0 & 0 & x-2\end{matrix}\right)\overset{R_2-(\frac{1}{2}x-\frac{3}{2})R_1\mapsto R_2}{\longrightarrow}\left( \begin{matrix}2 & x-2 & -14 \\ 0 & -\frac{1}{2}x^2+\frac{5}{2} x-3& 7x-14 \\0 & 0 & x-2\end{matrix}\right)$$$$\overset{C_2-(\frac{1}{2}x-1)C_1\mapsto C_2}{\longrightarrow}\left( \begin{matrix}2 & 0 & -14 \\ 0 & -\frac{1}{2}x^2+\frac{5}{2} x-3& 7x-14 \\0 & 0 & x-2\end{matrix}\right)\overset{C_3+7C_1\mapsto C_3}{\longrightarrow}\left(\begin{matrix}2 & 0 & 0 \\ 0 & -\frac{1}{2}x^2+\frac{5}{2} x-3& 7x-14 \\0 & 0 & x-2\end{matrix}\right)$$$$\overset{C_3 \leftrightarrow C_2}{\longrightarrow}\left( \begin{matrix}2 & 0 & 0 \\ 0 & 7x-14 & -\frac{1}{2}x^2+\frac{5}{2} x-3\\0 & x-2 & 0 \end{matrix}\right)\overset{R_2\leftrightarrow R_3}{\longrightarrow}\left( \begin{matrix}2 & 0 & 0 \\ 0 & x-2 & 0\\0 & 7x-14 & -\frac{1}{2}x^2+\frac{5}{2} x-3 \end{matrix}\right)$$$$\overset{R_3-7R_2\mapsto R_3}{\longrightarrow}\left( \begin{matrix}2 & 0 & 0 \\ 0 & x-2 & 0\\0 & 0 & -\frac{1}{2}x^2+\frac{5}{2} x-3 \end{matrix}\right) \overset{ \frac{1}{2}C_1 }{ \longrightarrow } \left( \begin{matrix}1 & 0 & 0 \\ 0 & x-2 & 0\\0 & 0 & -\frac{1}{2}x^2+\frac{5}{2} x-3 \end{matrix}\right)$$$$\overset{-2C_3}{\longrightarrow}\left( \begin{matrix}1 & 0 & 0 \\ 0 & x-2 & 0\\0 & 0 & x^2-5x+6 \end{matrix}\right).$$The row operations we used were $$R_2-(\frac{1}{2}x-\frac{3}{2})R_1\mapsto R_2, R_2\leftrightarrow R_3, R_3-7R_2\mapsto R_3,$$ giving operations on the basis elements $$\{\beta_1, \beta_2, \beta_3\}$$ as follows: $$\beta_1+(\frac{1}{2}x - \frac{3}{2})\beta_2\mapsto \beta_1,$$ $$\beta_2\leftrightarrow \beta_1, \beta_2+7\beta_3\mapsto \beta_2.$$ So if we start with the standard basis for $$\mathbb{Q}^3 \quad \varepsilon_1=(1,0,0)\quad \varepsilon_2=(0,1,0)\quad \varepsilon_3=(0,0,1),$$ they should change to $$(\varepsilon_1, \varepsilon_2, \varepsilon_3)\to (\varepsilon_1+(\frac{1}{2}x-\frac{3}{2})\varepsilon_2, \varepsilon_2, \varepsilon_3)\to (\varepsilon_1+(\frac{1}{2}x-\frac{3}{2})\varepsilon_2, \varepsilon_3, \varepsilon_2)$$$$\to (\varepsilon_1+(\frac{1}{2}x-\frac{3}{2})\varepsilon_2, \varepsilon_3+7\varepsilon_2, \varepsilon_2).$$ I calculate that first entry is zero, as it should be since we have a unit in the first entry of the matrix. Then I get that the other two are $$(1,0,0)+7(0,1,0)=(0,7,1)$$ and $$(0,1,0).$$ This would give a conjugation matrix $$P=\left( \begin{matrix}0 & 0 & -2 \\ 7 & 1 & 3\\1 & 0 & 0 \end{matrix}\right).$$But this is not the answer in the text. What am I doing wrong? This is driving me crazy. Here's a link to the way they do it in the text, using a different way to row reduce. http://imgur.com/8BLgD http://imgur.com/1OJuU http://imgur.com/N7riK
 Sci Advisor HW Helper P: 2,020 You're not making a mistake: your P is correct, as is theirs. Generally, there will be different possible P's, corresponding to different possible canonical bases (which in turn correspond to the different possible sequences of row/column operations performed in the beginning). Remember that you are finding bases for a direct sum decomposition of V that puts A into a nice form. It's possible to give different bases for each direct summand that will accomplish this, provided the bases are in some sense 'invariant under A'. More specifically, suppose we know that P transforms A into rational form, i.e., ##P^{-1}AP## is in rational form. Then so will ##QP## for any Q that commutes with A, for in this case we would have ##(QP)^{-1}A(QP)=P^{-1}Q^{-1}AQP=P^{-1}Q^{-1}QAP=P^{-1}AP##. Now note that your P and Dummit & Foote's P are related as follows: $$\begin{pmatrix}0 & 0 & -2 \\ 7 & 1 & 3\\1 & 0 & 0\end{pmatrix} = \underbrace{\begin{pmatrix}2 & 2 & 0 \\0 & 1 & 0 \\0&0&1\end{pmatrix}}_{Q}\begin{pmatrix}-7 & -1 & -4 \\ 7 & 1 & 3\\1 & 0 & 0\end{pmatrix},$$ and we do indeed have that AQ=QA.