Let $X \subset \mathbb{R}^n$. Suppose that $0 \in X$ and $\|x-y\| = 1$ for $x,y \in X, x \neq y$. Then the maximum number of elements in $X$ is $n+1$. Let $X \subset \mathbb{R}^n$. Suppose that $0 \in X$ and $\|x-y\| = 1$ for $x,y \in X, x \neq y$. Then the maximum number of elements in $X$ is $n+1$.
My attempt
By contradiction, let's suppose that $X$ has more than $n+1$ elements.
Then, take $x_0 = 0$, and $x_1,...,x_{n+1}\in X$.
I realized the following:
$\|x\| = 1$ for all $x\in X-\{0\}.$
$\|x_i-x_j\|^2 = \langle\,x_i-x_j,x_i-x_j\rangle = 1$ $\Rightarrow$
$\langle\, x_i,x_j\rangle = 1/2 $ if $i\neq j.$
And I'm stuck here.
Can anyone help?
 A: Let $X=\{x_0=0,x_1,\ldots,x_m\}$, with $\Vert x_i-x_j\Vert=1$ if $i\ne j$. It follows that $\Vert x_i\Vert=1$ for $i=1,2,\ldots,m$ and $\langle x_i,x_j\rangle=\dfrac12$ for distinct $i\ne j$ from $\{1,2,\ldots,m\}$. 
We want to prove that $m\le n$. Clearly we may suppose that $m>1$, because if $m=1$ there is nothing to prove.
Now, let $v=\sum\limits_{i=1}^mx_i$. Clearly we have
$$\eqalign{ \Vert v\Vert^2 &=m+\frac{m(m-1)}{2}=\frac{m(m+1)}{2},\tag{1}\cr
\langle x_i,v\rangle&=\frac{m+1}{2},\qquad\hbox{for $i=1,2,\ldots,m$.}  }$$
For a given real $t$ (to be determined later), we consider $y_1,y_2,\ldots,y_m$ defined by $y_i=tx_i-v$.
Using $(1)$ we have, for $i\ne j$ from $\{1,2,\ldots,m\}$:
$$\eqalign{\Vert y_i\Vert^2&=t^2-2t\frac{m+1}{2}+\frac{m(m+1)}{2}
\cr
&=(t-\frac{m+1}{2})^2+\frac{m^2-1}{2}>0.\cr
\langle y_i,y_j\rangle&=\frac{1}{2}t^2-2t\frac{m+1}{2}+\frac{m(m+1)}{2}\cr
&=\frac{(t-m-1)^2-m-1}{2}
}$$
Now, choosing $t=m+1+\sqrt{m+1}$, we see that $\langle y_i,y_j\rangle=0$ for every $i,j$ from $\{1,2,\ldots,m\}$ with $i\ne j$. Therefore $(y_1,y_2,\ldots,y_m)$ is a system of orthogonal non-zero vectors in $\mathbb{R}^n$,they are linearly independent and consequently $m\le n$, that is
$\vert X\vert=m+1\le n+1$,which is the desired conclusion.
