  We study the problem of testing whether a symmetric $d \times d$ input matrix
$A$ is symmetric positive semidefinite (PSD), or is $\epsilon$-far from the PSD
cone, meaning that $\lambda_{\min}(A) \leq - \epsilon \|A\|_p$, where $\|A\|_p$
is the Schatten-$p$ norm of $A$. In applications one often needs to quickly
tell if an input matrix is PSD, and a small distance from the PSD cone may be
tolerable. We consider two well-studied query models for measuring efficiency,
namely, the matrix-vector and vector-matrix-vector query models. We first
consider one-sided testers, which are testers that correctly classify any PSD
input, but may fail on a non-PSD input with a tiny failure probability. Up to
logarithmic factors, in the matrix-vector query model we show a tight
$\widetilde{\Theta}(1/\epsilon^{p/(2p+1)})$ bound, while in the
vector-matrix-vector query model we show a tight
$\widetilde{\Theta}(d^{1-1/p}/\epsilon)$ bound, for every $p \geq 1$. We also
show a strong separation between one-sided and two-sided testers in the
vector-matrix-vector model, where a two-sided tester can fail on both PSD and
non-PSD inputs with a tiny failure probability. In particular, for the
important case of the Frobenius norm, we show that any one-sided tester
requires $\widetilde{\Omega}(\sqrt{d}/\epsilon)$ queries. However we introduce
a bilinear sketch for two-sided testing from which we construct a Frobenius
norm tester achieving the optimal $\widetilde{O}(1/\epsilon^2)$ queries. We
also give a number of additional separations between adaptive and non-adaptive
testers. Our techniques have implications beyond testing, providing new methods
to approximate the spectrum of a matrix with Frobenius norm error using
dimensionality reduction in a way that preserves the signs of eigenvalues.
