Whenever $A$ is positive semi-definite on the subspace of vectors $(a_1,\dots,a_n)$ with $\sum_i a_i=0$, then the same will be true for $B$. This is a result of Schoenberg.
Andreas Thom
- 25.5k
- 4
- 82
- 142