proof of denseness of a linear independent set and Gram determinant 
Show that a linearly independent set $\{x_1,x_2,\dots\}$ is dense
  in a Hilbert space $H$ if and only if for every $x\in H$,
  $$\frac{G(x,x_1,\dots,x_n)}{G(x_1,\dots,x_n)}\to 0$$ as $n\to \infty$,
  where $G(x_1,\dots,x_n)$ is the Gram determinant of $\{x_1,x_2,\dots ,x_n\}$

I know that in a Hilbert space $H$, a set $K$ is dense in $H$ iff $K^\perp=\{0\}$. But I couldn't use it to show that $\langle x,x_n \rangle\to 0$ as $n\to 0$ for every $x\in H$ and $x_n\in \{x_1,x_2,\dots\}$. How to proceed for this one? Any help is appreciated.
 A: Most likely, we are talking about the density of the $\text{span}\{x_1,x_2,...,x_n,...\}$ in $H$. We prove the supporting statement: let $L$ -- $n$-dimensional subspace of $H$ with basis $x_1,...,x_n$, $x\in H$, then $d^2(x,L)=\frac{G(x,x_1,...,x_n)}{G(x_1,...,x_n)}.$
Proof. Since $x_1,...,x_n$ are linear independent, then $G(x_1,...,x_n)\ne0$. Since $L$ is closed, then $x$ has a projection $y=\alpha_1x_1+...+\alpha_nx_n\in L$ and, in addition, $(x-y)\perp L$, so it means $(x-y)\perp x_k$ for $k=1,...,n$. Then for each $k=1,...,n$ we have $(x-y,x_k)=0$ or $$\alpha_1(x_1,x_k)+\alpha_2(x_2,x_k)+...+\alpha_n(x_n,x_k)=(x,x_k).$$
This is a system of linear algebraic equations with respect to $\alpha_k$, $k=1,...,n$, we solve it using the Cramer rule. Further we have $$d^2(x,L)=\|x-y\|^2=(x-y,x-y)=(x-y,x)=(x,x)-(y,x)=$$$$=(x,x)-\alpha_1(x_1,x)-...-\alpha_n(x_n,x).$$
Substituting the found coefficients and folding the whole expression, we obtain the required formula.
Now the original statement can be proved with the help of the supporting, considering finite-dimensional subspaces $L_n=\text{span}\{x_1,...,x_n\}$. Can you continue from here?
