next up previous contents index
suivant: Minimal polynomial : pmin monter: Matrix reduction précédent: Characteristic polynomial : charpoly   Table des matières   Index


Characteristic polynomial using Hessenberg algorithm :
pcar_hessenberg

pcar_hessenberg takes as argument a square matrix A of size n and optionnaly the name of a symbolic variable.
pcar_hessenberg returns the characteristic polynomial P of A written as the list of its coefficients if no variable was provided or written in its symbolic form with respect to the variable name given as second argument, where

P(x) = det(xI - A)

The characteristic polynomial is computed using the Hessenberg algorithm (see e.g. Cohen) which is more efficient (O(n3) deterministic) if the coefficients of A 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 e.g. in $ \mathbb {Q}$.
Input :
pcar_hessenberg([[4,1,-2],[1,2,-1],[2,1,0]] % 37)
Output :
[1 % 37 ,-6% 37,12 % 37,-8 % 37]
Input :
pcar_hessenberg([[4,1,-2],[1,2,-1],[2,1,0]] % 37,x)
Output :
x^3-6 %37 *x^2+12 % 37 *x-8 % 37
Hence, the characteristic polynomial of [[4,1,-2],[1,2,-1],[2,1,0]] in $ \mathbb {Z}$/37$ \mathbb {Z}$ is

x3 -6x2 + 12x - 8


next up previous contents index
suivant: Minimal polynomial : pmin monter: Matrix reduction précédent: Characteristic polynomial : charpoly   Table des matières   Index
giac documentation written by Renée De Graeve and Bernard Parisse