Home Online Manual
Top
Back: busadj
Forward: adjoint
FastBack:
FastForward:
Up: linalg_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.3.2.8 charpoly

Procedure from library linalg.lib (see linalg_lib).

Usage:
charpoly(A[,v]); A square matrix, v string, name of a variable

Return:
poly, the characteristic polynomial det(E*v-A)
(default: v=name of last variable)

Note:
A must be independent of the variable v. The computation uses det. If printlevel>0, det(E*v-A) is diplayed recursively.

Example:
 
LIB "linalg.lib";
ring r=0,(x,t),dp;
matrix A[3][3]=1,x2,x,x2,6,4,x,4,1;
print(A);
==> 1, x2,x,
==> x2,6, 4,
==> x, 4, 1 
charpoly(A,"t");
==> -x4t+x4-8x3-x2t+t3+6x2-8t2-3t+10