# Is any symmetric matrix of which its diagonalvector equals its eigenvalues a diagonal matrix?

Let $$A$$ be an $$n \times n$$ a real, positive semidefinite and symmetric matrix. Suppose we know that the diagonal of this matrix is equal to its eigenvalues. (So if we have eigenvalues $$\lambda_1, ... \lambda_n$$, then $$diag(A)$$ is a permutation of $$(\lambda_1, ..., \lambda_n)$$.)

Can we prove from these assumptions that $$A$$ is a diagonal matrix? I.e. all non-diagonal entries are $$0$$? And if so, how?

It's equal to this question, only the counterexample given there is not symmetric.

Ideas so far:

Proving it the other way around is easier. If a matrix is diagonal and $$n \times n$$, then its entries are equal to its eigenvalues. But this doesn't help with proving it the other way around.

I know that since $$A$$ is real, and positive semidefinite, we can do a diagonalization by eigendecomposition to find $$A = VBV^{T}$$ with $$V$$ an orthonormal matrix and $$B$$ a diagonal matrix with eigenvalues on the diagonal. I've tried to prove from here that the $$diag(A)$$ being a permutation of $$diag(B)$$ must mean that $$V$$ is a permutation matrix, i.e. $$V$$'s orthonormal rows consist of $$n-1$$ zeros and a single 1, but I couldn't get the math working in cases when there are two equal eigenvalues on $$B$$'s diagonal.

• I am not sure if I understood your question, but isn't the matrix $A=\{\{2,1\},\{1,1\}\}$ an counter-example? It is diagonalizable, but the diagonal in this form has not the eigenvalues of $A$. Aug 30, 2022 at 19:09
• @YgorArthur Let me clarify. I want to prove(/disprove) that if $A$ is symmetric (and semi postive definte), and its eigenvalues are equal to its diagonal (with exception for permutations), then $A$ must be a diagonal matrix. You're interpreting it the other way around: you're proving that if $A$ is symmetric, then it's eigenvalues are not equal to its diagonal. I will phrase the original question a bit differently.
– user1088177
Aug 30, 2022 at 19:16
• I really don't know. If you do the same in higher dimensions you will get more complicated equations and will need to analize many cases. After one week you may get the result haha. Aug 30, 2022 at 19:31
• It's true for dimension 3 (the polynomial equations that need to be satisfied have as their only real solution that the off-diagonal entries are zero). I'm guessing there's an easy general principle at work here, but I don't see it. Aug 30, 2022 at 19:48
• Great question! I thought for sure the answer was no, but a couple of nice posted answers have proven me wrong. Aug 30, 2022 at 20:01

the underlying ideas come from majorization but all you need to do is check the Frobenius norm

$$\big \Vert A\big \Vert_F^2 = \sum_{k=1}^n\lambda_k^2 = \sum_{k=1}^n a_{k,k}^2 = \big(\sum_{k=1}^n a_{k,k}^2\big) + \big(\sum_{k=1}^n\sum_{j\neq k} a_{j,k}^2 \big)=\big \Vert A\big \Vert_F^2$$

so all off diagonal entries are zero.

With a little care, you can also do this with Hadamard Determinant Inequality.

• Ugh, sometimes it can be so easy... +1 Aug 30, 2022 at 20:08

It's true for symmetric matrices. Consider the characteristic polynomial of $$A$$: $$\chi_A(x) = (x - \lambda_1) \cdot \ldots \cdot (x - \lambda_n) = x^n + c_{n-1}x^{n-1} + c_{n-2}x^{n-2} + \ldots.$$ By Fadeev-LeVerrier, we must have $$c_{n-2} = \frac{1}{2} \left(\mathrm{tr}(A)^2 - \mathrm{tr}(A^2)\right).$$ On the other hand, by multiplying out, $$c_{n-2}$$ must be equal to $$\sum\limits_{j < k} \lambda_j\lambda_k = \frac{1}{2}\sum\limits_{j \neq k} \lambda_j\lambda_k.$$ Thus $$\frac{1}{2}\sum\limits_{j \neq k} \lambda_j\lambda_k = \frac{1}{2} \left(\mathrm{tr}(A)^2 - \mathrm{tr}(A^2)\right).$$ Now, as $$A$$ is symmetric, $$\mathrm{tr}(A^2)$$ is just the square of all entries of $$A$$. We thus arrive at $$\frac{1}{2}\sum\limits_{j \neq k} \lambda_j\lambda_k = \frac{1}{2}\left(\sum\limits_{j,k = 1}^n \lambda_j\lambda_k - \sum\limits_{j,k = 1}^n A_{j,k}^2\right) = \frac{1}{2}\left(\sum\limits_{j = 1}^n \lambda_j^2 + \sum\limits_{j \neq k}^n \lambda_j\lambda_k - \sum\limits_{j,k = 1}^n A_{j,k}^2\right).$$ By assumption we have $$\sum\limits_{j = 1}^n \lambda_j^2 = \sum\limits_{j = 1}^n A_{j,j}^2$$, hence $$0 = - \sum\limits_{j \neq k} A_{j,k}^2.$$ Therefore all non-diagonal terms must be $$0$$.

I will suppose that with the eigenvalues you mean the eigenvalues with their proper multiplicity (as roots of the characteristic polynomial). On the other hand I will need no other hypotheses than having a real symmetric matrix.

Then let me rephrase the question as follows: suppose we have a real diagonal matrix $$D$$, and we add to it a symmetric matrix$$~S$$ that is non zero but whose diagonal entries are all zero; then is it possible that $$S+D$$ has the same characteristic polynomial as $$D~$$? (A counterexample to your question would be such an $$S+D$$.) The answer is that his is not possible, because if $$n$$ is the size of the matrix (obviously $$n\geq 2$$ is necessary), then the coefficient of $$X^{n-2}$$ in the characteristic polynomial of $$S+D$$ is strictly less than the corresponding coefficient of the characteristic polynomial of $$D$$, contradicting equality of those polynomials. To see this, use that the mentioned coefficient is the sum over all principal $$2\times 2$$ minors of the matrix in question (this is true for all matrices) and each such $$2\times 2$$ submatrix $$\binom{a~~b}{b~~c}$$ gives a minor $$ac-b^2$$ where the product $$ac$$ of diagonal entries is the same between the matrices $$S+D$$ and $$D$$, while $$-b^2$$ is always nonpositive, is at least once strictly positive for $$S+D$$ while it is always $$0$$ for $$D$$.