Orthogonal projection formula

If $V$ is an $n$-dimensional vector space and $U$ is a subspace and $u_1,...,u_k$ is an orthonormal basis for $U$ and $v$ is a vector in $V$ then the orthogonal projection of $v$ in $U$ is given by $$\sum \langle v,u_i \rangle u_i$$

But why does $u_i$ have to be orthonormal? Why does it not hold that the projection is $\sum \langle v,u_i \rangle u_i$ if $u_i$ is any basis? And what is $\sum {\langle v,u_i \rangle \over \|u_i\|^2} u_i$? Is it an orthognal projection?

• For your formula, if $(u_i)$ isn't orthonormal, we may not have $\| u_i \|^2 = 1$ – Hawk Aug 19 '13 at 7:24

For a projection $A$ onto $U$, there has to be $uA=u$ for any $u\in U$. So try $u_j$ in your formula: $$\sum_{i=1}^k\frac{\langle u_j,u_i\rangle u_i}{\langle u_i,u_i\rangle}=u_j$$ Because $\{u_i\}$ is a basis, we have $\langle u_j,u_i\rangle=0$ when $i\neq j$. That shows $\{u_i\}$ should be orthogonal. And then $\{\frac{u_i}{\|u_i\|}\}$ is in fact orthonormal.
I think the problem is not why $u_i$ have to be orthonormal, but you already assume $u_i$ are orthonormal, then you derive the formula $\sum \langle v,u_i\rangle u_i$. The proof of this formula can be found in books on Linear Algebra.
However, if $u_i$ are not orthonormal, we have the following result. Suppose $A=(u_1,\ldots,u_k)$, then the orthogonal projection of $v$ is given by $$A(A^*A)^{-1}A^*v.$$ $A^*$ is the transpose. Obviously, this form is different from $\sum \langle v,u_i\rangle u_i=AA^*v$ (In general $A(A^*A)^{-1}A^*\neq AA^*$).