# Chapter 71. Rational Canonical Form

# Chapter 71. Rational Canonical Form

Rational canonical form is a canonical form for square matrices over an arbitrary field.

Jordan canonical form requires the characteristic polynomial to split into linear factors. This means that all eigenvalues must lie in the field. Rational canonical form avoids that restriction. It works over the original field without adjoining missing eigenvalues.

For this reason, rational canonical form is often the correct replacement for Jordan form over fields such as

$$
\mathbb{Q},
\qquad
\mathbb{R},
\qquad
\mathbb{F}_p.
$$

It classifies matrices up to similarity by using invariant factors and companion matrices. A matrix is similar to exactly one rational canonical form, up to the ordering convention of its blocks.

## 71.1 Similarity and the Need for Canonical Form

Two square matrices \(A\) and \(B\) over a field \(F\) are similar if there exists an invertible matrix \(P\) over \(F\) such that

$$
B=P^{-1}AP.
$$

Similar matrices represent the same linear transformation in different bases.

A canonical form chooses one standard representative from each similarity class. If two matrices have the same canonical form, then they are similar. If they have different canonical forms, then they are not similar.

Diagonal form is the simplest canonical form, but it exists only for diagonalizable matrices. Jordan form applies more broadly, but it requires the characteristic polynomial to split over the field. Rational canonical form applies to every square matrix over any field.

## 71.2 Companion Matrices

Let

$$
f(t)=t^d+a_{d-1}t^{d-1}+\cdots+a_1t+a_0
$$

be a monic polynomial over \(F\).

The companion matrix of \(f\) is

$$
C(f)=
\begin{bmatrix}
0 & 0 & 0 & \cdots & -a_0 \\
1 & 0 & 0 & \cdots & -a_1 \\
0 & 1 & 0 & \cdots & -a_2 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
0 & 0 & 0 & \cdots & -a_{d-1}
\end{bmatrix}.
$$

This matrix is designed so that its characteristic polynomial and minimal polynomial are both \(f(t)\).

The companion matrix represents multiplication by \(t\) on the quotient space

$$
F[t]/(f(t)).
$$

The basis is

$$
1,t,t^2,\ldots,t^{d-1}.
$$

Multiplication by \(t\) shifts basis elements until the last one. The relation

$$
t^d=-a_{d-1}t^{d-1}-\cdots-a_1t-a_0
$$

produces the last column of the companion matrix.

## 71.3 Example of a Companion Matrix

Let

$$
f(t)=t^3-2t+5.
$$

Then

$$
a_2=0,
\qquad
a_1=-2,
\qquad
a_0=5.
$$

The companion matrix is

$$
C(f)=
\begin{bmatrix}
0 & 0 & -5 \\
1 & 0 & 2 \\
0 & 1 & 0
\end{bmatrix}.
$$

The relation behind the matrix is

$$
t^3=2t-5.
$$

Thus multiplication by \(t\) sends

$$
1\mapsto t,
\qquad
t\mapsto t^2,
\qquad
t^2\mapsto t^3=2t-5.
$$

In the basis \(1,t,t^2\), this gives the columns

$$
\begin{bmatrix}
0\\1\\0
\end{bmatrix},
\qquad
\begin{bmatrix}
0\\0\\1
\end{bmatrix},
\qquad
\begin{bmatrix}
-5\\2\\0
\end{bmatrix}.
$$

## 71.4 Cyclic Subspaces

Let \(T:V\to V\) be a linear transformation over \(F\).

A subspace \(W\subseteq V\) is cyclic for \(T\) if there exists a vector \(v\in W\) such that

$$
W=\operatorname{span}\{v,Tv,T^2v,\ldots,T^{d-1}v\}.
$$

The vector \(v\) is called a cyclic vector for \(W\).

On a cyclic subspace, the matrix of \(T\) has companion matrix form. If the first polynomial relation among

