Gram-Schmidt Orthogonalization and Orthonormalization #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
In this file we introduce Gram-Schmidt Orthogonalization and Orthonormalization.
The Gram-Schmidt process takes a set of vectors as input and outputs a set of orthogonal vectors which have the same span.
Main results #
gram_schmidt
: the Gram-Schmidt processgram_schmidt_orthogonal
:gram_schmidt
produces an orthogonal system of vectors.span_gram_schmidt
:gram_schmidt
preserves span of vectors.gram_schmidt_ne_zero
: If the input vectors ofgram_schmidt
are linearly independent, then the output vectors are non-zero.gram_schmidt_basis
: The basis produced by the Gram-Schmidt process when given a basis as input.gram_schmidt_normed
: the normalizedgram_schmidt
(i.e each vector ingram_schmidt_normed
has unit length.)gram_schmidt_orthornormal
:gram_schmidt_normed
produces an orthornormal system of vectors.gram_schmidt_orthonormal_basis
: orthonormal basis constructed by the Gram-Schmidt process from an indexed set of vectors of the right size
The Gram-Schmidt process takes a set of vectors as input and outputs a set of orthogonal vectors which have the same span.
Equations
- gram_schmidt 𝕜 f n = f n - finset.univ.sum (λ (i : ↥(finset.Iio n)), ↑(⇑(orthogonal_projection (submodule.span 𝕜 {gram_schmidt 𝕜 f ↑i})) (f n)))
This lemma uses ∑ i in
instead of ∑ i :
.
Gram-Schmidt Orthogonalisation:
gram_schmidt
produces an orthogonal system of vectors.
This is another version of gram_schmidt_orthogonal
using pairwise
instead.
gram_schmidt
preserves span of vectors.
If the input vectors of gram_schmidt
are linearly independent,
then the output vectors are non-zero.
gram_schmidt
produces a triangular matrix of vectors when given a basis.
gram_schmidt
produces linearly independent vectors when given linearly independent vectors.
When given a basis, gram_schmidt
produces a basis.
Equations
- gram_schmidt_basis b = basis.mk _ _
the normalized gram_schmidt
(i.e each vector in gram_schmidt_normed
has unit length.)
Equations
- gram_schmidt_normed 𝕜 f n = (↑‖gram_schmidt 𝕜 f n‖)⁻¹ • gram_schmidt 𝕜 f n
Gram-Schmidt Orthonormalization:
gram_schmidt_normed
applied to a linearly independent set of vectors produces an orthornormal
system of vectors.
Gram-Schmidt Orthonormalization:
gram_schmidt_normed
produces an orthornormal system of vectors after removing the vectors which
become zero in the process.
Given an indexed family f : ι → E
of vectors in an inner product space E
, for which the
size of the index set is the dimension of E
, produce an orthonormal basis for E
which agrees
with the orthonormal set produced by the Gram-Schmidt orthonormalization process on the elements of
ι
for which this process gives a nonzero number.
Equations
Given an indexed family f : ι → E
of vectors in an inner product space E
, for which the
size of the index set is the dimension of E
, the matrix of coefficients of f
with respect to the
orthonormal basis gram_schmidt_orthonormal_basis
constructed from f
is upper-triangular.