orthogonal base in inner product I tried to solve this problem:
Let $V$ be an inner product space over a field $F$. And let $u_1, \ldots, u_k$ be linearly independent vectors such that:
$\forall \space v\in V: \left\|v\right\|^2=\left|\langle v,u_1\rangle\right|^2+\ldots + \left|\langle v,u_k\rangle\right|^2$.
I need to prove: 


*

*$V=\operatorname{span}\{u_1,...,u_k\}$

*$u_1,\ldots,u_k $ are orthogonal base of $V$.


I succeeded in solving the first part, but not the second. Any suggestions? thanks for helpers!
 A: This is harder than I thought, which makes it an interesting exercise.
I'm assuming that $F = \mathbb{R}$ or $F = \mathbb{C}$, otherwise I don't know what an inner product space is. Note that a priori $V$ could be an infinite dimensional vector space, although it turns out $\dim V = k$.


*

*Let $W = \operatorname{span}(u_1, \dots, u_k)$. For $w \in W^\perp$, choosing $v = w$ in your equation shows that $w = 0$. So we just showed that $W^\perp = \{0\}$, which is the same as saying that $W$ is dense in $V$: $\overline{W} = V$. But since $W$ is finite dimensional, it is closed: $\overline{W} = W$, so we indeed have $W = \overline{W} = V$.

*First note that choosing $v = u_i$ yields $\Vert u_i \Vert ^2 \geqslant \Vert u_i \Vert ^4$, so that we must have $\Vert u_i \Vert^2 \leqslant 1$ for all $i\in \{1, \dots, k\}$. Now, fix $i_0 \in \{1, \dots, k\}$ and let $v \in \operatorname{span}\{u_i, i \neq i_0\}^\perp$. For this $v$, your equation says $\Vert v \Vert ^2 = \left|\langle v, u_{i_0} \rangle\right|^2$. If we consider the Cauchy-Schwarz inequality $\left|\langle v, u_{i_0} \rangle\right|^2 \leqslant \Vert v \Vert ^2 \, \Vert u_{i_0} \Vert ^2 $, we must conclude that $\Vert u_{i_0} \Vert = 1$ and that equality holds in the Cauchy-Schwarz inequality, which implies that $v$ and $ u_{i_0}$ are linearly dependent. So, we have shown that $\operatorname{span}\{u_i, i \neq i_0\}^\perp \subset \operatorname{span}\{u_{i_0}\}$, in fact they must be equal because they have same dimension 1. Now we're done: it follows that $\langle u_{i_0}, u_i\rangle = 0$ for all $i \neq i_0$, and this works for any $i_0$.
Note that $(u_1, \dots, u_k)$ must be actually an orthonormal basis.