$$
v,Tv,T^2v,\ldots
$$

is

$$
f(T)v=0,
$$

where \(f\) is monic of degree \(d\), then the matrix of \(T\) on this cyclic subspace is \(C(f)\).

Thus companion matrices are the building blocks of rational canonical form.

## 71.5 Invariant Factors

The rational canonical form is built from a sequence of monic polynomials

$$
f_1(t),f_2(t),\ldots,f_r(t)
$$

called invariant factors.

They satisfy the divisibility chain

$$
f_1(t)\mid f_2(t)\mid \cdots \mid f_r(t).
$$

The rational canonical form is the block diagonal matrix

$$
C(f_1)\oplus C(f_2)\oplus\cdots\oplus C(f_r).
$$

The invariant factors determine the matrix up to similarity. Conversely, the similarity class determines the invariant factors.

The largest invariant factor is the minimal polynomial:

$$
f_r(t)=m_A(t).
$$

The product of all invariant factors is the characteristic polynomial:

$$
f_1(t)f_2(t)\cdots f_r(t)=p_A(t).
$$

These two facts connect rational canonical form with the previous chapters on the characteristic and minimal polynomials.

## 71.6 Definition of Rational Canonical Form

Let \(A\) be an \(n\times n\) matrix over a field \(F\).

The rational canonical form of \(A\) is the block diagonal matrix

$$
R=
C(f_1)\oplus C(f_2)\oplus\cdots\oplus C(f_r),
$$

where

$$
f_1\mid f_2\mid \cdots \mid f_r
$$

are the invariant factors of \(A\).

There exists an invertible matrix \(P\) over \(F\) such that

$$
P^{-1}AP=R.
$$

The form is canonical: two matrices over \(F\) are similar if and only if they have the same rational canonical form.

## 71.7 Why the Word Rational Appears

The word rational does not mean that the entries must be rational numbers.

It means that the form is defined over the original field using polynomial arithmetic over that field. It does not require factoring the characteristic polynomial into linear factors.

For example, over \(\mathbb{R}\), the polynomial

$$
t^2+1
$$

does not split into real linear factors. Jordan form over \(\mathbb{R}\) using eigenvalues \(i\) and \(-i\) is unavailable.

But the companion matrix

$$
C(t^2+1)=
\begin{bmatrix}
0 & -1 \\
1 & 0
\end{bmatrix}
$$

is a real matrix. It is already a rational canonical block over \(\mathbb{R}\).

Thus rational canonical form works without leaving the base field.

## 71.8 Example: Rotation by \(90^\circ\)

Consider

$$
A=
\begin{bmatrix}
0 & -1 \\
1 & 0
\end{bmatrix}
$$

over \(\mathbb{R}\).

The characteristic polynomial is

$$
p_A(t)=t^2+1.
$$

The minimal polynomial is also

$$
m_A(t)=t^2+1.
$$

Since the minimal polynomial equals the characteristic polynomial, there is one invariant factor:

$$
f_1(t)=t^2+1.
$$

Therefore the rational canonical form is

$$
C(t^2+1) =
\begin{bmatrix}
0 & -1 \\
1 & 0
\end{bmatrix}.
$$

So \(A\) is already in rational canonical form.

Over \(\mathbb{C}\), the same matrix has eigenvalues \(i\) and \(-i\), and it diagonalizes. This shows that rational canonical form depends on the chosen base field.

## 71.9 Example: One Cyclic Matrix

Let

$$
A=
\begin{bmatrix}
0 & 0 & -6 \\
1 & 0 & 11 \\
0 & 1 & -6
\end{bmatrix}.
$$

This is the companion matrix of

$$
f(t)=t^3+6t^2-11t+6.
$$

Actually, using the companion convention above, the last column is

$$
\begin{bmatrix}
-a_0\\
-a_1\\
-a_2
\end{bmatrix} =
\begin{bmatrix}
-6\\
11\\
-6
\end{bmatrix}.
$$

