### 15.2.1 Eigenvalues

The eigenvals command finds eigenvalues of a matrix.

- eigenvals takes A, a square matrix.
- eigenvals(A) returns the sequence of the eigenvalues of A, including multiplicities. (If A is an n× n matrix, then the sequence will have n values.)

##### 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 |  |  |  |  |  |  |  |  |  |