Previous Up Next

15.2.7 Characteristic polynomial

The characteristic polynomial of a square matrix A is the polynomial

P(x)=det(x IA).

The charpoly or pcar command finds the characteristic polynomial of a matrix.

Examples

charpoly([[4,1,-2],[1,2,-1],[2,1,0]])

1,−6,12,−8
          

Hence, the characteristic polynomial of this matrix is x3−6x2+12x−8.

charpoly([[4,1,-2],[1,2,-1],[2,1,0]],X)
X3−6 X2+12 X−8           

Previous Up Next