Find a 2x2 matrix with real and positive eigenvalues, but a negative definite quadratic form.
Also, find a 2x2 matrix with real and positive eigenvalues, but an indefinite quadratic form.
Isn't this not possible? If all eigenvalues are positive, isn't the matrix positive definite?
1)Real and positive eigenvalues, negative definite quadratic form.
You're looking for such a matrix $A=\begin{bmatrix}a && b \\ c && d\end{bmatrix}$, which satisfies some conditions:
$\textbf{a}$) $a<0$ and $\det A=ad-cb>0$ (negative definite quadratic form)
$\textbf{b)}$characteristic polynomial is $\chi(x)=(x-y)^2=x^2-2yx+y^2$ for some $y>0$ (positive eigenvalues).But you know that $\chi(x)=x^2-(a+d)x+ad-bc$.
Now you are looking for $a,b,c,d$. There are a lot of solutions, for example $a=-2$, $b=1$, $c=9$, $d=4$.
2)Real and positive eigenvalues, indefinite quadratic form.
If you put $a=0$ sometimes you can get indefinite quadratic form ($\textbf{b}$ the same like above). You can check that for example $b=-1$, $c=4$, $d=4$ is a solution (quadratic form if positive for $[x,y]=[1,1]$ and negative for $[x,y]=[-2,1]$.