Unit vectors with a common inner product (source code)

= Unit vectors with a common inner product
{title2=$G=(1-t)I+t\mathbf1\mathbf1^T$}

For $n\geq2$, the <Gram matrix> of $n$ unit <vectors> with common distinct-pair <inner product> $t$ is $G=(1-t)I+t\mathbf1\mathbf1^T$. Its <eigenvalues> are $1+(n-1)t$ on the all-ones direction and $1-t$ on its orthogonal complement. It is a <positive-definite symmetric matrix> exactly when $-1/(n-1)<t<1$, permitting a linearly independent realization in $\mathbb R^n$. An explicit construction takes the columns of
$$
B=\sqrt{1-t}(I-uu^T)+\sqrt{1+(n-1)t}\,uu^T,
\qquad u=\mathbf1/\sqrt n.
$$
The two orthogonal projections have product zero, so $B^TB=G$; positive <eigenvalues> also make $B$ invertible. At either endpoint the corresponding eigenspace becomes a linear dependence.