The eigenvals command finds eigenvalues of a matrix.
Xcas may not be able to find the exact roots of the characteristic polynomial in some cases. In that case, eigenvals(A) will return approximate eigenvalues of A if the coefficients are numeric or a subset of the eigenvalues if the coefficients are symbolic.
eigenvals([[4,1,-2],[1,2,-1],[2,1,0]]) |
|
eigenvals([[4,1,0],[1,2,-1],[2,1,0]]) |
|
evalf(eigenvals([[4,1,0],[1,2,-1],[2,1,0]])) |
|