Theorem

If is an orthogonal basis of an inner product space , and if is any vector in , then

If is an orthonormal basis of an inner product space , and if is any vector in , then