Thus

$$
a_0=6,
\qquad
a_1=-11,
\qquad
a_2=6.
$$

The characteristic polynomial and minimal polynomial are both \(f(t)\).

There is one invariant factor:

$$
f_1(t)=f(t).
$$

Therefore the rational canonical form of \(A\) is \(A\) itself.

A matrix whose minimal polynomial equals its characteristic polynomial is called cyclic. Its rational canonical form has one companion block.

## 71.10 Example with Two Invariant Factors

Suppose a \(4\times4\) matrix \(A\) has invariant factors

$$
f_1(t)=t-2
$$

and

$$
f_2(t)=(t-2)^3.
$$

They satisfy

$$
f_1\mid f_2.
$$

The rational canonical form is

$$
R=C(t-2)\oplus C((t-2)^3).
$$

Now

$$
C(t-2)=[2].
$$

Also,

$$
(t-2)^3=t^3-6t^2+12t-8.
$$

Thus

$$
C((t-2)^3)=
\begin{bmatrix}
0 & 0 & 8 \\
1 & 0 & -12 \\
0 & 1 & 6
\end{bmatrix}.
$$

Therefore

$$
R=
\begin{bmatrix}
2 & 0 & 0 & 0 \\
0 & 0 & 0 & 8 \\
0 & 1 & 0 & -12 \\
0 & 0 & 1 & 6
\end{bmatrix}.
$$

The characteristic polynomial is

$$
p_A(t)=(t-2)^4,
$$

and the minimal polynomial is

$$
m_A(t)=(t-2)^3.
$$

## 71.11 Relation to Jordan Form

When the characteristic polynomial splits into linear factors, rational canonical form and Jordan form contain the same structural information, but package it differently.

Jordan form uses blocks

$$
J_k(\lambda).
$$

Rational canonical form uses companion matrices of invariant factors.

For a single Jordan block \(J_k(\lambda)\), the corresponding polynomial is

$$
(t-\lambda)^k.
$$

The companion matrix \(C((t-\lambda)^k)\) is similar to the Jordan block \(J_k(\lambda)\), but it uses a different basis.

Thus Jordan form is eigenvector-chain based. Rational canonical form is polynomial-module based.

Jordan form is more geometric. Rational canonical form is more field-independent.

## 71.12 Rational Form Over Non-Algebraically Closed Fields

Let

$$
A=
\begin{bmatrix}
0 & -1 \\
1 & 0
\end{bmatrix}.
$$

Over \(\mathbb{R}\), the polynomial

$$
t^2+1
$$

is irreducible. The rational canonical form has one block \(C(t^2+1)\).

Over \(\mathbb{C}\),

$$
t^2+1=(t-i)(t+i).
$$

The matrix becomes diagonalizable:

$$
A\sim
\begin{bmatrix}
i & 0 \\
0 & -i
\end{bmatrix}.
$$

Thus extending the field can change the Jordan description. The rational canonical form over the original field avoids choosing roots outside the field.

## 71.13 The Module Viewpoint

Rational canonical form is most naturally explained using modules.

Let \(V\) be a finite-dimensional vector space over \(F\), and let \(T:V\to V\) be linear.

Make \(V\) into an \(F[t]\)-module by defining

$$
p(t)\cdot v=p(T)v.
$$

Since \(F[t]\) is a principal ideal domain, the structure theorem for finitely generated modules over a PID applies.

It gives a decomposition

$$
V\cong F[t]/(f_1(t))\oplus\cdots\oplus F[t]/(f_r(t)),
$$

where

$$
f_1\mid f_2\mid\cdots\mid f_r.
$$

These polynomials are the invariant factors. Writing multiplication by \(t\) on each quotient gives the companion matrix \(C(f_i)\). The block diagonal sum of these companion matrices is the rational canonical form.

## 71.14 Characteristic Polynomial from Invariant Factors

