The corollary stated at the end of the previous section indicates an alternative, and more computationally efficient method of computing the projection of a vector onto a subspace of . Previously we had to first establish an orthogonal basis for . But given any basis for , we can avoid first orthogonalizing the basis by

  • Concatenating the basis vectors to form the matrix with ,
  • then for any vector , computing the projection of onto as
If has maximal rank, verify that satisfies the identity (a matrix satisfying such an identity is called a projection matrix, since the linear transformation it defines on corresponds exactly to projection onto its range ).