Gram–Schmidt orthogonalisation

Database › Mathematics › Pure mathematics › Algebra

ALG-0009MethodUndergraduate

Gram–Schmidt orthogonalisation turns any linearly independent set into an orthonormal one spanning the same nested subspaces, by subtracting projections onto the vectors already built.

$$\mathbf u_k=\mathbf v_k-\sum_{j<k}\langle\mathbf e_j,\mathbf v_k\rangle\,\mathbf e_j,\qquad\mathbf e_k=\frac{\mathbf u_k}{\|\mathbf u_k\|}$$

Explanation

Each step removes the components along the previous unit vectors, leaving a vector orthogonal to all of them. In matrix language it is the QR decomposition $A=QR$ with $Q$ orthogonal and $R$ upper triangular; numerically the modified version (re-projecting each step) is more stable.

Applied to $1,x,x^2,\dots$ with different weight functions and intervals it generates the classical orthogonal polynomials (Legendre, Hermite, Laguerre, Chebyshev).

Example 1

Orthonormalise $(1,1,0)$ and $(1,0,1)$.

Solution

$\mathbf e_1=(1,1,0)/\sqrt2$. $\mathbf u_2=(1,0,1)-\frac12(1,1,0)=(\frac12,-\frac12,1)$, so $\mathbf e_2=(1,-1,2)/\sqrt6$.

Example 2

Apply Gram–Schmidt (without normalising) to $1,x,x^2$ with $\langle f,g\rangle=\int_{-1}^1fg\,dx$.

Solution

$u_0=1$, $u_1=x$ (already orthogonal by parity), $u_2=x^2-\frac{\langle1,x^2\rangle}{\langle1,1\rangle}=x^2-\frac13$, proportional to $P_2=\frac12(3x^2-1)$.

Related entries