Gram-Schmidt in ℝ²: First Example
You'll learn how to apply the Gram-Schmidt algorithm to two vectors in the plane to create an orthogonal (or orthonormal) basis.
The Core Idea
The Gram-Schmidt algorithm transforms a linearly independent set of vectors into an orthogonal set that spans the same space. In ℝ², this process is especially intuitive: you keep the first vector as-is, then adjust the second vector to be perpendicular to the first by "subtracting away" its projection.
Walking Through a Concrete Example
Let's say we start with two vectors in ℝ²:
- u₁ = (3, 0)
- u₂ = (2, 4)
Step 1: Keep the first vector unchanged:
- v₁ = u₁ = (3, 0)
Step 2: Make the second vector orthogonal to the first. We subtract the projection of u₂ onto v₁:
- projection of u₂ onto v₁ = [(u₂ · v₁) / (v₁ · v₁)] v₁
- u₂ · v₁ = (2)(3) + (4)(0) = 6
- v₁ · v₁ = 9
- projection = (6/9)(3, 0) = (2, 0)
- v₂ = u₂ − projection = (2, 4) − (2, 0) = (0, 4)
Now v₁ and v₂ are orthogonal! Check: (3, 0) · (0, 4) = 0 ✓
If you want an orthonormal basis, normalize each vector by dividing by its length: v₁/||v₁|| = (1, 0) and v₂/||v₂|| = (0, 1).
Why This Works
You're geometrically "peeling off" the component of u₂ that points in the v₁ direction, leaving only the perpendicular part. Think of it like casting a shadow: you're removing the shadow and keeping what's left standing upright.
Key Takeaway: Gram-Schmidt in ℝ² takes two vectors, keeps the first, then orthogonalizes the second by subtracting its projection onto the first—producing an orthogonal (and optionally orthonormal) basis.