NLAlib.quadForm_diagonal
Library ยท theorem
The quadratic form of a diagonal matrix is the weighted sum of squared moduli: \mathbf{z}^{\mathsf{H}} \operatorname{diag}(\mathbf{d}) \mathbf{z} = \sum_i \mathbf{d}_i \lvert \mathbf{z}_i \rvert^2.
NLAlib.quadForm_diagonal.{u_1, u_3} {๐ : Type u_1} [RCLike ๐] {n : Type u_3} [Fintype n]
[DecidableEq n] (d z : n โ ๐) : quadForm (diagonal d) z = โ i, d i * โ(โz iโ ^ 2)Import NLAlib.Matrix.Basic.QuadForm.