Abstract Linear Algebra 21 | Example for Gram-Schmidt Process [dark version]
Based on The Bright Side of Mathematics's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Start with the monomial basis m0(x)=1, m1(x)=x, m2(x)=x^2 for the subspace of polynomials of degree ≤ 2.
Briefing
Gram–Schmidt orthonormalization is applied, step by step, to turn the standard monomial basis of quadratic polynomials into an orthonormal basis under the inner product ⟨p,q⟩ = ∫[-1,1] p(x)q(x) dx. The key payoff is an explicit orthonormal set for the subspace U = {polynomials of degree ≤ 2}, starting from {m0,m1,m2} where m0(x)=1, m1(x)=x, and m2(x)=x^2. This matters because having an orthonormal basis makes projections and computations in polynomial function spaces far cleaner and more reliable.
The process begins by normalizing the first vector. Since m0 is constant, its norm squared is ⟨m0,m0⟩ = ∫[-1,1] 1·1 dx = 2. That yields the first orthonormal basis element b0(x) = 1/√2.
Next comes the second step: orthogonalizing m1 against the already-built b0. The projection term involves ⟨m1,b0⟩, which reduces to ∫[-1,1] 1·x dx and evaluates to 0, so m1 is already orthogonal to m0. The only remaining task is normalization. The norm squared is ⟨m1,m1⟩ = ∫[-1,1] x·x dx = ∫[-1,1] x^2 dx = 2/3, so b1(x) = √(3/2)·x.
The final step constructs b2 from m2(x)=x^2 by subtracting its components along the earlier basis vectors. The algorithm forms the “normal component” as m2 − proj(span{b0,b1}). One integral vanishes immediately: ⟨m2,b1⟩ involves ∫[-1,1] x·x^2 dx = ∫[-1,1] x^3 dx = 0, so no b1 component remains. The remaining subtraction comes from ⟨m2,b0⟩, which leads to a term proportional to m0; after the constants cancel appropriately, the unnormalized result becomes b2~(x) = x^2 − 1/3.
Normalization finishes the job. The norm squared requires integrating (x^2 − 1/3)^2 over [-1,1], producing 8/45. Taking the square root gives the final scaling factor, so b2(x) = √(45/8)·(x^2 − 1/3). With {b0,b1,b2} in hand, the quadratic polynomial space has an explicit orthonormal basis.
The discussion closes by noting that the same Gram–Schmidt machinery extends to higher-degree polynomial spaces Pn. The resulting orthonormal polynomials are identified as Legendre polynomials (up to normalization choices), which are especially useful because they support orthogonal projections and related computations in abstract inner-product spaces.
Cornell Notes
Using the inner product ⟨p,q⟩ = ∫[-1,1] p(x)q(x) dx, Gram–Schmidt converts the monomial basis {1, x, x^2} for the degree ≤ 2 polynomial space into an orthonormal basis. The first step normalizes m0(x)=1 using ⟨m0,m0⟩=2, giving b0(x)=1/√2. The second step shows m1(x)=x is already orthogonal to m0 because ∫[-1,1] x dx = 0; normalizing with ⟨x,x⟩=2/3 yields b1(x)=√(3/2)·x. The third step subtracts the b0 component from x^2, producing an unnormalized b2~(x)=x^2−1/3, then normalizes using ∫[-1,1](x^2−1/3)^2 dx=8/45 to get b2(x)=√(45/8)(x^2−1/3). This demonstrates why orthonormal bases simplify projections in function spaces.
Why does the Gram–Schmidt process start by normalizing m0(x)=1, and what is b0(x)?
How does the calculation show that x is already orthogonal to 1 under this inner product?
What is b1(x), and how is its normalization computed?
When building b2 from x^2, why does the component along b1 disappear?
How does the subtraction produce the unnormalized b2~(x)=x^2−1/3, and what normalization constant follows?
Review Questions
- What are the exact formulas for b0(x), b1(x), and b2(x) in the degree ≤ 2 polynomial space with ⟨p,q⟩ = ∫[-1,1] p(x)q(x) dx?
- Which integrals evaluate to zero during the construction, and what symmetry or polynomial-degree reason explains each?
- How would the Gram–Schmidt steps change when moving from P2 to P3, and what family of orthogonal polynomials is expected to appear?
Key Points
- 1
Start with the monomial basis m0(x)=1, m1(x)=x, m2(x)=x^2 for the subspace of polynomials of degree ≤ 2.
- 2
Use the inner product ⟨p,q⟩ = ∫[-1,1] p(x)q(x) dx to compute norms and projection coefficients.
- 3
Normalize m0 using ⟨m0,m0⟩=2 to get b0(x)=1/√2.
- 4
Check orthogonality via integrals: ∫[-1,1] x dx = 0 makes m1 already orthogonal to m0.
- 5
Compute b1 by normalizing m1: ⟨x,x⟩=2/3 gives b1(x)=√(3/2)·x.
- 6
For b2, subtract only the nonzero projection component: the x^3 integral vanishes, leaving b2~(x)=x^2−1/3.
- 7
Normalize b2 using ∫[-1,1](x^2−1/3)^2 dx=8/45 to obtain b2(x)=√(45/8)(x^2−1/3).