Skip to main content

Module spectral

Module spectral 

Source
Expand description

Matrix-spectral bridge: characteristic polynomial + general (non-symmetric) eigenvalues. Matrix-spectral routines that bridge linear algebra and polynomial algebra: the characteristic polynomial and general (non-symmetric) eigenvalues.

characteristic_polynomial uses Faddeev–LeVerrier; eigenvalues_general factors it with the engine’s crate::solvers::polynomial::polynomial_roots. For symmetric matrices prefer [super::eigen::symmetric_eigen] (eigenvectors + better conditioning).

Functions§

characteristic_polynomial
Characteristic polynomial of a row-major n×n matrix via the Faddeev–LeVerrier algorithm. Returns DESCENDING coefficients [1, c₁, …, cₙ] of p(λ) = λⁿ + c₁λⁿ⁻¹ + … + cₙ (so det(A) = (-1)ⁿ·cₙ). Exact for integer matrices; for large/ill-conditioned matrices prefer an iterative eigensolver.
eigenvalues_general
Eigenvalues of a GENERAL (not necessarily symmetric) row-major n×n matrix, as complex numbers. Computes the characteristic polynomial (Faddeev–LeVerrier) and finds its roots. Returns all n eigenvalues; real ones have im ≈ 0.