The pcar_hessenberg command finds the characteristic polynomial of a matrix. It computes the polynomial using the Hessenberg algorithm (see e.g. Henri Cohen, A Course in Computational Algebraic Number Theory) which is more efficient (O(n3) deterministic) if the coefficients of the matrix are in a finite field or use a finite representation like approximate numeric coefficients. Note however that this algorithm behaves badly if the coefficients are, for example, in ℚ.
Examples.
⎡ ⎣ | 1%37, | ⎛ ⎝ | −6 | ⎞ ⎠ | %37,12%37, | ⎛ ⎝ | −8 | ⎞ ⎠ | %37 | ⎤ ⎦ |
⎛ ⎝ | 1%37 | ⎞ ⎠ | x3+ | ⎛ ⎝ | ⎛ ⎝ | −6 | ⎞ ⎠ | %37 | ⎞ ⎠ | x2+ | ⎛ ⎝ | 12%37 | ⎞ ⎠ | x+ | ⎛ ⎝ | −8 | ⎞ ⎠ | %37 |