Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The entries of Gram matrix is defined by $ \langle x_i,x_j\rangle$ in the $(i,j)^{\text{th}}$ position. It is known that Gram matrix is positive semidefinite.

Is it still positive semidefinite if $ \langle x_i,x_j\rangle$ is replaced by $ |\langle x_i,x_j\rangle|$?

share|cite|improve this question
up vote 7 down vote accepted

I believe this is true for three vectors, but here's a counterexample with four vectors:


I found this by looking for three vectors such that their scalar products are positive and at least one scalar product of two vectors in the dual basis of $\mathbb R^3$ is also positive, so that the difference of these two dual basis vectors is shorter than their sum.

A Hermitian matrix is positive semidefinite if and only if it is the Gram matrix of some set of vectors. Consider the Gram matrix $A$ of the three vectors and the sum of the two dual vectors and the Gram matrix $B$ of the three vectors and the difference of the two dual vectors. They are the same up to signs, except for the square of the sum or difference in the last entry. $A$ has only positive entries. For the component-wise absolute value of $B$ to be the Gram matrix of some set of vectors, the first three vectors would have to be the three basis vectors (up to orthogonal transformations), and the projection of the fourth vector onto the hyperplane of these three would have to be the sum of the dual basis vectors, but its length would have to be the length of the difference, which is impossible, since the difference is shorter than the sum.

This construction doesn't work for three vectors, since in $\mathbb R^2$ the scalar product of the dual basis vectors of a basis with positive scalar product of the basis vectors is always negative.

share|cite|improve this answer
Thanks for your explanation. – Sunni Sep 13 '11 at 12:08
@joriki Can you provide a reference to the fact you cite about a matrix being positive definition iff it is a Gram matrix? – ItsNotObvious Sep 13 '11 at 12:32
@3Sphere: I made this a bit more precise now. (Some include "Hermitian" in the definition of positive-semidefiniteness, others don't.) This is just due to the fact that Hermitian matrices are diagonalizable and the eigenvalues of a positive semidefinite matrix are non-negative, so you can multiply the eigenvectors by the square roots of the eigenvalues to get a set of vectors whose Gram matrix is the given matrix. In the other direction, a Gram matrix is obviously Hermitian, and it is positive semidefinite because $G=X^\dagger X$, so $y^\dagger Gy=y^\dagger X^\dagger Xy=(Xy)^\dagger(Xy)\ge0$. – joriki Sep 13 '11 at 13:00

The positive semi-definiteness of the Gram matrix can be seen from the following:

$G_{ij} = \langle x_i, x_j \rangle$ is equivalent to write $$ G = \begin{pmatrix} - &x_1^* &-\\ - &x_2^* &-\\ - &\vdots &-\\ - &x_n^* &-\\ \end{pmatrix} \begin{pmatrix} | &| &| &|\\ x_1 &x_2 &\ldots&x_n\\ | &| &| &|\\ \end{pmatrix} = X^*X \succeq 0 $$ Modifiying this structure might or might not preserve the positive semidefinite structure as Joriki showed with a counterexample.

share|cite|improve this answer
Well, this does not seem to answer the question :-) – Srivatsan Sep 13 '11 at 13:32
I see. I did not realize that the poster of the comments under Joriki's answer is not the OP. That's why I posted for further clarification. But I can remove if you wish. – user13838 Sep 13 '11 at 13:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.