If

$$
R=C(f_1)\oplus\cdots\oplus C(f_r),
$$

then the characteristic polynomial of \(R\) is the product of the characteristic polynomials of the blocks.

Since

$$
p_{C(f_i)}(t)=f_i(t),
$$

we get

$$
p_A(t)=f_1(t)f_2(t)\cdots f_r(t).
$$

Thus the invariant factors multiply to the characteristic polynomial.

This means the degrees satisfy

$$
\deg f_1+\deg f_2+\cdots+\deg f_r=n.
$$

The total size of all companion blocks equals the dimension of the vector space.

## 71.15 Minimal Polynomial from Invariant Factors

For a block diagonal matrix, the minimal polynomial is the least common multiple of the minimal polynomials of the blocks.

Each companion block \(C(f_i)\) has minimal polynomial \(f_i\).

Therefore

$$
m_A(t)=\operatorname{lcm}(f_1,\ldots,f_r).
$$

Since

$$
f_1\mid f_2\mid\cdots\mid f_r,
$$

the least common multiple is

$$
f_r.
$$

Thus the largest invariant factor is the minimal polynomial:

$$
m_A(t)=f_r(t).
$$

This is one of the main computational checks on rational canonical form.

## 71.16 Similarity Classification

The rational canonical form solves the similarity classification problem over a field.

For square matrices \(A\) and \(B\) over \(F\),

$$
A \sim B
$$

if and only if they have the same invariant factors.

Equivalently,

$$
A
$$

and

$$
B
$$

are similar if and only if they have the same rational canonical form.

This is stronger than comparing characteristic polynomials or minimal polynomials alone. Two matrices may have the same characteristic and minimal polynomials but different invariant factors.

## 71.17 Characteristic and Minimal Polynomials Are Not Enough

Consider two matrices with invariant factors

$$
f_1(t)=t-1,
\qquad
f_2(t)=(t-1)^2,
$$

and another matrix with invariant factors

$$
g_1(t)=(t-1)^2,
\qquad
g_2(t)=t-1.
$$

After ordering by divisibility, these are the same list.

But compare instead:

$$
f_1(t)=t-1,
\qquad
f_2(t)=(t-1)^2
$$

with

$$
g_1(t)=1,
\qquad
g_2(t)=(t-1)^3.
$$

Ignoring trivial factors, the second matrix has one nontrivial invariant factor \((t-1)^3\), while the first has two nontrivial invariant factors.

Both may have related eigenvalue data, but the rational canonical forms differ.

The invariant factor list gives the exact similarity class.

## 71.18 Relation to Elementary Divisors

Invariant factors can be refined into elementary divisors by factoring them into powers of irreducible polynomials.

For example, suppose

$$
f_1(t)=(t-1)(t^2+1)
$$

and

$$
f_2(t)=(t-1)^3(t^2+1)^2.
$$

The elementary divisors are the prime-power factors:

$$
t-1,
\qquad
t^2+1,
\qquad
(t-1)^3,
\qquad
(t^2+1)^2.
$$

The primary rational canonical form uses these elementary divisors. The invariant-factor rational canonical form uses the divisibility chain \(f_1\mid f_2\mid\cdots\).

Both forms are useful. The invariant-factor form avoids unnecessary factorization and gives a compact uniqueness statement.

## 71.19 Rational Canonical Form and Diagonalization

A matrix is diagonalizable over \(F\) if and only if its minimal polynomial splits over \(F\) into distinct linear factors.

Since

$$
m_A(t)=f_r(t),
$$

this means that the largest invariant factor must split into distinct linear factors.

For example, if

$$
m_A(t)=(t-1)(t-3)(t+2),
$$

then the matrix is diagonalizable over \(F\), assuming those scalars lie in \(F\).

If

$$
m_A(t)=(t-1)^2(t+2),
$$

then the matrix is not diagonalizable.

