NLA-lib Explorer

NLAlib.frobNorm_sub_mul_sq

Library 路 theorem

The exact error split: for any coefficient matrix \mathbf{X}, the squared Frobenius error of \mathbf{B}\mathbf{X} as an approximation of \mathbf{A} is the squared projection residual plus the squared error inside the range of \mathbf{B}: \|\mathbf{A} - \mathbf{B}\mathbf{X}\|_{\mathsf{F}}^2 = \|(\mathbf{I} - \mathbf{P}_{\mathbf{B}})\mathbf{A}\|_{\mathsf{F}}^2 + \|\mathbf{P}_{\mathbf{B}}\mathbf{A} - \mathbf{B}\mathbf{X}\|_{\mathsf{F}}^2\,.

NLAlib.frobNorm_sub_mul_sq.{u_1, u_3, u_4, u_5} {饾暅 : Type u_1} [RCLike 饾暅] {m : Type u_3}
  {n : Type u_4} {p : Type u_5} [Fintype m] [Fintype n] [Fintype p] [DecidableEq m]
  (B : Matrix m p 饾暅) (A : Matrix m n 饾暅) (X : Matrix p n 饾暅) :
  frobNorm (A - B * X) ^ 2 =
    frobNorm ((1 - rangeProjector B) * A) ^ 2 + frobNorm (rangeProjector B * A - B * X) ^ 2

Full source on GitHub

Import NLAlib.Matrix.Norms.Projector.