Previous Up Next

15.2.1  Eigenvalues

The eigenvals command finds eigenvalues of a matrix.

Remark.

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.

Examples

eigenvals([[4,1,-2],[1,2,-1],[2,1,0]])
     
2,2,2           
eigenvals([[4,1,0],[1,2,-1],[2,1,0]])
     
 
rootof⎛
⎝
⎡
⎣
⎡
⎣
1,0,−20,0,100⎤
⎦
,⎡
⎣
1,0,−24,0,144,0,−148⎤
⎦
⎤
⎦
⎞
⎠
18
,
         
 
rootof⎛
⎝
⎡
⎣
⎡
⎣
−1,0,20,18,8⎤
⎦
,⎡
⎣
1,0,−24,0,144,0,−148⎤
⎦
⎤
⎦
⎞
⎠
36
,
         
 
rootof⎛
⎝
⎡
⎣
⎡
⎣
−1,0,20,−18,8⎤
⎦
,⎡
⎣
1,0,−24,0,144,0,−148⎤
⎦
⎤
⎦
⎞
⎠
36
         
evalf(eigenvals([[4,1,0],[1,2,-1],[2,1,0]]))
     
1.46081112719,4.21431974338,0.324869129433           

Previous Up Next