The characteristic polynomial of a square matrix A is the polynomial
P(x)=det(x I−A). |
The charpoly or pcar command finds the characteristic polynomial of a matrix.
charpoly([[4,1,-2],[1,2,-1],[2,1,0]]) |
|
Hence, the characteristic polynomial of this matrix is x3−6x2+12x−8.
charpoly([[4,1,-2],[1,2,-1],[2,1,0]],X) |
|