Problem Let $V$ and $W$ two subspaces of a Hilbert space $H$, with $dim(V)= m -1$ and $dim(W) = m$, with $m \geq 1$. Prove that if $V=span\left\{e_1, ..., e_{m-1}\right\}$, then there exists a vector $w \in W$, $w \neq 0$ such that $w \perp e_i$, $\forall i= 1, ..., m-1$.
My attempt The set $\left\{e_1, ..., e_{m-1}\right\}$ is a basis for the vectorial space $V$. Therefore, I can complete it to a basis of $W$, which we define as $\left\{e_1, ..., e_{m-1}, e_m \right\}$ Now, by contradiction, suppose that $\forall w \in W, (w, e_i) \neq 0$, for some $i = 1,..., m-1$. That means that in particular $(e_m, e_i) \neq 0$, for some $i= 1...m -1$. However, by Gram-Schmidt orthonormalization, we can transform the basis such that they are all orthogonal. Now, any $w \in W$ can be written in terms of the new orthonormal basis. Does that contradict the fact that $(w, e_i) \neq 0$ for some $i$, where $e_i$ is an element of the old basis? I don't think so, I feel stuck. Any help?
Hint: Just look at the orthogonal projection onto , restricted to . By dimension count, it must have nontrivial kernel, so ...
(By the way, in your argument, by completing a basis of $V$ to one of $W$, you're assuming that $V\subset W$. There's no reason for this to be true. If you adjust your argument to extend $\{e_i\}$ to an orthonormal basis of $V+W$ using Gram-Schmidt, it will work. But it's effectively the same as the argument I gave above because Gram-Schmidt is just a series of orthogonal projections.)
After thinking about your question, the proof will work in any finite-dimensional inner product space, even over $\mathbb{Q}$, because the Gram-Schmidt process always works, so you can always build orthogonal projections. (It doesn't require taking any square roots.)