A new algorithm is presented for the computation of canonical forms of
matrices over fields. These are the Primary Rational, Rational, and J
ordan canonical forms. The algorithm works by obtaining a decompositio
n of the vector space acted on by the given matrix into primary cyclic
spaces (spaces whose minimal polynomials with respect to the matrix a
re powers of irreducible polynomials). An efficient implementation of
the algorithm is incorporated in the MAGMA Computer Algebra System. (C
) 1997 Academic Press Limited.