# 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.

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. – yoyoyoyosef Nov 9 '16 at 14:20
• @yoyoyoyosef however: for a rank-1 symmetric matrix is positive semidefinite if and only if it has a positive diagonal entry. So at any rate, this naive approach is fine for the $2 \times 2$ setting. – Omnomnomnom Nov 9 '16 at 14:54

"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.

• The question specifies the range of $x$ to be $x>0$ so the matrix is psd under the given constraints. – Deniz Sargun Mar 21 at 13:07