MeatAxe
2.4
|
zcp Options [-Gfm] Matrix
This program reads in a square matrix and calculates its characteristic or minimal polynomial. With no options, the characteristic polynomial is computed in a partially factored form (see below). With "-m" the polynomial is split into irreducible factors. Without "-G", the output is in text format. Each line contains one factor of the characteristic or minimal polynomial. The "-G" option may be used to generate output which is readable by the GAP computer program. The output, then, is a sequence of sequences of finite field elements, representing the coefficients of the factors in ascending order.
The characteristic polynomial of a matrix A is computed by constructing a sequence
of A-invariant subspaces, where is A-cyclic. In the i-th step, is constructed by chosing a random vector and calculating until some linear combination of these vectors falls into . This yields a polynomial with . is the characteristic polynomial of on , and the full characteristic polynomial of is the product of all 's.
The algorithm for the minimal polynomial uses the same technique of constructing a sequence of invariant subspaces. In the i-th step, images of a seed vector are calculated, until a linear combination of these vectors vanishes (this is the main difference to the algorithm above). This yields a polynomial of minimal degree with , and the minimal polynomial of A is the least common multiple of the 's.