Course contentsShow
← Mathematics
Lesson 2222 of 3,12146. Linear Algebra — Inner Products and OrthogonalityFree lesson

Gram-Schmidt in ℝ³: Complete Example

Work through a full Gram-Schmidt process with three vectors, producing an orthogonal basis for ℝ³.

Gram-Schmidt in ℝ³: Complete Example

You'll learn: How to apply the complete Gram-Schmidt algorithm to transform three linearly independent vectors in ℝ³ into an orthogonal (or orthonormal) basis.

The Complete Process

You've seen Gram-Schmidt work in ℝ². Now let's tackle the full three-dimensional case. The algorithm systematically "fixes" each vector so it becomes orthogonal to all previous ones.

Given three linearly independent vectors v₁, v₂, v₃ in ℝ³, we construct an orthogonal basis u₁, u₂, u₃:

Step 1: Keep the first vector

u₁ = v₁

Step 2: Make the second orthogonal to the first

u₂ = v₂ - proj_u₁(v₂)

where proj_u₁(v₂) = [(v₂ · u₁) / (u₁ · u₁)] u₁

Step 3: Make the third orthogonal to both

u₃ = v₃ - proj_u₁(v₃) - proj_u₂(v₃)

This removes all components of v₃ that point in the u₁ or u₂ directions.

Concrete Example

Let v₁ = (1, 0, 0), v₂ = (1, 1, 0), v₃ = (1, 1, 1).

  • u₁ = (1, 0, 0)
  • u₂ = (1, 1, 0) - [(1)(1)/(1)](1, 0, 0) = (0, 1, 0)
  • u₃ = (1, 1, 1) - [(1)(1)/(1)](1, 0, 0) - [(1)(1)/(1)](0, 1, 0) = (0, 0, 1)

You can verify: u₁ · u₂ = 0, u₁ · u₃ = 0, u₂ · u₃ = 0. ✓

To get an orthonormal basis, just normalize each: divide by its length.

Key Takeaway: Gram-Schmidt in ℝ³ extends naturally by projecting out components along all previously computed orthogonal vectors, building an orthogonal basis one vector at a time.