PAIBOTLearn
Sign inSign up

Gram-Schmidt process

Inner products & orthogonality

Japanese school year: University year 2

What you learn

Learn the algorithm to construct an orthonormal basis for the subspace spanned by a set of linearly independent vectors. This method is fundamental for matrix QR decomposition and generating systems of orthogonal functions. Understanding inner products, vector projections, and vector space bases is required.

Go to practice

Key points

This formula is used to construct a new orthogonal (mutually perpendicular) vector uk\boldsymbol{u}_k from a given vector vk\boldsymbol{v}_k. It subtracts the projection components along all previously found orthogonal vectors uj\boldsymbol{u}_j from vk\boldsymbol{v}_k.

uk=vk−∑j=1k−1⟨vk,uj⟩∥uj∥2uj\boldsymbol{u}_k = \boldsymbol{v}_k - \sum_{j=1}^{k-1} \frac{\langle \boldsymbol{v}_k, \boldsymbol{u}_j \rangle}{\|\boldsymbol{u}_j\|^2} \boldsymbol{u}_j

This formula is used to normalize an orthogonal vector uk\boldsymbol{u}_k to length 1 without changing its direction. Dividing uk\boldsymbol{u}_k by its length (norm ∥uk∥\|\boldsymbol{u}_k\|) gives the unit vector ek\boldsymbol{e}_k.

ek=uk∥uk∥\boldsymbol{e}_k = \frac{\boldsymbol{u}_k}{\|\boldsymbol{u}_k\|}

This formula is used to find the orthogonal projection vector (perpendicular shadow) of vector v\boldsymbol{v} onto vector u\boldsymbol{u}. It multiplies vector u\boldsymbol{u} by the inner product ⟨v,u⟩\langle \boldsymbol{v}, \boldsymbol{u} \rangle divided by the squared length ∥u∥2\|\boldsymbol{u}\|^2.

proj⁡u(v)=⟨v,u⟩∥u∥2u\operatorname{proj}_{\boldsymbol{u}}(\boldsymbol{v}) = \frac{\langle \boldsymbol{v}, \boldsymbol{u} \rangle}{\|\boldsymbol{u}\|^2} \boldsymbol{u}

Choose a set to practice.