NLA-lib Explorer

NLAlib.IsSVD.pinv_eq

Library · theorem

The pseudoinverse from a singular value decomposition. For any thin SVD \mathbf{A} = \mathbf{U} \operatorname{diag}(\boldsymbol{\sigma}) \mathbf{V}^{\mathsf{H}}, \mathbf{A}^{+} = \mathbf{V} \operatorname{diag}(\boldsymbol{\sigma}_i^{-1}) \mathbf{U}^{\mathsf{H}}, where 0^{-1} = 0 handles vanishing singular values. [GolubVanLoan2013, §5.5.2].

NLAlib.IsSVD.pinv_eq.{u_1, u_3, u_4, u_6} {𝕜 : Type u_1} [RCLike 𝕜] {m : Type u_3} {n : Type u_4}
  {r : Type u_6} [Fintype m] [Fintype n] [Fintype r] [DecidableEq r] {A : Matrix m n 𝕜}
  {U : Matrix m r 𝕜} {σ : r → ℝ} {V : Matrix n r 𝕜} (h : IsSVD A U σ V) :
  pinv A = (V * diagonal fun i ↦ ↑(σ i)⁻¹) * Uᴴ

Full source on GitHub

Import NLAlib.Matrix.Pseudoinverse.Pinv.