Prove that $\sum_{i,j} \langle v_i, v_j \rangle \langle w_i, w_j \rangle \geq 0$ Let $v_1 \dots v_n, w_1 \dots w_n \in H$ an inner product space.
I am trying (unsuccesfully) to show that
$$ \sum_{i,j=1}^n \langle v_i, v_j \rangle \langle w_i, w_j \rangle \geq 0 .$$
Any hints?
 A: The vector space spanned by $v_1,\ldots,v_n,w_1,\ldots,w_n$ is finite-dimensional. Therefore, by a change of basis, we may assume that the inner product space is just $\mathbb C^{2n}$ equipped with the usual inner product. Let $u_i=\bar{w}_i$ for each $i$. Now, using the fact that the trace of a product of matrices is invariant under cyclic permutation of the multiplicands, we have
\begin{align}
\sum_{i,j=1}^n \langle v_i, v_j \rangle \langle w_i, w_j\rangle
&=\sum_{i,j=1}^n v_j^\ast v_i u_i^\ast u_j\\
&=\operatorname{trace} \left(\sum_{i,j=1}^n v_i u_i^\ast u_jv_j^\ast\right)\\
&=\operatorname{trace}\left[\left(\sum_{i=1}^n v_i u_i^\ast\right)\left(\sum_{j=1}^n u_jv_j^\ast\right)\right].
\end{align}
As a matrix product of the form $A^\ast A$ (i.e. a Gram matrix) is always positive semidefinite, the assertion follows.
Alternatively, the sum in question is of the form $\mathbf1^\ast\left[(V^\ast V)\circ(W^\ast W)\right]\mathbf1$, where $\mathbf 1$ is the all-one vector, $V$ is the augmented matrix of the $v_i$s and $W$ is the augmented matrix of the $w_i$s. As pointed out by darij grinberg in a comment, the Gram matrices $V^\ast V$ and $W^\ast W$ are positive semidefinite. The Schur product theorem guarantees that the Hadamard product of two PSD matrices is again PSD. Hence the result.
