I do not understand a basic concept about the convexity of a quadratic form. I read that

A quadratic form $$q(h)=h^{T}\mathbf{A}h$$ is convex if and only if $$\mathbf{A}$$ is positive semidefinite.

But if I search for the definition of the definiteness of a matrix $$\mathbf{A}$$, I find that:

A symmetric $$n\times n$$ real matrix $$\mathbf{A}$$ is said to be positive semidefinite if its associated quadratic form $$q(h)=h^{T}\mathbf{A}h$$ is non-negative for any $$h\ne0$$.

So I am a bit confused... If I consider that "$$\mathbf{A}$$ positive semidefinite means $$q(h)>=0$$", the first sentence means: "$$q(h)$$ is convex if and only if $$q(h)>=0$$". Therefore it seems that saying that a quadratic form is convex is the same of saying it is $$\ge0$$, and this seems quite strange.

• There is nothing strange about. You understand it correctly. Notice there is inhomogen quadratic form which is convex but not everywhere non-negative. Like $q(h) = h^2 - 1$. – user251257 Apr 11 at 18:23
• Thank you for the answer. But how can we explain the fact that q(h)=h^2 - 1 is convex but non always non negative? In conclusion is "non negative" equal to "convex"? It seems quite strange to me since the convexity of a generic function (for instance a simple function from R to R) is not due to its sign, but to its second derivative sign. So I do not understand this. – Kinka-Byo Apr 11 at 19:37
• A quadratic function essentially equals its second derivative. – gerw Apr 11 at 20:25
• The function $x^2-1$ is not of the form $x^TAx$, it’s of the form $x^TAx-c$ for a constant $c$. In 1d, a function of the form $g(x)=ax^2+bx+c$ is convex if and only if $a\geq0$, not $g(x)\geq0$ for all $x$. In 1D people often refer to functions like $g$ as “quadratics”. This is not the same as a quadratic form, which just includes the $ax^2$ part. – David M. Apr 11 at 23:29
• Thank you both. So a proof of the statment "non - negative = convex" can be simply the fact that the Hessian matrix of a quadratic form is equal to 2A (as I read on some texts)? – Kinka-Byo Apr 12 at 7:09