Let $V$ be a unitary space with inner product $(,)$ , and let $B=\{u_1,...,u_n\}$ a basis for $V$ prove that for every two vectors $x=x_1u_1+...+x_nu_n$ and $y=y_1u_1+...+y_nu_n$ $(x,y)= \sum_{i=1}^nx_i\bar y_i$ if and only if $B$ is an orthonormal basis
I think I got the first side , let $B$ be an orthonormal basis then we get $(x,y)=(\sum x_iu_i,\sum y_iu_i)= \sum_{i=1}^n \sum_{j=1}^n x_i \cdot \bar y_j \cdot (u_i,u_j) = \sum_{i=1}^n \sum_{j=1}^n x_i \cdot \bar y_j$ I think this is correct because if $B$ is an orthonormal basis then $(u_i,u_j)=1$
but how can I prove the second side? assume $x= \sum_{i=1}^n x_i u_i$ and $y= \sum_{i=1}^n y_i u_i$ so we get $(x,y)=x_1\bar y_1+...+x_n \bar y_n$ how can I get from here to an orthonormal basis?
appreciate any help and tips on how to approach this side
For the other direction, take $x_k=u_k$ and $y_{\ell}=u_{\ell}$ and apply the inner product. You will get $\langle x_k,y_{\ell}\rangle =1$ if $k=\ell$ and $0$ else.