NLA-lib Explorer

The Frobenius norm and inner product

Library · Source module

The Frobenius norm and inner product

NLAlib.frobNorm A is the Frobenius norm \|\mathbf{A}\|_{\mathsf{F}} = \bigl(\sum_{i,j} \lvert \mathbf{A}_{i,j} \rvert^2\bigr)^{1/2} and NLAlib.frobInner A B is the real Frobenius inner product \langle \mathbf{A}, \mathbf{B} \rangle_{\mathsf{F}} = \operatorname{Re} \operatorname{tr}(\mathbf{A}^{\mathsf{H}}\mathbf{B}). They are named functions because Mathlib's matrix norms are scoped instances; NLAlib.frobNorm_eq_norm is the bridge.

The squared Frobenius norm has no name of its own: it is always written frobNorm A ^ 2. Statements that are naturally quadratic (Pythagoras, sums over entries or columns) are stated in that form; positivity knows frobNorm, so gcongr passes between a bound and its square.

Main definitions

* NLAlib.frobInner: the real Frobenius inner product. * NLAlib.frobNorm: the Frobenius norm. * NLAlib.rowNormSqDistribution: the squared-row-norm sampling weights.

Main results

* NLAlib.frobNorm_sq_eq_sum, NLAlib.frobNorm_sq_eq_re_trace: the squared norm as an entry sum and as a trace. * NLAlib.frobNorm_sq_eq_sum_sq, NLAlib.frobInner_eq_sum_mul: the entry sums over \mathbb{R}. * Matrix.IsUpperTriangular.frobNorm_sub_diagonal_le: the strict upper part of an upper triangular matrix is controlled by its skew part. * NLAlib.frobNorm_add_sq, NLAlib.frobNorm_add_sq_of_frobInner_eq_zero: the polar identity and Pythagoras. * NLAlib.abs_frobInner_le: Cauchy–Schwarz. * NLAlib.frobInner_mul_left, NLAlib.frobInner_mul_right: adjoints move across the pairing. * NLAlib.frobNorm_le_sqrt_card_mul_of_forall_norm_toLp_col_le: a bound from column norms. * NLAlib.frobNorm_eq_norm: the bridge to Mathlib's Frobenius norm. * NLAlib.sum_rowNormSqDistribution: the squared-row-norm weights \|\mathbf{a}_i\|^2/\|\mathbf{A}\|_{\mathsf{F}}^2 are a probability vector for \mathbf{A} \ne \mathbf{0}.

Declarations