# Finding distance in Hilbert space

How to calculate $d(e_1,L)$, where $e_1=(1,0,0,\ldots)$ and $L=\left\{x\in l^2\mid x=(\xi_j)_{j=1}^\infty,\sum_{j=1}^n\xi_j=0\right\}$. Thanks in advance.

-

For $n \in \mathbb N$ and let $x = (1, -\frac 1n, \ldots, -\frac 1n, 0,\ldots)$, then $x \in L$ and \begin{align*} \|x-e_1\|^2 &= \sum_{i=1}^n \frac 1{n^2}\\ &= \frac 1n\\ &\to 0 \end{align*} Hence $d(e_1, L) = 0$.