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

Gram-Schmidt for Subspaces

Apply the Gram-Schmidt process to find an orthonormal basis for a proper subspace of ℝⁿ.

Gram-Schmidt for Subspaces

You'll learn how to apply the Gram-Schmidt process to vectors spanning a subspace of ℝⁿ to produce an orthonormal basis specifically for that subspace.

The Core Idea

Up to now, you've seen Gram-Schmidt applied to full sets of vectors in ℝⁿ. But often we work with proper subspaces—like the column space of a matrix, or a plane through the origin in ℝ³. These subspaces are spanned by a specific set of vectors, and we want an orthonormal basis just for that subspace, not for all of ℝⁿ.

The good news: the Gram-Schmidt algorithm works exactly the same way. You simply apply it to the spanning set you have, ignoring the rest of the ambient space.

How It Works

Suppose you have vectors v₁, v₂, ..., vₖ that span a k-dimensional subspace S of ℝⁿ (where k < n). To find an orthonormal basis for S:

  1. Apply Gram-Schmidt to v₁, v₂, ..., vₖ to get orthogonal vectors u₁, u₂, ..., uₖ
  2. Normalize each uᵢ to get orthonormal vectors q₁, q₂, ..., qₖ

The resulting {q₁, q₂, ..., qₖ} forms an orthonormal basis for the subspace S—and only for S.

Example Context

If you have a 2-dimensional plane in ℝ³ spanned by two vectors, Gram-Schmidt gives you two orthonormal vectors lying in that plane. These don't span all of ℝ³, just the subspace you started with.

This is incredibly useful when working with column spaces, finding orthogonal projections onto subspaces, or constructing orthonormal bases for eigenspaces.

Key Takeaway: The Gram-Schmidt process applies to any spanning set of a subspace, producing an orthonormal basis for exactly that subspace, regardless of the dimension of the ambient space.