Does dropping off-diagonal elements from a positive semidefinite matrix preserve positive semidefinite property? Let $M$ be a symmetric positive semidefinite matrix of size $n \times n$. Randomly drop any number of off-diagonal elements by setting them to zero on both the upper and lower triangle (keeping symmetry). Is the resulting matrix still positive semidefinite?
For example:
$$
\begin{pmatrix}
2.7732 & 0.670677 & 0.141774 \\
0.670677 & 2.50917 & 0.393801 \\
0.141774 & 0.393801 & 2.3329
\end{pmatrix}
\rightarrow
\begin{pmatrix}
2.7732 & 0.670677 & 0 \\
0.670677 & 2.50917 & 0 \\
0 & 0 & 2.3329 
\end{pmatrix}
$$
is still positive semidefinite. I observed this numerically by generating matrices following this algorithm, but it certainly may just be due to the distribution that those matrices came from.
The number of elements to drop on one of the sides is $r \in \{ 1, 2, \dots, n(n-1)/2 \}$.
Thanks
 A: The simplest counter I was able to find is:
$\begin{pmatrix}
1 & 1 & 1 \\ 
1 & 1 & 1 \\
1 & 1 & 1 \\
\end{pmatrix}$
Has rank $1$ and $(1,1,1)$ is a $3$-eigenvector, so the spectrum is $\{[3]^1,[0]^2\}$ and the matrix is PSD.
$\begin{pmatrix} 1 & 1 & 0 \\ 1 & 1 & 1 \\ 0 & 1 & 1 \end{pmatrix}$ has characteristic polynomial
$(1-x)( (1-x)^2 - 1) - 1(1-x) =  (1-x)((1-x)^2-2) = (1-x)(x^2-2x-1)$.
So the spectrum is $\{[1]^1,[1+\sqrt{2}]^1,[1-\sqrt{2}]^1\}$ and the matrix isn't PSD.
Note with $2\times 2$ there is no counter since after any step you'll get a diagonal matrix, and the entries on the diagonal of a PSD matrix are non-negative.
A: To elaborate on Yorch's counterexample: for any $n\ge3$ and any entrywise nonzero vector $u\in\mathbb R^n$, if we zero out any symmetric pair of off-diagonal entries from $M=uu^\top$, the resulting matrix is indefinite.
Let $Z$ be obtained from $M=uu^\top$ by setting the $(1,2)$-th and $(2,1)$-th entries to zero. Then $Z$ is indefinite because it has a positive diagonal but its leading principal $3\times3$ minor is negative:
$$
\det\pmatrix{u_1^2&0&u_1u_3\\ 0&u_2^2&u_2u_3\\ u_1u_3&u_2u_3&u_3^2}=-(u_1u_2u_3)^2<0.
$$
