Checking if a matrix is positive semidefinite
The easiest way to check if a (symmetric/Hermitian) matrix is positive definite is using Sylvester's criterion. In this case, that means that it is sufficient to check that
- $2/x \geq 0$
- $(2/x)(2y^2/x^3) - (-2y/x^2)^2 \geq 0$
The first statement is clearly true. For the second, we have $$ (2/x)(2y^2/x^3) - (-2y/x^2)^2 = \frac{4y^2 - 4y^2}{x^4} = 0 \geq 0 $$ So, your matrix will always be positive semidefinite (and singular).
"Sylvester's criterion is about positive definiteness, not positive semi-> definiteness. If you want to extend it to test for PSD you need to check > that all principal minors are non-negative, not just the leading principal minors (see here). So in this case you also need to check $2y^2/x^3 >= 0$, which is true."
If $2y^2/x^3 >= 0$ is negative for x<0. So, this would not be PSD.