Is a quadratic function always convex in a quadratic program (QP)?

162 Views Asked by At

If you have a quadratic objective function, is this always convex (or concave)? It sounds logical as you think of the shape of a parabola. However, I read that the Hessian can be negative-definite and then the quadratic function is non-convex. Can someone clarify this and maybe give some examples?