NLA-lib Explorer

Gram–Schmidt orthogonalisation of the columns of a matrix

Library · Source module

Gram–Schmidt orthogonalisation of the columns of a matrix

The Gram–Schmidt process applied to the columns of \mathbf{A}, in the order of the column index, gives \mathbf{Q} = NLAlib.gramSchmidtQ A, whose nonzero columns are orthonormal, and the upper triangular \mathbf{R} = \mathbf{Q}^{\mathsf{H}}\mathbf{A} = NLAlib.gramSchmidtR A with nonnegative diagonal, with \mathbf{A} = \mathbf{Q}\mathbf{R} always. A column of \mathbf{Q} vanishes exactly when the corresponding column of \mathbf{A} depends on the earlier ones; for \mathbf{A} of full column rank this is the QR factorization with positive diagonal.

The process is Mathlib's InnerProductSpace.gramSchmidtNormed on the columns.

Main definitions

* NLAlib.gramSchmidtQ, NLAlib.gramSchmidtR: the two factors. * NLAlib.mgsSweep: the modified Gram–Schmidt sweep of a vector against a sequence.

Main results

* NLAlib.gramSchmidtQ_mul_gramSchmidtR: \mathbf{Q}\mathbf{R} = \mathbf{A}. * NLAlib.isUpperTriangular_gramSchmidtR, NLAlib.gramSchmidtR_apply_self_nonneg. * NLAlib.gramSchmidtR_apply_self_smul_col: the classical recursion. * NLAlib.isQR_gramSchmidt: the QR factorization of a matrix of full column rank. * NLAlib.range_gramSchmidtQ, NLAlib.gramSchmidtQ_mul_conjTranspose: with no rank assumption, \mathbf{Q} spans the column space and \mathbf{Q}\mathbf{Q}^{\mathsf{H}} = \mathbf{P}_{\mathbf{A}}. * NLAlib.gramSchmidtQ_submatrix, NLAlib.gramSchmidtQ_submatrix_castLE: restriction to an initial segment of the columns. * NLAlib.gramSchmidtQ_col_eq_zero_iff, NLAlib.gramSchmidtQ_col_bot: zero columns and the first column. * NLAlib.dotProduct_mgsSweep_gramSchmidtQ_col, NLAlib.mgsSweep_gramSchmidtQ_col: the triangular entries and swept columns in the modified process. * NLAlib.mgsSweep_eq_sub_sum: the modified Gram–Schmidt sweep NLAlib.mgsSweep equals the classical one against pairwise orthogonal vectors.

Declarations