If both $A-B$ and $B-A$ are positive semidefinite, then $A = B$

linear algebramatricespositive-semidefinitesymmetric matrices

Let $A, B$ be two positive semidefinite matrices. Prove that if both $A-B$ and $B-A$ are positive semidefinite, then $A = B$.

I can show that their diagonal elements are the same but for others I have no idea. Any help will be appreciated.

Best Answer

One route is to observe that if $\lambda,v$ is an eigenvalue/eigenvector pair of $M$ with , then $(-M)v=-\lambda v$, meaning that $-\lambda$ is an eigenvalue of $(-M)$. Since $M:=A-B$ is positive semidefinite, conclude that any eigenvalue of $M$ satisfies $0\leq \lambda\leq 0$, so $\lambda=0$, so that $M=0$.