Let $x\_0, x\_1, \ldots x\_{n-1}$ be arbitrary vectors in a complex Hilbert space. Define the $n \times n$ symmetric real matrix $M$ by $M\_{ij} = \lvert \langle x\_i, x\_j \rangle \rvert^2$. Must $M$ be positive semidefinite?



Positive-semidefiniteness of a Gram-like matrix
Yes. The matrix $A$ with $a\_{i,j} = \langle x\_i,x\_j \rangle$ is a Gram matrix and thus positive semidefinite, so $A^T = \overline{A}$ is positive semidefinite too. It then follows from the [Schur product theorem](https://en.wikipedia.org/wiki/Schur_product_theorem) that your matrix $M = A \circ \overline{A}$ (where $\circ$ denotes the entrywise/Hadamard product) is positive semidefinite too.


