Rational Canonical Form

Any square matrix T has a canonical form without any need to extend the field of its coefficients. For instance, if the entries of T are rational numbers, then so are the entries of its rational canonical form. (The Jordan canonical form may require complex numbers.) There exists a nonsingular matrix Q such that


called the rational canonical form, where L(f) is the companion matrix for the monic polynomial


The polynomials psi_i are called the "invariant factors" of T, and satisfy psi_i|psi_(i+1) for i=1, ..., s-1 (Hartwig 1996). The polynomial psi_s is the matrix minimal polynomial and the product productpsi_i is the characteristic polynomial of T.

The rational canonical form is unique, and shows the extent to which the minimal polynomial characterizes a matrix. For example, there is only one 6×6 matrix whose matrix minimal polynomial is (x^2+1)^2, which is

 [0 -1 0 0 0 0; 1 0 0 0 0 0; 0 0 0 0 0 -1; 0 0 1 0 0 0; 0 0 0 1 0 -2; 0 0 0 0 1 0]

in rational canonical form.

Given a linear transformation T:V->V, the vector space V becomes a F[x]-module, that is a module over the ring of polynomials with coefficients in the field F. The vector space determines the field F, which can be taken to be the maximal field containing the entries of a matrix for T. The polynomial x acts on a vector v by x(v)=T(v). The rational canonical form corresponds to writing V as

 F[x]/(a_1) direct sum ... direct sum F[x]/(a_s),

where (a_i) is the ideal generated by the invariant factor a_i in F[x], the canonical form for any finitely generated module over a principal ring such as F[x].

More constructively, given a basis e_i for V, there is a module homomorphism


which is a surjection, given by


Letting K be the module kernel,


To construct a basis for the rational canonical form, it is necessary to write K as

 K= direct sum _(i=1)^(n-s)F[x] direct sum F[x]/(a_1) direct sum ... direct sum F[x]/(a_s),

and that is done by finding an appropriate basis for F[x]^n and for K. Such a basis is found by determining matrices P and Q that are invertible n×n matrices having entries in F[x] (and whose inverses are also in F[x]) such that

 P(xI-T)Q= diag(1,...,1,a_1,...,a_s),

where I is the identity matrix and diag(a_1,...,a_n) denotes a diagonal matrix. They can be found by using elementary row and column operations.

The above matrix sends a basis for K, written as an n-tuple, to an n-tuple using a new basis f_i for F[x]^n, and P gives the linear transformation from the original basis to the one with the f_i. In particular,


where beta_i is an arbitrary polynomial in F[x]. Setting z_i=P^(-1)(T)e_(n-s+i),

 V=F[x]z_1 direct sum ... direct sum F[x]z_s.

In particular, F[x]z_i is the subspace of V which is generated by z_i,xz_i,...,x^(n-1)z_i, where n is the degree of a_i. Therefore, a basis that puts T into rational canonical form is given by


See also

Block Diagonal Matrix, Characteristic Polynomial, Companion Matrix, Field, Invariant Factor, Jordan Canonical Form, Matrix, Matrix Minimal Polynomial, Principal Ring, Reduction Algorithm, Similar Matrices, Smith Normal Form

Portions of this entry contributed by Todd Rowland

Explore with Wolfram|Alpha


Hartwig, R. E. "Roth's Removal Rule and the Rational Canonical Form." Amer. Math. Monthly 103, 332-335, 1996.

Referenced on Wolfram|Alpha

Rational Canonical Form

Cite this as:

Rowland, Todd and Weisstein, Eric W. "Rational Canonical Form." From MathWorld--A Wolfram Web Resource.

Subject classifications