Skip to main content

Module shift_invert

Module shift_invert 

Source
Expand description

Shift-invert power iteration for the eigenvalue nearest a target shift.

Ordinary power iteration converges to the eigenvalue of largest magnitude. The shift-invert spectral transformation turns the interior eigenvalue search into a dominant-eigenvalue search: for a shift σ the operator

    B = (A − σI)^{-1}

has eigenvalues μ_i = 1 / (λ_i − σ), so the eigenvalue λ_i closest to σ becomes the one of largest magnitude |μ_i|. Power iteration on B therefore homes in on the eigenpair nearest σ – precisely the eigenvalue ordinary power iteration would miss.

Each iteration solves (A − σI) w = v_k rather than forming B explicitly. The solve uses a single dense LU factorisation of the (small) shifted matrix A − σI, computed once and reused across all iterations (the crate carries no general sparse direct factorisation; a dense LU on the assembled shifted matrix is the documented fallback and is exact for the small problems this routine targets). From the Rayleigh quotient of the inverted operator,

    μ = v_kᵀ B v_k / v_kᵀ v_k = v_kᵀ w   (v_k unit-norm),

the eigenvalue of A is recovered as λ = σ + 1/μ. Convergence is declared when the eigenpair residual ‖A v − λ v‖ falls below the tolerance.

Structs§

ShiftInvertResult
Outcome of a shift-invert solve.

Functions§

shift_invert
Finds the eigenvalue of a closest to the shift sigma via shift-invert power iteration.