# Is matrix positive semidefinite?

I am new here and have an interesting question:

Consider the (n x n) symmetric and real Matrix M with

$\sum_j M_{i,j} = 0$

$\sum_i M_{i,j} = 0$

$M_{i,i} > 0$

It seems a matrix of this type is always positive semi-definite. How can this be proven?

If we would also have that $M_{i,j} < 0$ for $i \neq j$, then one could use the Gershgorin circle theorem, together with the fact, that all eigenvalues of $M$ have to be real. However, if $M_{i,j}, i \neq j$ takes positive and negative values, this proof does not work.

I think positive semi-definiteness also holds for the general case of different signs of $M_{i,j}, i \neq j$. I tried many matrices and never found a counter example.

The matrix $$\begin{pmatrix} 1 & 2 & -3 \\ 2 & 1 & -3 \\ -3 & -3 & 6 \end{pmatrix}$$ has eigenvalue $-1$.