# Prove a certain matrix is positive semidefinte.

Consider a stochastic matrix $P$, i.e. real, non-negative, square, rows sum to one. Consider $\Xi$ to be a diagonal matrix with a principal left eigenvector of $P$ on the main diagonal and zeros elsewhere (i.e. the stationary distribution if the chain is ergodic).

Prove that the matrix $\Xi^2 - P^\top \Xi^2 P$ is positive semidefinite.

Edit: It turns out that this is false.

I have verified this numerically (Edit: I had an error in my implementation) and failed to come up with a counterexample. Interestingly, it only holds for the principal eigenvector and is not necessarily true for the others.

Are you sure you wrote this correctly? It didn't take me long to find a counterexample. Take $$P = \pmatrix{0 & 1\cr 1/2 & 1/2\cr},\ \Xi = \pmatrix{1/2 & 0\cr 0 & 1\cr},\ \Xi^2 - P^T \Xi^2 P = \pmatrix{0 & -1/4\cr -1/4 & 1/2\cr}$$