<s>[INST] If $x \neq 0,y \neq 0,$ then $x^2+xy+y^2$ is ..... I came across the following problem that says:   

If $x \neq 0,y \neq 0,$ then $x^2+xy+y^2$ is
  1.Always positive
  2.Always negative
  3.zero
  4.Sometimes  positive and sometimes negative.  

I have to determine which of the aforementioned options is right.   
Now since $x \neq 0,y \neq 0$, so $ x^2+xy+y^2=(x-y)^2+3xy > 0$,if $x,y$ are of  same sign. But if $x,y$ are of different sign,I am not sure about the conclusion.
Can  someone point me in the right direction?  Thanks in advance for your time.
 [/INST] $x^2 + xy + y^2$ is a quadratic form and can be written
$$x^2 + xy + y^2 = \begin{bmatrix} x & y\end{bmatrix}\begin{bmatrix} 1 & \frac{1}{2} \\ \frac{1}{2} & 1 \end{bmatrix}\begin{bmatrix} x \\ y\end{bmatrix}$$
A matrix $\mathbf{A}$ is positive-definite if $\mathbf{z'}\mathbf{A}\mathbf{z}>0 $ for all $\mathbf{z}\neq 0$
Show that $\begin{bmatrix} 1 & \frac{1}{2} \\ \frac{1}{2} & 1 \end{bmatrix}$ is a positive-definite matrix and you will have a very nice solution to your problem
</s>