Checking if a matrix is positive semidefinite 
Determine whether the following $2 \times 2$ matrix is positive semidefinite (PSD)
$$\begin{bmatrix}\frac{2}{x} & \frac{-2y}{x^2} \\\frac{-2y}{x^2} & \frac{2y^2}{x^3}\end{bmatrix}$$
where $x > 0$ and $y \in \mathbb R$.

A matrix is PSD if $v^T A v \geq 0$. So, do I just multiply by a vector $v = (v_1, v_2)$ and check if it is $\geq 0$? Thanks for any help.
 A: 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).
A: 
"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. 
A: I would like to add that you can also check if a symmetric matrix is positive semi-definite by checking that all of its eigenvalues are non-negative.
If they are also all positive then the matrix is actually positive definite.
Reference: https://en.wikipedia.org/wiki/Definite_symmetric_matrix#Eigenvalues
