I've read about Sylvester's Law of Inertia which states that for any scalar product space $(V,g)$, we have subspaces $V^+,V^-$ such that $V=V^+\oplus V^-$ and $g$ is positive definite on $V^+$ and negative definite on $V^-$. The dimensions of these subspaces are uniquely defined by $g$.
$\dim(V^-)\equiv\nu$ is called the index of $g$, which is obviously well-defined. I've also understood the result that there exists an orthonormal basis for every scalar product space. It is claimed that the number of vectors $e_i$ in the orthonormal basis such that $\langle e_i,e_i\rangle=-1$ is $\nu$, but without proof.
I thought maybe if I could show that the subset of all negative definite basis vectors (say $(e_1,\ldots,e_{\nu})$) forms the basis of $V^-$, then that would naturally lead to the above result. But I run into some trouble. Taking a very simple example, if we just have a 2D space $V$ with ON basis $(e_1,e_2)$ where $\langle e_1,e_1\rangle=1$ and $\langle e_2,e_2\rangle=-1$, then $v=e_1+2e_2$ would be such that $\langle v,v\rangle<0$. So I can't show that all nonzero negative definite vectors are spanned solely by the negative definite subset of the ON basis.
What am I missing/where am I going wrong?
(P.S. by negative definite $v$, I just mean that $g$ is negative definite on $\{v\}$ to save typing effort)