[Math] Convexity, Hessian matrix, and positive semidefinite matrix

convex optimizationconvex-analysishessian-matrix

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$$

https://en.wikipedia.org/wiki/Positive-definite_matrix#Negative-definite.2C_semidefinite_and_indefinite_matrices

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.

Best Answer

I guess the problem is with how you have approached $\vec{x}^{T}H\vec{x} \ge 0$. In this equation, you wish to find whether matrix H is positive definite or not…..

While doing so, the elements of $\vec{x}$ has to be independent of elements of matrix $H$. I mean, when you use this equation to test the definiteness of the matrix, the elements of $H$ are constants and elements of vector $\vec{x}$ are variables. What you have dones is you have took the vector $\vec{x}$ as variable $x$ at position $(1,1)$ and variable $y$ at position $(2,1)$ [mind that the elements of matrix H are also in terms of variables x and y]. If your vector $\vec{x}$ were of other variables, say $\vec{x} = (p,q)$, your answer will be fine.

Related Question