linalg::eigenvalues --
eigenvalues of a matrix
Introductionlinalg::eigenvalues(A) returns a list of
the eigenvalues of the matrix A.
Call(s)linalg::eigenvalues(A <, Multiple>)
ParametersA |
- | a square matrix of a domain of category Cat::Matrix |
OptionsMultiple |
- | In addition, the algebraic multiplicity of each
eigenvalue of A is returned. |
Returnsa set of the eigenvalues of A, or a list of inner lists
when the option Multiple is given (see
below).
Related
Functionsnumeric::eigenvalues, linalg::charpoly, linalg::eigenvectors,
solve
Detailsnumeric::eigenvalues, if the
matrix A is defined over the component ring Dom::Float (see example 1). In this case it is recommended to call
numeric::eigenvalues directly for a better
efficiency.A. The solver solve must be able to compute the
roots of the characteristic polynomial over the component ring of
A.
Option: MultipleA and its algebraic multiplicity. Note that
due to rounding errors, this may lead to wrong results in cases where
multiple eigenvalues exist and numeric::eigenvalues is
used.
Example
1We compute the eigenvalues of the matrix
+- -+
| 1, 4, 2 |
| |
A = | 1, 4, 2 |
| |
| 2, 5, 3 |
+- -+
>> A := matrix([[1, 4, 2], [1, 4, 2], [2, 5, 3]]): linalg::eigenvalues(A)
1/2 1/2
{0, 15 + 4, 4 - 15 }
If we consider the matrix over the domain
Dom::Float, then the call of
linalg::eigenvalues(A) results in a numerical
computation of the eigenvalues of A via numeric::eigenvalues:
>> B := Dom::Matrix(Dom::Float)(A): linalg::eigenvalues(B)
{9.622294281e-19, 0.1270166538, 7.872983346}
Example
2With the option Multiple we get the information about the algebraic multiplicity of each eigenvalue:
>> C := Dom::Matrix(Dom::Rational)(4, 4, [[-3], [0, 6]])
+- -+
| -3, 0, 0, 0 |
| |
| 0, 6, 0, 0 |
| |
| 0, 0, 0, 0 |
| |
| 0, 0, 0, 0 |
+- -+
>> linalg::eigenvalues(C, Multiple)
[[6, 1], [0, 2], [-3, 1]]
linalg::eigenValuesnumeric::eigenvalues for a
floating-point approximation of the eigenvalues.