Suppose $\{v_1, ..., v_m\}$ is an orthonormal basis for a subspace $W \subset V$, where V is a vector space. If we extend the basis of $U$ to $\{v_1, ..., v_m, v_{m+1} ..., v_n\}$, we get a basis of $V$. Then, after applying the Gram-Schmidt process to $\{v_1, ..., v_m, v_{m+1} ..., v_n\}$, we get an orthonormal basis $\{u_1, ..., u_n\}$. Show that $\{u_1, ..., u_m\}$ is an orthonormal basis for $W$ and that $\{u_{m+1}, ..., u_n\}$ is an orthonormal basis for $W'$, where $W'$ is the orthogonal complement to $W$.
This proof seems very straightforward conceptually, but I'm not sure if my proof is correct. Here's my attempt:
Proof.
Suppose that $u \in W$, and consider the subset $\{u_1, ..., u_m\}$ of $\{u_1, ..., u_n\}$. It follows that
$$u \in span(v_1, ..., v_m)$$
However, by a previous theorem, $span(v_1, ..., v_m) = span(u_1, ..., u_m)$ since $u_1, ..., u_m$ is an orthonormal set corresponding to the set $v_1, ..., v_m$. Therefore
$$u \in span(u_1, ..., u_m)$$
Hence, $u_1, ..., u_m$ spans $W$.
Furthermore, $u_1, ..., u_m$ is a set of $\dim(W) = m$ vectors, which are linearly independent because they are orthonormal. Thus, $\{u_1, ..., u_m\}$ is an orthonormal basis for $W$.
Now, recall that $V = W \oplus W'$ and $\dim(V) = \dim(W) + \dim(W')$. Hence, the subset $v_{m+1}, ..., v_n$ must be a basis for $W'$. Suppose that $u^{-} \in W'$, then
$$u^{-} \in span(v_{m+1}, ..., v_n)$$
Again, $span(v_{m+1}, ..., v_n) = span(u_{m+1}, ..., u_n)$ so $u^{-} \in span(u_{m+1}, ..., u_n)$. Also, $u_{m+1}, ..., u_n$ is a set of $\dim(W') = \dim(V) - \dim(W) = n - m$ vectors, which are also linearly independent because they are orthonormal. Thus, $\{u_{m+1}, ..., u_n\}$ is an orthonormal basis for $W'$.
QED.
Is this proof correct? If not or if I missed anything, please let me know where I went wrong. Any assistance is much appreciated.