Definition (Residuals and spectral separation). For a candidate eigenpair (\lambda,\mathbf{x}), the residual is \mathbf{r}=\mathbf{A}\mathbf{x}-\lambda\mathbf{x}. For a candidate diagonalization, a matrix residual is \mathbf{A}\mathbf{U}-\mathbf{U}\mathbf\Lambda. A small residual measures how well the equation is satisfied. Converting it to a distance from a particular invariant subspace requires the relevant spectral-separation assumptions.
Perturbation theory
Perturbation bounds turn an error in a matrix or a computed equation into an error in an eigenvalue, singular value, or subspace. Values and subspaces behave differently: subspace bounds usually need a gap separating the spectral sets of interest.
Background
Mathematical guarantees
Theorem (Perturbation of Hermitian eigenvalues). For Hermitian matrices \mathbf{A},\mathbf{B} of the same dimension, with eigenvalues in the same ordering,
|\lambda_j(\mathbf{A})-\lambda_j(\mathbf{B})|\le\|\mathbf{A}-\mathbf{B}\|_2
for every index j. Controlling a matrix perturbation in spectral norm controls every ordered eigenvalue.
Lean statement and details
Matrix.IsHermitian.abs_eigenvalue_sub_le.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2}
[Fintype n] {A B : Matrix n n 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian) (k : ℕ) :
|eigenvalue A k - eigenvalue B k| ≤ specNorm (A - B)For a non-Hermitian matrix no such linear bound holds: a Jordan block of order n perturbed by \varepsilon in one corner has eigenvalues of modulus \varepsilon^{1/n}. The Ostrowski–Elsner theorem shows that this root is the worst case, for every matrix, with a matching of the two spectra.
Theorem (Ostrowski–Elsner matching). For complex matrices \mathbf{A},\mathbf{A}' of order n+1 and every listing \lambda_0,\dots,\lambda_n of the eigenvalues of \mathbf{A} with multiplicity, there is a listing \lambda'_0,\dots,\lambda'_n of those of \mathbf{A}' with
|\lambda'_i-\lambda_i|\le(2n+1)\bigl(\|\mathbf{A}\|_2+\|\mathbf{A}'\|_2\bigr)^{1-1/(n+1)}\|\mathbf{A}'-\mathbf{A}\|_2^{1/(n+1)}
for every i.
Lean statement and details
NLAlib.exists_isEigenvalueListing_norm_sub_le_rpow {n : ℕ}
{A A' : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {ev : Fin (n + 1) → ℂ}
(hev : IsEigenvalueListing A ev) :
∃ ev',
IsEigenvalueListing A' ev' ∧
∀ (i : Fin (n + 1)),
‖ev' i - ev i‖ ≤
(2 * ↑n + 1) * (specNorm A + specNorm A') ^ (1 - 1 / (↑n + 1)) *
specNorm (A' - A) ^ (1 / (↑n + 1))This is Lemma 1.2 of Banks, Garza-Vargas and Srivastava, Global convergence of Hessenberg shifted QR III. The constant 2n+1 comes from an argument over the connected components of the union of disks around the eigenvalues; Bhatia, Elsner and Krause have the constant 4. The randomized shifted inverse iteration (BGS III) uses it to turn a backward error into a forward error for the eigenvalues: a backward error \delta_\mathbf{b} gives a forward error of order \delta_\mathbf{b}^{1/(n+1)}.
Theorem (Forward error through a diagonalizable matrix). Let \mathbf{A}+\mathbf{E}_1=\mathbf{V}\operatorname{diag}(\mathbf{d})\mathbf{V}^{-1} with \|\mathbf{V}\|_2\|\mathbf{V}^{-1}\|_2\le B and eigenvalues separated by g>0, and let \|\mathbf{E}_2\|_2\le g/(16(n+1)B). Then every listing \mathbf{r} of the eigenvalues of \mathbf{A}+\mathbf{E}_1+\mathbf{E}_2 is matched to a listing \boldsymbol\lambda of those of \mathbf{A} with
|r_i-\lambda_i|\le B\|\mathbf{E}_2\|_2+(2n+1)\bigl(2\|\mathbf{A}\|_2+\|\mathbf{E}_1\|_2\bigr)^{1-1/(n+1)}\|\mathbf{E}_1\|_2^{1/(n+1)}
for every i. The first term is the Bauer–Fike perturbation of the diagonalizable matrix; the second is the Ostrowski–Elsner matching for the rest.
Lean statement and details
NLAlib.exists_isEigenvalueListing_norm_sub_le_of_class {n : ℕ}
{A E₁ E₂ V : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {d : Fin (n + 1) → ℂ} {B g : ℝ} (hV : IsUnit V)
(hAV : (A + E₁) * V = V * diagonal d) (hB : pseudoConditionNumber V ≤ B) (hg : 0 < g)
(hgap : ∀ (i j : Fin (n + 1)), i ≠ j → g ≤ ‖d i - d j‖)
(hE₂ : specNorm E₂ ≤ g / (16 * (↑n + 1) * B)) {roots : Fin (n + 1) → ℂ}
(hroots : IsEigenvalueListing (A + E₁ + E₂) roots) :
∃ ev,
IsEigenvalueListing A ev ∧
∀ (i : Fin (n + 1)),
‖roots i - ev i‖ ≤
B * specNorm E₂ +
(2 * ↑n + 1) * (2 * specNorm A + specNorm E₁) ^ (1 - 1 / (↑n + 1)) *
specNorm E₁ ^ (1 / (↑n + 1))Random perturbations make these hypotheses likely: see pseudospectral shattering and Gaussian regularization.
Further results
Theorem (One block step of the loss of orthogonality).
let \mathbf{D}(\cdot) be the Gram defect on the support, \mathbf{D}(\mathbf{Q}) = \mathbf{Q}^{\mathsf{T}}\mathbf{Q} - \operatorname{diag}(\mathbf{s}) with s_j = 0 at a zero column of \mathbf{Q} and s_j = 1 otherwise. If (\mathbf{Q}', \mathbf{H}, \mathbf{R}) is a rounded extension (NLAlib.IsBasisExtensionErr) of the real basis \mathbf{Q} with parameters (\eta_0, \mu, \varepsilon), \mathbf{Q}' has b columns and \mathbf{Q} is in the window, \sqrt{\|\mathbf{D}(\mathbf{Q})\|_{\mathsf{F}}^2 + 3b\mu^2} \le \eta_0, then \|\mathbf{D}([\mathbf{Q}, \mathbf{Q}'])\|_{\mathsf{F}}^2 \le \|\mathbf{D}(\mathbf{Q})\|_{\mathsf{F}}^2 + 3b\mu^2\,. No printed source.
Lean statement and details
NLAlib.IsBasisExtensionErr.frobNorm_gramDefect_fromCols_sq_le {n k b : ℕ} {η₀ μ ε : ℝ}
{Q : Matrix (Fin n) (Fin k) ℝ} {W Q' : Matrix (Fin n) (Fin b) ℝ} {H : Matrix (Fin k) (Fin b) ℝ}
{R : Matrix (Fin b) (Fin b) ℝ} (hE : IsBasisExtensionErr η₀ μ ε Q W Q' H R)
(hw : ExtensionWindow η₀ μ b Q) :
frobNorm (gramDefect (Q.fromCols Q')) ^ 2 ≤ frobNorm (gramDefect Q) ^ 2 + 3 * ↑b * μ ^ 2Theorem (The Bauer–Fike theorem).
If \mathbf{A}\mathbf{V} = \mathbf{V} \operatorname{diag}(\mathbf{d}) with \mathbf{V} invertible, every eigenvalue \mu of \mathbf{A} + \mathbf{E} satisfies \lvert \mathbf{d}_i - \mu \rvert \le \kappa(\mathbf{V}) \|\mathbf{E}\|_2 for some i. [GolubVanLoan2013, Theorem 7.2.2]; [HornJohnson2013, Theorem 6.3.2].
Lean statement and details
NLAlib.exists_norm_sub_le_pseudoConditionNumber_mul_specNorm.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
{n : Type u_2} [Fintype n] [DecidableEq n] {A V E : Matrix n n 𝕜} {d : n → 𝕜} (hV : IsUnit V)
(hA : A * V = V * diagonal d) {x : n → 𝕜} (hx : x ≠ 0) {μ : 𝕜} (hμ : (A + E) *ᵥ x = μ • x) :
∃ i, ‖d i - μ‖ ≤ pseudoConditionNumber V * specNorm ETheorem (Componentwise relative conditioning).
The spectral norm of the componentwise Jacobian is at most the product of the output scaling norm, the absolute condition of the map, and the input scaling norm. [Gautschi2004, Def 2.4].
Lean statement and details
NLAlib.specNorm_componentwiseJacobian_le.{u_1, u_2, u_3} {𝕜 : Type u_1} {m : Type u_2}
{n : Type u_3} [RCLike 𝕜] [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n]
(f : EuclideanSpace 𝕜 m → EuclideanSpace 𝕜 n) (x : EuclideanSpace 𝕜 m) :
specNorm (componentwiseJacobian f x) ≤
specNorm (diagonal fun i ↦ ((f x).ofLp i)⁻¹) * ‖fderiv 𝕜 f x‖ *
specNorm (diagonal fun j ↦ x.ofLp j)Theorem (Derivative in relative coordinates).
At a differentiability point the componentwise Jacobian represents the derivative of the relative perturbation map at zero. [Gautschi2004, Def 2.4].
Lean statement and details
NLAlib.hasFDerivAt_componentwisePerturbation.{u_1, u_2, u_3} {𝕜 : Type u_1} {m : Type u_2}
{n : Type u_3} [RCLike 𝕜] [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n]
{f : EuclideanSpace 𝕜 m → EuclideanSpace 𝕜 n} {x : EuclideanSpace 𝕜 m}
(hf : DifferentiableAt 𝕜 f x) :
HasFDerivAt (componentwisePerturbation f x)
((toEuclideanLin ≪≫ₗ LinearMap.toContinuousLinearMap) (componentwiseJacobian f x)) 0Theorem (Absolute conditioning in coordinates).
The spectral norm of the Euclidean Jacobian is the operator norm of the Fréchet derivative. [Gautschi2004, Def 2.3].
Lean statement and details
NLAlib.specNorm_euclideanJacobian.{u_1, u_2, u_3} {𝕜 : Type u_1} {m : Type u_2} {n : Type u_3}
[RCLike 𝕜] [Fintype m] [Fintype n] [DecidableEq m] (f : EuclideanSpace 𝕜 m → EuclideanSpace 𝕜 n)
(x : EuclideanSpace 𝕜 m) : specNorm (euclideanJacobian f x) = ‖fderiv 𝕜 f x‖Theorem (Davis–Kahan sin Θ theorem).
, Frobenius norm: for Hermitian \mathbf{A} and \mathbf{E} with \lambda_j(\mathbf{A}) > \lambda_{j+1}(\mathbf{A}), the leading eigenframe \mathbf{U} of \mathbf{A} with j + 1 columns, and a frame \mathbf{Q} with j + 1 columns attaining the largest Rayleigh trace of \mathbf{A} + \mathbf{E}, \|(\mathbf{I} - \mathbf{U}\mathbf{U}^{\mathsf{H}})\mathbf{Q}\|_{\mathsf{F}} \le \frac{\sqrt{2} \, \|\mathbf{E}\|_{\mathsf{F}}} {\lambda_j(\mathbf{A}) - \lambda_{j+1}(\mathbf{A})}. [YuWangSamworth2015, Theorem 2].
Lean statement and details
Matrix.IsHermitian.frobNorm_one_sub_mul_le_sqrt_two_mul_frobNorm_div_eigengap.{u_1, u_2}
{𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2} [Fintype n] [DecidableEq n] {A E : Matrix n n 𝕜}
(hA : A.IsHermitian) (hE : E.IsHermitian) {j : ℕ} {U Q : Matrix n (Fin (j + 1)) 𝕜}
(hU : HasOrthonormalCols U) (hQ : HasOrthonormalCols Q)
(hAU : A * U = U * diagonal fun i ↦ ↑(eigenvalue A ↑i))
(hQtop : RCLike.re (Qᴴ * (A + E) * Q).trace = ∑ i ∈ Finset.range (j + 1), eigenvalue (A + E) i)
(hgap : 0 < eigengap A (j + 1)) :
frobNorm ((1 - U * Uᴴ) * Q) ≤ √2 * frobNorm E / eigengap A (j + 1)Theorem (Gradient of the Rayleigh quotient).
For Hermitian \mathbf{A} and nonzero \mathbf{x} \in \Bbbk^n, let \rho(\mathbf{x}) = \operatorname{Re}(\mathbf{x}^{\mathsf{H}}\mathbf{A}\mathbf{x}) / \|\mathbf{x}\|_2^2. On the underlying real Euclidean space its gradient is \nabla \rho(\mathbf{x}) = \frac{2}{\|\mathbf{x}\|_2^2} (\mathbf{A}\mathbf{x} - \rho(\mathbf{x})\mathbf{x}). [TrefethenBau1997, (27.2), p. 203] gives the real symmetric case.
Lean statement and details
Matrix.IsHermitian.hasGradientAt_rayleighQuotient.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
{n : Type u_2} [Fintype n] {A : Matrix n n 𝕜} (hA : A.IsHermitian) {x : EuclideanSpace 𝕜 n}
(hx : x ≠ 0) :
HasGradientAt (fun y ↦ rayleighQuotient A y.ofLp)
((2 / ‖x‖ ^ 2) • (WithLp.toLp 2 (A *ᵥ x.ofLp) - rayleighQuotient A x.ofLp • x)) xTheorem (Coordinate derivative of a cutoff Gram field).
For a positive power and a real matrix with nonempty row type, take a differentiable test whose closed support lies in (0,\infty). Along the coordinate line based at the matrix, the derivative of the test times the unshifted gradient entry is the sum of the test derivative times the squared gradient entry and the test times the second coordinate coefficient. The formula holds at singular Gram matrices. No printed source. Original NLAlib atlas proof at 77514ce42a0e437d837797a063ac161f41022730.
General form: sizes are index types
Lean statement and details
NLAlib.hasDerivAt_mul_gramSoftMinGradient_single.{u_1, u_2} {ι : Type u_1} {κ : Type u_2}
[Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] [Nonempty ι] (n : ℕ) (hn : 0 < n)
(ψ : ℝ → ℝ) (hψ : Differentiable ℝ ψ) (hψs : tsupport ψ ⊆ Set.Ioi 0) (G : Matrix ι κ ℝ) (i : ι)
(j : κ) :
HasDerivAt
(fun t ↦
ψ (inversePowerSoftMin n ((G + t • single i j 1) * (G + t • single i j 1)ᴴ)) *
gramSoftMinGradient n 0 (G + t • single i j 1) i j)
(deriv ψ (inversePowerSoftMin n (G * Gᴴ)) * gramSoftMinGradient n 0 G i j ^ 2 +
ψ (inversePowerSoftMin n (G * Gᴴ)) * gramSoftMinSecond n 0 G (single i j 1))
0Theorem (The Gram defect on the support bounds the distance to the range projector, Frobenius norm).
for every matrix \mathbf{Q}, with zero columns allowed, \mathbf{Q}\mathbf{Q}^{\mathsf{H}} differs from the orthogonal projector \mathbf{P}_{\mathbf{Q}} onto the column space of \mathbf{Q} by at most the Gram defect on the support \mathbf{D} = \mathbf{Q}^{\mathsf{H}}\mathbf{Q} - \operatorname{diag}(\mathbf{s}) (s_j = 0 at a zero column, s_j = 1 otherwise), \|\mathbf{Q}\mathbf{Q}^{\mathsf{H}} - \mathbf{P}_{\mathbf{Q}}\|_{\mathsf{F}} \le \|\mathbf{D}\|_{\mathsf{F}}\,. No printed source.
Lean statement and details
NLAlib.frobNorm_mul_conjTranspose_sub_rangeProjector_le_gramDefect.{u_1, u_2, u_3} {𝕜 : Type u_1}
[RCLike 𝕜] {m : Type u_2} {ι : Type u_3} [Fintype m] [Fintype ι] [DecidableEq ι]
(Q : Matrix m ι 𝕜) : frobNorm (Q * Qᴴ - rangeProjector Q) ≤ frobNorm (gramDefect Q)Theorem (Perturbation of the inverse).
for invertible \mathbf{A} with \|\mathbf{A}^{-1}\mathbf{E}\|_2 < 1, \|(\mathbf{A} + \mathbf{E})^{-1} - \mathbf{A}^{-1}\|_2 \le \frac{\|\mathbf{A}^{-1}\|_2^2 \|\mathbf{E}\|_2}{1 - \|\mathbf{A}^{-1}\mathbf{E}\|_2}. [GolubVanLoan2013, Theorem 2.3.4].
Lean statement and details
NLAlib.specNorm_inv_add_sub_inv_le.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2} [Fintype n]
[DecidableEq n] {A E : Matrix n n 𝕜} (hA : IsUnit A) (hE : specNorm (A⁻¹ * E) < 1) :
specNorm ((A + E)⁻¹ - A⁻¹) ≤ specNorm A⁻¹ ^ 2 * specNorm E / (1 - specNorm (A⁻¹ * E))Theorem (Euler identity for the unshifted Gram potential).
For a real matrix \mathbf{G} on a nonempty row type and a positive inverse power, the Frobenius pairing of \mathbf{G} with its unshifted gradient coefficient is twice the potential at \mathbf{G}\mathbf{G}^{\mathsf{T}}. The identity includes singular Gram matrices under the total inverse convention. No printed source. Original NLAlib atlas proof at 77514ce42a0e437d837797a063ac161f41022730.
General form: sizes are index types
Lean statement and details
NLAlib.frobInner_gramSoftMinGradient_unshifted_eq_of_pos.{u_1, u_2} {ι : Type u_1} {κ : Type u_2}
[Fintype ι] [Fintype κ] [DecidableEq ι] [Nonempty ι] (n : ℕ) (hn : 0 < n) (G : Matrix ι κ ℝ) :
frobInner G (gramSoftMinGradient n 0 G) = 2 * inversePowerSoftMin n (G * Gᴴ)Theorem (Unshifted Gram gradient energy).
For a real matrix \mathbf{G} on a nonempty row type and a positive inverse power, the squared Frobenius norm of the unshifted gradient coefficient is at most four times the potential at \mathbf{G}\mathbf{G}^{\mathsf{T}}. The bound includes singular Gram matrices. No printed source. Original NLAlib atlas proof at 77514ce42a0e437d837797a063ac161f41022730.
General form: sizes are index types
Lean statement and details
NLAlib.frobNorm_gramSoftMinGradient_sq_unshifted_le_of_pos.{u_1, u_2} {ι : Type u_1} {κ : Type u_2}
[Fintype ι] [Fintype κ] [DecidableEq ι] [Nonempty ι] (n : ℕ) (hn : 0 < n) (G : Matrix ι κ ℝ) :
frobNorm (gramSoftMinGradient n 0 G) ^ 2 ≤ 4 * inversePowerSoftMin n (G * Gᴴ)Theorem (Finite inverse-power Gram Laplacian bound).
For a real matrix \mathbf{G} with a nonempty row type of size r, column type of size k, and positive definite Gram matrix, every positive inverse power has Laplacian at most 2(k-r+1) when k-r+1 is nonnegative. No printed source. Original NLAlib atlas proof at 77514ce42a0e437d837797a063ac161f41022730.
General form: sizes are index types
Lean statement and details
NLAlib.gramSoftMinLaplacian_unshifted_le.{u_1, u_2} {ι : Type u_1} {κ : Type u_2} [Fintype ι]
[Fintype κ] [DecidableEq ι] [DecidableEq κ] [Nonempty ι] (n : ℕ) (hn : 0 < n) (G : Matrix ι κ ℝ)
(hpd : (G * Gᴴ).PosDef) (hgap : 0 ≤ ↑(Fintype.card κ) - ↑(Fintype.card ι) + 1) :
gramSoftMinLaplacian n 0 G ≤ 2 * (↑(Fintype.card κ) - ↑(Fintype.card ι) + 1)Theorem (Perturbation of a least-squares solution).
Let \mathbf{A} have full column rank and \|\mathbf{A}^{+}\|_2 \|\mathbf{E}\|_2 < 1. If \mathbf{x} solves the problem (\mathbf{A}, \mathbf{b}) and \mathbf{y} solves (\mathbf{A} + \mathbf{E}, \mathbf{b} + \mathbf{f}), then \begin{aligned} \|\mathbf{y} - \mathbf{x}\| &\le \|(\mathbf{A} + \mathbf{E})^{+}\|_2 \bigl(\|\mathbf{f}\| + \|\mathbf{E}\|_2 \|\mathbf{x}\| \\ &\qquad + \|\mathbf{A}^{+}\|_2 \|\mathbf{E}\|_2 \|\mathbf{b} - \mathbf{A}\mathbf{x}\|\bigr). \end{aligned} [GolubVanLoan2013, Theorem 5.3.1]; [Wedin1973]; [Higham2002, Theorem 20.1].
Lean statement and details
NLAlib.IsLeastSquaresSolution.norm_sub_le.{u_1, u_2, u_3} {𝕜 : Type u_1} [RCLike 𝕜] {m : Type u_2}
{n : Type u_3} [Fintype m] [Fintype n] {A E : Matrix m n 𝕜} (hA : Function.Injective A.mulVec)
(hE : specNorm (pinv A) * specNorm E < 1) {b f : m → 𝕜} {x y : n → 𝕜}
(hx : IsLeastSquaresSolution A b x) (hy : IsLeastSquaresSolution (A + E) (b + f) y) :
‖WithLp.toLp 2 (y - x)‖ ≤
specNorm (pinv (A + E)) *
(‖WithLp.toLp 2 f‖ + specNorm E * ‖WithLp.toLp 2 x‖ +
specNorm (pinv A) * specNorm E * ‖WithLp.toLp 2 (b - A *ᵥ x)‖)Theorem (Normwise conditioning of a linear system).
At every input the normwise relative condition of an invertible Euclidean linear map is at most its matrix condition number. [TrefethenBau1997, Lecture 12].
Lean statement and details
NLAlib.normwiseRelativeCondition_toEuclideanCLM_le.{u_1, u_3} {𝕜 : Type u_1} {n : Type u_3}
[RCLike 𝕜] [Fintype n] [DecidableEq n] {A : Matrix n n 𝕜} (hA : IsUnit A)
(x : EuclideanSpace 𝕜 n) :
normwiseRelativeCondition 𝕜 (⇑(toEuclideanCLM A)) x ≤ pseudoConditionNumber ATheorem (Relative perturbation of a linear system through the condition number).
If \mathbf{A} is invertible, \mathbf{A}\mathbf{x} = \mathbf{b}, (\mathbf{A} + \mathbf{E})\mathbf{y} = \mathbf{b} + \mathbf{f}, \|\mathbf{E}\|_2 \le \varepsilon \|\mathbf{A}\|_2, \|\mathbf{f}\| \le \varepsilon \|\mathbf{b}\| and \kappa(\mathbf{A}) \varepsilon < 1, then \|\mathbf{y} - \mathbf{x}\| \le \frac{2 \varepsilon \kappa(\mathbf{A})}{1 - \kappa(\mathbf{A}) \varepsilon} \|\mathbf{x}\|. [GolubVanLoan2013, Theorem 2.6.2].
Lean statement and details
NLAlib.norm_sub_le_pseudoConditionNumber_mul_of_add_mulVec_eq.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
{n : Type u_2} [Fintype n] [DecidableEq n] {A E : Matrix n n 𝕜} (hA : IsUnit A) {ε : ℝ}
(hE : specNorm E ≤ ε * specNorm A) (hε : pseudoConditionNumber A * ε < 1) {x y b f : n → 𝕜}
(hx : A *ᵥ x = b) (hy : (A + E) *ᵥ y = b + f) (hf : ‖WithLp.toLp 2 f‖ ≤ ε * ‖WithLp.toLp 2 b‖) :
‖WithLp.toLp 2 (y - x)‖ ≤
2 * ε * pseudoConditionNumber A / (1 - pseudoConditionNumber A * ε) * ‖WithLp.toLp 2 x‖Theorem (Localized hard truncation).
for \mathbf{B}, \mathbf{N} \in \Bbbk^{m \times n}, 1 \le k, \theta = \sigma_{k-1}(\mathbf{B}), a window a \le k \le b with 2\theta \le \sigma_i(\mathbf{B}) for i < a, \sigma_a(\mathbf{B}) \le 2\theta and \sigma_b(\mathbf{B}) \le \theta/2, and a best rank-k approximation \mathbf{Y} of \mathbf{B} + \mathbf{N}, with \mathbf{P}_i, \mathbf{P}'_i the range projectors of \llbracket\mathbf{B}\rrbracket_i and of its conjugate transpose and \mu = \|(\mathbf{P}_b - \mathbf{P}_a)\mathbf{N}(\mathbf{P}'_b - \mathbf{P}'_a)\|_2, then \|\mathbf{B} - \mathbf{Y}\|_{\mathsf{F}}^2 \le \|\mathbf{B} - \llbracket\mathbf{B}\rrbracket_k\|_{\mathsf{F}}^2 + 483k\,\|\mathbf{N}\|_2^2 + 32\,\theta\min(k, b - k)\,\mu\,. The noise enters the cross term only through its compression \mu to the singular subspaces within a factor 2 of the truncation level, and with weight \min(k, b - k) instead of k. The coefficients are the values attained by the proof, replacing the earlier rounded values 500 and 40. No printed source.
Lean statement and details
NLAlib.IsBestRankApprox.frobNorm_sub_sq_le_add_specNorm_sq_add_window.{u_1, u_2, u_3} {𝕜 : Type u_1}
[RCLike 𝕜] {m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n] {B N Y : Matrix m n 𝕜} {k : ℕ}
(hY : IsBestRankApprox (B + N) k Y) (hk : 1 ≤ k) {a b : ℕ} (hak : a ≤ k) (hkb : k ≤ b)
(ha : ∀ i < a, 2 * singularValues B (k - 1) ≤ singularValues B i)
(ha₂ : singularValues B a ≤ 2 * singularValues B (k - 1))
(hb : singularValues B b ≤ singularValues B (k - 1) / 2) :
frobNorm (B - Y) ^ 2 ≤
frobNorm (B - truncatedSVD B k) ^ 2 + localTruncationNoiseConstant * ↑k * specNorm N ^ 2 +
localTruncationWindowConstant * singularValues B (k - 1) * ↑(min k (b - k)) *
specNorm
((rangeProjector (truncatedSVD B b) - rangeProjector (truncatedSVD B a)) * N *
(rangeProjector (truncatedSVD B b)ᴴ - rangeProjector (truncatedSVD B a)ᴴ))Theorem (The Neumann series).
if \|\mathbf{F}\|_2 < 1 then the series \sum_{k \ge 0} \mathbf{F}^k converges to (\mathbf{I} - \mathbf{F})^{-1}. [HornJohnson2013, Corollary 5.6.16].
Lean statement and details
NLAlib.hasSum_pow_inv_one_sub.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2} [Fintype n]
[DecidableEq n] {F : Matrix n n 𝕜} (h : specNorm F < 1) : HasSum (fun k ↦ F ^ k) (1 - F)⁻¹Theorem (Perturbation of the pseudoinverse in every unitarily invariant norm).
\|\cdot\|_{\Phi}: \|\mathbf{B}^{+} - \mathbf{A}^{+}\|_{\Phi} \le \bigl(\|\mathbf{B}^{+}\|_2 \|\mathbf{A}^{+}\|_2 + \|\mathbf{B}^{+}\|_2^2 + \|\mathbf{A}^{+}\|_2^2\bigr) \|\mathbf{B} - \mathbf{A}\|_{\Phi}. [Wedin1973]; [StewartSun1990, Theorem III.3.8].
Lean statement and details
NLAlib.SymmetricGauge.matrixNorm_pinv_sub_pinv_le.{u_1, u_2, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
{m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n] (Φ : SymmetricGauge) (A B : Matrix m n 𝕜) :
Φ.matrixNorm (pinv B - pinv A) ≤
(specNorm (pinv B) * specNorm (pinv A) + specNorm (pinv B) ^ 2 + specNorm (pinv A) ^ 2) *
Φ.matrixNorm (B - A)Theorem (Closed spectral disks for a normal matrix).
For a normal complex square matrix \mathbf{A} and any real radius \varepsilon, a perturbation with \|\mathbf{E}\|_2 \le \varepsilon makes z an eigenvalue exactly when some \mu \in \operatorname{spec}(\mathbf{A}) satisfies \lvert z - \mu \rvert \le \varepsilon. This includes zero radius and empty index types. [TrefethenEmbree2005, Theorem 2.2]; the closed-radius variant of its normal-matrix assertion. No converse characterization of normality is asserted.
Lean statement and details
IsStarNormal.exists_specNorm_le_and_mem_spectrum_add_iff.{u_2} {n : Type u_2} [Fintype n]
[DecidableEq n] {A : Matrix n n ℂ} (hA : IsStarNormal A) (z : ℂ) (ε : ℝ) :
(∃ E, specNorm E ≤ ε ∧ z ∈ spectrum ℂ (A + E)) ↔ ∃ μ ∈ spectrum ℂ A, ‖z - μ‖ ≤ εTheorem (A differentiable branch through a simple eigenvalue).
Let \mu be a simple root of the characteristic polynomial of the complex matrix \mathbf{A}, with right eigenvector \mathbf{x} and left eigenvector \mathbf{y}. Then there is a function \varphi, continuous near 0, with \varphi(0) = \mu and derivative \frac{\mathbf{y}^{\mathsf{T}}\mathbf{E}\mathbf{x}}{\mathbf{y}^{\mathsf{T}}\mathbf{x}} at 0, such that near (0, \mu) the eigenvalues of \mathbf{A} + t\mathbf{E} close to \mu are exactly \varphi(t), and they remain simple. The left eigenvector enters through the bilinear product \mathbf{y}^{\mathsf{T}}\mathbf{x}, with \mathbf{y}^{\mathsf{T}}\mathbf{A} = \mu\mathbf{y}^{\mathsf{T}}; for Hermitian \mathbf{A} take \mathbf{y} = \overline{\mathbf{x}} to recover the derivative \mathbf{x}^{\mathsf{H}}\mathbf{E}\mathbf{x}. [StewartSun1990, Theorem IV.2.3]; [HornJohnson2013, Theorem 6.3.12].
Lean statement and details
NLAlib.exists_eigenvalue_branch_of_rootMultiplicity_eq_one.{u_2} {n : Type u_2} [Fintype n]
[DecidableEq n] {A : Matrix n n ℂ} (E : Matrix n n ℂ) {x y : n → ℂ} {μ : ℂ} (hx : x ≠ 0)
(hy : y ≠ 0) (hAx : A *ᵥ x = μ • x) (hyA : y ᵥ* A = μ • y)
(hμ : Polynomial.rootMultiplicity μ A.charpoly = 1) :
∃ φ,
φ 0 = μ ∧
HasDerivAt φ (y ⬝ᵥ E *ᵥ x / y ⬝ᵥ x) 0 ∧
(∀ᶠ (t : ℂ) in 𝓝 0, ContinuousAt φ t) ∧
(∀ᶠ (p : ℂ × ℂ) in 𝓝 (0, μ), p.2 ∈ spectrum ℂ (A + p.1 • E) ↔ φ p.1 = p.2) ∧
∀ᶠ (t : ℂ) in 𝓝 0, Polynomial.rootMultiplicity (φ t) (A + t • E).charpoly = 1Theorem (Sylvester separation bound in the Frobenius norm).
For Hermitian \mathbf{L} and \mathbf{M} whose eigenvalues are pairwise at distance at least \delta, \lvert \lambda_i(\mathbf{L}) - \lambda_j(\mathbf{M}) \rvert \ge \delta for all i, j, we have \delta \|\mathbf{X}\|_{\mathsf{F}} \le \|\mathbf{L}\mathbf{X} - \mathbf{X}\mathbf{M}\|_{\mathsf{F}}. No interval structure is needed. [Bhatia1997, §VII.2]; [StewartSun1990, §V.3].
General form: sizes are index types
Lean statement and details
Matrix.IsHermitian.mul_frobNorm_le_frobNorm_mul_sub_mul.{u_1, u_2, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
{m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n] {L : Matrix m m 𝕜} {M : Matrix n n 𝕜}
(hL : L.IsHermitian) (hM : M.IsHermitian) {δ : ℝ}
(hsep : ∀ i < Fintype.card m, ∀ j < Fintype.card n, δ ≤ |eigenvalue L i - eigenvalue M j|)
(X : Matrix m n 𝕜) : δ * frobNorm X ≤ frobNorm (L * X - X * M)Theorem (Wedin's theorem with the gap of the unperturbed matrix).
, spectral norm: for frames \mathbf{U}, \mathbf{V} of left and right singular vectors of \mathbf{A} for its j + 1 largest singular values, \mathbf{U}', \mathbf{V}' the same for \mathbf{A} + \mathbf{E}, all with orthonormal columns, and \sigma_j(\mathbf{A}) > \sigma_{j+1}(\mathbf{A}), \max\bigl(\|(\mathbf{I} - \mathbf{U}\mathbf{U}^{\mathsf{H}})\mathbf{U}'\|_2, \|(\mathbf{I} - \mathbf{V}\mathbf{V}^{\mathsf{H}})\mathbf{V}'\|_2\bigr) \le \frac{2 \|\mathbf{E}\|_2}{\sigma_j(\mathbf{A}) - \sigma_{j+1}(\mathbf{A})}.
Lean statement and details
NLAlib.HasOrthonormalCols.max_specNorm_one_sub_mul_le_two_mul_specNorm_div_singularGap.{u_1, u_2,
u_3}
{𝕜 : Type u_1} [RCLike 𝕜] {m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n] [DecidableEq m]
[DecidableEq n] {A E : Matrix m n 𝕜} {j : ℕ} {U U' : Matrix m (Fin (j + 1)) 𝕜}
{V V' : Matrix n (Fin (j + 1)) 𝕜} (hU : HasOrthonormalCols U) (hV : HasOrthonormalCols V)
(hU' : HasOrthonormalCols U') (hV' : HasOrthonormalCols V')
(hAV : A * V = U * diagonal fun i ↦ ↑(singularValues A ↑i))
(hAU : Aᴴ * U = V * diagonal fun i ↦ ↑(singularValues A ↑i))
(hAV' : (A + E) * V' = U' * diagonal fun i ↦ ↑(singularValues (A + E) ↑i))
(hAU' : (A + E)ᴴ * U' = V' * diagonal fun i ↦ ↑(singularValues (A + E) ↑i))
(hgap : 0 < singularGap A (j + 1)) :
max (specNorm ((1 - U * Uᴴ) * U')) (specNorm ((1 - V * Vᴴ) * V')) ≤
2 * specNorm E / singularGap A (j + 1)Formal definitions
- NLAlib.ExtensionWindow
- NLAlib.IsBasisExtension
- NLAlib.IsBasisExtensionErr
- NLAlib.IsConditionedDiagonalizable
- NLAlib.IsOrthErr
- NLAlib.IsPerturbedUnitaryPair
- NLAlib.IsPerturbedUnitarySimilar
- NLAlib.IsPerturbedUnitarySimilarBy
- NLAlib.IsRangeBlockTriangular
- NLAlib.IsTrackedUnitarySimilar
- NLAlib.blockCols
- NLAlib.blockPrefix
- NLAlib.blockRowPrefix
- NLAlib.blockRows
- NLAlib.blockSuccEquiv
- NLAlib.colSupport
- NLAlib.componentwiseJacobian
- NLAlib.componentwisePerturbation
- NLAlib.couplingPart
- NLAlib.embedBlock
- NLAlib.euclideanJacobian
- NLAlib.gramDefect
- NLAlib.gramSoftMinGradient
- NLAlib.gramSoftMinLaplacian
- NLAlib.gramSoftMinSecond
- NLAlib.inversePencilUpperRootSum
- NLAlib.localTruncationNoiseConstant
- NLAlib.localTruncationWindowConstant
- NLAlib.normwiseRelativeCondition
- NLAlib.rangeEmb
- NLAlib.reciprocalWindowCrossConstant
- NLAlib.reciprocalWindowNoiseConstant
- NLAlib.regularizedGram
Used by algorithms
Golub–Kahan process
Build a pair of Krylov bases and a block bidiagonal factorization of a rectangular operator.
Hermitian spectral bisection (Shah)
Use a spectral split to separate invariant subspaces.
Iterative refinement
Improve a computed solution by solving for its residual, with each operation in its own precision.
Hessenberg shifted QR (BGS)
The shifted QR algorithm of Banks, Garza-Vargas and Srivastava on Hessenberg matrices, with exact-arithmetic and finite-precision programs and BGS + Dense Schur (end-to-end).
Inverse iteration
Use shifted linear solves to target an eigenvector near a chosen shift.