The spectral radius of a square matrix is the largest magnitude among all its eigenvalues. In discrete-time dynamical systems, the spectral radius of the state-transition matrix is the single most important scalar quantity: if it is strictly less than one, every state trajectory converges to zero; if it equals or exceeds one, at least one mode grows without bound or fails to decay. Rather than reporting only a binary stable/unstable flag, exposing the spectral radius and the complementary stability margin (one minus the spectral radius) gives the designer a quantitative handle on how much gain or perturbation the system can tolerate before losing stability.
Given an
The Faddeev–LeVerrier recurrence computes the coefficients
This recurrence requires only matrix-matrix multiplication, scalar multiplication of a matrix by the identity, and the trace, making it suitable for static (stack-allocated) computation without a heap.
Given the full set of eigenvalues
The roots are found numerically with the Durand–Kerner simultaneous root-finding iteration, which converges for arbitrary polynomials and requires only a fixed-size array of complex iterates.
A matrix
A positive margin indicates Schur stability;
| Case | Time | Space | Notes |
|---|---|---|---|
| Best | Faddeev–LeVerrier dominates; two |
||
| Average |
|
||
| Worst | Near-repeated roots slow DK convergence |
The Faddeev–LeVerrier step executes
Consider $A = \begin{pmatrix} 0 & -1 \ 1 & 0 \end{pmatrix}$ (90° rotation,
-
k = 1:
$M_1 = A \cdot 0 + I \cdot c_0$ . With$c_0 = 1$ :$M_1 = I$ . Then$c_1 = -\tfrac{1}{1}\mathrm{tr}(A \cdot M_1) = -\mathrm{tr}(A) = 0$ . -
k = 2:
$M_2 = A(M_1 + c_1 I) = A \cdot I = A$ . Then$c_2 = -\tfrac{1}{2}\mathrm{tr}(A \cdot A) = -\tfrac{1}{2}\mathrm{tr}(-I) = 1$ .
Characteristic polynomial:
-
Near-repeated roots: Durand–Kerner converges slowly when two or more eigenvalues are nearly identical. The stability conclusion (inside/outside unit disk) is unaffected, but the raw
$\rho$ value may have larger numerical error. - Identity approximation in Matrix::Identity(): This implementation builds its own exact identity to avoid reliance on library internals.
-
Ill-conditioned characteristic polynomials: For large
$n$ the polynomial coefficients can have widely different magnitudes, degrading root-finder precision. The algorithm is intended for small matrices ($n \le 6$ ) typical of discrete-time state-space models. -
Size = 1 case: Handled directly as
$\rho = |a_{11}|$ , bypassing polynomial computation. -
Zero matrix:
$\rho = 0$ ,$\delta = 1$ (maximally stable). Handled correctly by the recurrence.
-
Power iteration computes only the dominant eigenvalue magnitude without the full spectrum; cheaper for large
$n$ but provides no stability margin without additional eigenpair deflation. - QR algorithm (Jacobi, Hessenberg QR) finds all eigenvalues more robustly for large or symmetric matrices; too expensive and heap-dependent for small embedded targets.
- Continuous-time analogue: Replace the unit-disk criterion with the left half-plane criterion; Routh–Hurwitz or Lyapunov-based approaches apply.
- Verifying discrete-time state-feedback or observer designs remain within the unit disk after coefficient quantisation.
- Checking closed-loop stability after LQR or pole-placement synthesis before deployment.
- Computing gain/phase margins indirectly by perturbing the loop gain and re-evaluating
$\rho$ . - Monitoring on-line whether a time-varying system's frozen eigenvalues have drifted outside the unit disk.
- Uses Durand–Kerner (polynomial root-finder) for the eigenvalue computation stage.
- The characteristic polynomial recurrence is mathematically related to Leverrier's method for matrix inverses and adjoints.
- The Schur-stability criterion is the discrete-time counterpart of the Hurwitz criterion used in continuous-time control analysis.
- The stability margin scalar is a prerequisite for TESTING.md evaluation metrics that require a quantitative stability distance.
- Faddeev, D. K. & LeVerrier, U. J. F. — classical matrix identity; see G. H. Golub & C. F. Van Loan, Matrix Computations, 4th ed., Section 7.3.
- Durand, E. (1960) and Kerner, I. O. (1966) — simultaneous root-finding; see Numerical Recipes in C, 3rd ed., Section 9.5.
- Schur stability: K. J. Åström & B. Wittenmark, Computer-Controlled Systems, 3rd ed., Chapter 3.