Convexity of $f(x)=\frac{1}{2}x^TAx$

convex optimizationoptimization

For a function $f(x)=\frac{1}{2}x^TAx$, where $A \in \mathbb{R^n}$ is a symmetric matrix, and its largest eigenvalue $\lambda_{max}(A) >0$ and its smallest eigenvalue $\lambda_{min}(A) <0$,

is $f(x)$ a convex function?

What I tried is:

I found the Hessian $$\nabla^2f(x) = A$$But is this positive semi-definite? How do I use the fact that its largest eigenvalue $\lambda_{max}(A) >0$ and its smallest eigenvalue $\lambda_{min}(A) <0$ from here?

Best Answer

a positive semidefinite matrix has all eigenvalues non-negative. However, $A$ has a negative eigenvalue $\lambda_{min}$.