If

$$
m_A(t)=t^2+1
$$

over \(\mathbb{R}\), then the matrix is not diagonalizable over \(\mathbb{R}\), since the polynomial does not split over \(\mathbb{R}\).

## 71.20 Rational Canonical Form and Cayley-Hamilton

Because

$$
p_A(t)=f_1(t)\cdots f_r(t)
$$

and

$$
m_A(t)=f_r(t),
$$

the divisibility chain implies

$$
m_A(t)\mid p_A(t).
$$

This is consistent with Cayley-Hamilton, which says

$$
p_A(A)=0.
$$

The rational canonical form gives a structural explanation. Each companion block \(C(f_i)\) is annihilated by \(f_i\), and therefore by \(f_r\), since \(f_i\mid f_r\). Hence the whole rational canonical form is annihilated by \(f_r\), the minimal polynomial.

## 71.21 Computing Rational Canonical Form

In practice, rational canonical form may be computed from the Smith normal form of the polynomial matrix

$$
tI-A.
$$

The Smith normal form over \(F[t]\) produces diagonal polynomial entries whose nonunit entries determine the invariant factors.

This method relies on the fact that \(F[t]\) is a principal ideal domain.

A rough procedure is:

| Step | Operation |
|---|---|
| 1 | Form the polynomial matrix \(tI-A\). |
| 2 | Compute its Smith normal form over \(F[t]\). |
| 3 | Extract the invariant factors. |
| 4 | Build companion matrices for those factors. |
| 5 | Assemble their block diagonal direct sum. |

This is the algebraic route to rational canonical form. It avoids solving for eigenvalues.

## 71.22 Example Using Minimal and Characteristic Polynomials

Suppose \(A\) is a \(5\times5\) matrix with

$$
p_A(t)=(t^2+1)^2(t-3)
$$

and

$$
m_A(t)=(t^2+1)(t-3).
$$

Since the largest invariant factor is the minimal polynomial, one invariant factor must be

$$
f_2(t)=(t^2+1)(t-3).
$$

The product of all invariant factors must be the characteristic polynomial. Therefore the remaining factor must be

$$
f_1(t)=t^2+1.
$$

Check the divisibility condition:

$$
t^2+1
\mid
(t^2+1)(t-3).
$$

Thus the rational canonical form is

$$
C(t^2+1)\oplus C((t^2+1)(t-3)).
$$

The first block has size \(2\). The second block has size \(3\). Together they form a \(5\times5\) matrix.

## 71.23 Common Errors

The first common error is to confuse rational canonical form with Jordan form. Jordan form uses eigenvalues and Jordan blocks. Rational canonical form uses polynomials and companion matrices.

The second common error is to assume rational means entries are rational numbers. The form works over any field.

The third common error is to ignore the divisibility chain

$$
f_1\mid f_2\mid\cdots\mid f_r.
$$

Without this chain, a block decomposition by companion matrices is not the invariant-factor rational canonical form.

The fourth common error is to think characteristic and minimal polynomials always determine the rational canonical form. They often help, but the full invariant factor list is needed.

The fifth common error is to factor polynomials unnecessarily. One advantage of rational canonical form is that it can be described over the base field without splitting the characteristic polynomial.

## 71.24 Summary

Rational canonical form expresses a square matrix over a field \(F\) as a block diagonal matrix of companion matrices:

$$
R=C(f_1)\oplus C(f_2)\oplus\cdots\oplus C(f_r),
$$

where

$$
f_1\mid f_2\mid\cdots\mid f_r.
$$

The polynomials \(f_i\) are the invariant factors.

They satisfy

$$
f_1f_2\cdots f_r=p_A
$$

and

$$
f_r=m_A.
$$

Rational canonical form exists over every field and classifies matrices up to similarity over that field. It is the field-independent counterpart of Jordan form and the natural canonical form arising from the module structure of a vector space under a linear operator.
