I would like to ask whether my understanding of convexity, Hessian matrix, and positive semidefinite matrix is correct.
For a twice differentiable function $f$, it is convex iff its Hessian $H$ is positive semidefinite.
The Hessian matrix $H$ can be calculated by:
https://en.wikipedia.org/wiki/Hessian_matrix
And the definition of positive semidefinite is:
$$x^THx\geqslant0$$
For example, a function
$$f(x,y)=\frac{x^2}{y^4}$$
where $x\geqslant0, y>0$.
Its Hessian is
$$ \begin{bmatrix} 2y^{-4} & -8xy^{-5}\\ -8xy^{-5} & 20x^2y^{-6}\\ \end{bmatrix} $$
And $$x^THx=6x^2y^{-4}\geqslant0$$
Therefore, $H$ is positive semidefinite and $f(x,y)$ is convex.
On the other hand, the determinant of $H$ is
$$40x^2y^{-10}-64x^2y^{-10}=-24x^2y^{-10}\leqslant0$$
which means $f(x,y)$ is concave.
Since $f(x,y)$ is nonlinear, it cannot be both convex and concave, and there must be something wrong with the derivation above.
I would like to ask which part of my under standing is wrong.
Thank you.