Rational canonical form (source code)

= Rational canonical form
{wiki}

The rational canonical form of a <linear operator> on a finite-dimensional <vector space> over a <field> is a direct sum $C(f_1)\oplus\cdots\oplus C(f_r)$ of <companion matrices>, where the monic nonconstant <invariant factors of a linear operator> satisfy $f_1\mid\cdots\mid f_r$. Their degrees sum to the <dimension> of the space. It exists over any <field> and classifies <similar matrices>, without requiring their <eigenvalues> to lie in that field. It comes from the <structure theorem for finitely generated modules over a principal ideal domain>, applied to the <module> in which the indeterminate acts as the given operator.