I'm working on a proving problem in my Linear Algebra textbook (Larson, 8th ed.) and I'd like to ask for help in finishing the proof for a theorem on the projection onto a subspace.
Prove: If $\left \{u_{1},u_{2},...,u_{t} \right \}$ is an orthonormal basis for the subspace $S$ of $\mathbb{R}^{n}$, and $v$ $\epsilon$ $\mathbb{R}^{n}$, then: $$proj_{s}v = \left ( v\cdot u_{1} \right )u_{1} +...+\left ( v\cdot u_{t} \right )u_{t}$$
My answer so far:
Let $v$ $\epsilon$ $\mathbb{R}^{n}$, $v=v_{1}+v_{2}$ s.t. $v_{1}$$\epsilon$$S$ and $v_{2}$$\epsilon$$S^{\perp}$
Let $\left \{u_{1},u_{2},...,u_{t} \right \}$be an orthonormal basis for $S$ s.t. $0<t<n$
$\Rightarrow$ $v=v_{1}+v_{2} = (c_{1}u_{1}+...+c_{t}u_{t})+v_{2}$, where $c_{i}$$\epsilon$$\mathbb{R}^{n}$
$\Rightarrow$ $v \cdot u_{i}=(c_{1}u_{1}+...+c_{t}u_{t})\cdot u_{i}=c_{i}(u_{i}\cdot u_{i})=c_{i}(1)=c_{i}$
This is the part that confuses me because the book's answer key says that I can jump straight to the next line. I don't understand why this is the case.
$\Rightarrow$ $v_{i} = proj_{s}v= \left ( v\cdot u_{1} \right )u_{1} +...+\left ( v\cdot u_{t} \right )u_{t}$
Any help would be greatly appreciated. Thank you so much!
Here is a proof that does not use any a priori relation between $S$ and $S^\perp$ (other than the definition of the latter) at all, nor indeed the fact that the $u_i$ are linearly independent (since they are said to be a basis of $S$), just that $u_i\cdot u_j=\delta_{i,j}$ for all $i,j$ (orthonormality).
For any $w$ in the span $S$ of $u_1,\ldots,u_t$, say $w=a_1u_1+\cdots+a_tu_t$, and any index$~k$ one has $$ u_k\cdot w = a_1(u_k\cdot u_1)+\cdots+a_t(u_k\cdot u_t) =\sum_{i=1}^ta_i\delta_{i,k}=a_k, $$ which shows in particular that $u_1,\ldots,u_t$ are linearly independent (since $w=0$ implies $a_k=0$ for all$~k$). It also follows that $$ (u_1\cdot w)u_1+\cdots+(u_t\cdot w)u_t = a_1u_1+\cdots+a_tu_t = w \qquad\text{for all $v\in S$.} $$ Then the map $f:v\mapsto (u_1\cdot v)u_1+\cdots+(u_t\cdot v)u_t$ is the identity when restricted to its own image, which is clearly contained in$~S$, which means $f\circ f=f$ and $f$ is a projection. The image of this projection, which as said is contained in$~S$ is in fact equal to$~S$, since every $w\in S$ satisfies $f(w)=w$ so is in the image of $f$. Finally the kernel of $f$ clearly contains $S^\perp$ (for $v\in S$, all terms in the definition of $f(v)$ are zero), and indeed is equal to $S^\perp$ since by the mentioned linear independence, $f(v)=0$ implies all terms in the definition of $f(v)$ must be zero. All in all, $f$ is a projection with image $S$ and kernel $S^\perp$, which appears to be what was asked for.