[Math] Uniqueness of orthogonal projections

linear algebramatrices

I'm reading a book on numerical recipes and I'm having a bit of trouble trying to prove a statement made by the authors: given $B \in \mathbb{R}^{n \times r}$ with orthonormal columns (forming an orthogonal base in $ImB = S$), then $P = BB'$ is an orthogonal projection on $S$ and its also unique.

Now the first part about $P$ being an orthogonal projection is clear, but its uniqueness is not so clear to me. Could anyone help me understand why $P$ is unique?

Best Answer

The thing we need to prove is as follows: if $S$ is a fixed subspace, and if $P,P'$ are two projections onto $S$, then $P = P'$.

An easy way to prove this is as follows: we note that $P,P'$ must be identical if there is some basis $e_1,\dots,e_n$ for $\Bbb R^n$ such that $P e_i = P' e_i$ for all $1 \leq i \leq n$. We construct such a basis as follows:

We may select an orthonormal basis $e_1,\dots,e_r$ of $S$. We may extend this to an orthogonal basis of $\Bbb R^n$. We then note that we must have $$ P(e_i) = P'(e_i) = \begin{cases} e_i & 1 \leq i \leq r\\ 0 & r < i \leq n\end{cases} $$ The conclusion follows.

Related Question