Quadratic sign-vector diameter formula (source code)

= Quadratic sign-vector diameter formula
{title2=$\|u_Au_A^T-u_Bu_B^T\|_F^2=2(N^2-(4|A\cap B|-4p+3)^2)$}

Take $N=4p-1$, $|A|=|B|=2p-1$ and sign <vectors> $u_A=2\mathbf1_A-\mathbf1$. The <Frobenius inner product> of two outer products is $(u_A\cdot u_B)^2$, proving the formula. The squared <Euclidean distance> is largest precisely when $|A\cap B|=p-1$, where the inner product is minus one. The common diagonal can be deleted, leaving an isometric representation in dimension $\binom N2$ if off-diagonal coordinates are multiplied by $\sqrt2$. The <Frankl-Wilson theorem> then bounds each smaller-<diameter> class.