# Why must the basis vectors be orthogonal when finding the projection matrix.

I was reading my coursebook on linear algebra, and i noted that one of the examples in the book mentioned that it was necessary for the basis of a subspace $V$ to be orthogonal, in order to determine the projection matrix for $V$.

My question is then; why is it necessary to figure out if the vectors that span the subspace are orthogonal in order to determine the projection matrix onto the subspace?

Is it because, in order to determine the projection matrix you have to turn the basis into a orthonormal basis, and thus it is useful to check if they are orthogonal, and that way you could avoid converting from a normal basis to an orthogonal basis?

• maybe because your project matrix is symmetric – Mohammad Areeb Siddiqui May 30 '18 at 19:11
• @MohammadAreebSiddiqui That’s not it at all. – amd May 30 '18 at 19:13

It really depends on the method that’s being used to construct the matrix. Presumably, the coursebook is presenting the matrix as a sum of individual projections onto the basis vectors. If so, then they do need to be orthogonal to eliminate “cross-talk” among them which overcounts the components of the vector being projected. See this answer for an example of how this can fail when the basis is not orthogonal.

On the other hand, if you assemble the basis vectors as columns of the matrix $A$, the projection onto their span is given by $A(A^TA)^{-1}A^T$, which only requires that $A$ have full rank, i.e., that the vectors are linearly independent, which is true since you’re working with a basis of the subspace.

Let me clarify some possible misconceptions you may have.

A subspace has many bases, not just one basis. So saying "the basis of a subspace" does not make sense. In general a subspace will have orthogonal bases, orthonormal bases, and bases that are neither orthogonal nor orthonormal.

What your book is probably describing is a particular recipe to compute the projection matrix for a subspace, and the recipe begins with an orthonormal basis.

As an example, suppose you want to project onto the line $\text{span}\{u\}$ where $u$ is a unit vector. You can check that the projection of $v$ onto this subspace is $(v^\top u) u$. (Review geometric interpretation of dot product.) Writing this more suggestively as $uu^\top v$, we see that the projection matrix is $uu^\top$.

In general, if you want to project onto the subspace $\text{span}\{u_1, \ldots, u_d\}$ where $u_1, \ldots, u_d$ form an orthonormal basis, then you can check that the projection of $v$ onto this subspace is $(v^\top u_1) u_1 + \cdots + (v^\top u_d) u_d$, i.e. you just do one-dimensional projections onto each $u_i$ and add everything up. [I suppose your book would prove this in some form.] Orthogonality is critical for this result. In matrix form, this leads to the projection matrix $UU^\top$ where the columns of $U$ are $u_1, \ldots, u_d$.