# How to make a matrix positive semidefinite?

Given the following matrix, where $a$ and $b$ are real, $$\begin{bmatrix} a & b \\ b & 1 \\ \end{bmatrix}$$ how do I find the values for $a$ and $b$ (or their relationship) which makes the matrix positive semidefinite?

So $x^TAx\ge0$, which would give me $a{x_1}^2+2bx_1x_2+{x_2}^2\ge0$. How do I proceed from here? Should I attempt to diagonalize this? I don't think I can solve for the eigenvalues with $a$ and $b$ around.

Should I make the determinant equals zero? Something like $b^2-a=0$, so the answer would be $a=b^2$? Would that make sense? Or is there something else I should do first?

The eigenvalues aren't so difficult to find, since we are only interested in their sign. Let's try: $$(a-\lambda)(1-\lambda)-b^2=\lambda^2-(a+1)\lambda+a-b^2$$
The product of the roots of this polynomial is $a-b^2$, which is non negative for $a\ge b^2$.
The sum of the roots is $a+1$, and this must be non negative, that is, $a\ge -1$, which is redundant, since $b^2\ge 0$.
The condition is $a\ge b^2$.
Let $$A=\begin{bmatrix} a & b \\ b & 1 \\ \end{bmatrix}$$ Then eigenvalues of A are given by \begin{align} \det(A-\lambda I)&=(a-\lambda)(1-\lambda)-b^2\\ &=\lambda^2-(a+1)\lambda+(a-b^2) \end{align}
Now find $a$ and $b$ ranges such that the roots of the above quadratic (eigenvalues) are non-negative.