Why is it insufficient to say that a symmetric matrix A is positive semidefinite if it has non-negative diagonals?

59 Views Asked by At

Say we have a symmetric matrix $A \in R^{n\times n}$ with all non-negative diagonals.

Then, to my understanding, $$\operatorname{trace}(A) = \sum_{i=1}^n A_{ii} = \sum_{i=1}^n \lambda_i \ge 0$$

Because $A$ is symmetric, by the spectral decomposition theorem it can be written as $$A = UDU^T $$ where U is an orthogonal matrix with the eigenvectors of A as columns and $D = \operatorname{diag}(\lambda_1, \lambda_2, ... , \lambda_n)$.

We know that the condition for $A$ to be PSD is $x^TAx\ge0 $ for any $x\in R^n$. Then $$x^TUDU^Tx \ge 0 $$

If we define vector $y=U^Tx$, this becomes $$y^TDy\ge0$$ or $$x^TAx=\sum_{i=1}^n\lambda_iy_i^2$$

Because we established above that $\sum_{i=1}^n\lambda_i\ge0$ and we know that $y_i^2\ge0$ for all $i=1,\ldots,n$, we know that the above expression for $x^TAx$ must be $\ge0$ and thus matrix A is PSD.

What am I missing? Why isn't this sufficient to show that $A$ is PSD?

Thank you so much.

1

There are 1 best solutions below

0
On

Suppose that $\lambda_1=-1$ and that $\lambda_2=2$. Then $\lambda_1+\lambda_2=1\geqslant 0$. However,$$\lambda_1\times3^2+\lambda_2\times1^2=-1<0.$$So, no, it doesn't follow from $\lambda_1+\lambda_2+\cdots+\lambda_n\geqslant0$ that you always have$$\lambda_1y_1^{\,2}+\lambda_2y_2^{\,2}+\cdots+\lambda_ny_n^{\,2}\geqslant0$$