charpoly(M, lambda) returns sym_det(lambda*I - M). eigenvals() returns
the roots of the characteristic polynomial with multiplicities;
eigenvects() returns a list of list(value, multiplicity, vectors).
diagonalize() returns list(P, D) with M = P D P^-1. is_diagonalizable()
tests whether that is possible.
Usage
charpoly(M, lambda = Symbol("lambda"))
eigenvals(
M,
error_when_incomplete = TRUE,
simplify = FALSE,
multiple = FALSE,
rational = FALSE,
...
)
eigenvects(
M,
error_when_incomplete = TRUE,
iszerofunc = NULL,
simplify = FALSE,
chop = FALSE,
...
)
is_diagonalizable(M, reals_only = FALSE)
diagonalize(M, reals_only = FALSE, sort = FALSE, normalize = FALSE)Arguments
- M
A square
symmatrix.- lambda
Symbol for the characteristic polynomial.
- error_when_incomplete
Signal a
MatrixErrorwhen some eigenvalues cannot be found.- simplify
FALSE,TRUEor a function applied to each result.- multiple
Return the eigenvalues as a list repeated by multiplicity instead of a list with attribute
"multiplicity".- rational
Replace floating point entries by rationals first.
- ...
Flags passed to
roots().- iszerofunc
A zero test returning
TRUE,FALSEorNA;NULLuses the default test.- chop
Accepted for SymPy compatibility; currently not used.
- reals_only
Treat a matrix with complex eigenvalues as not diagonalizable.
- sort
Sort the eigenvalues on the diagonal.
- normalize
Scale each column of
Pto unit norm.