Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider the quadratic function $f(x_1,x_2,x_3,x_4)=x_1+2x_2+4x_4+x_1^2+5x_2^2+3x_3^2x_4^2-4x_1x_2-2x_2x_3+2x_3x_4$. Is f a convex function?

Consider a constraint defined using the above function f: $f(x_1,x_2,x_3,x_4)\le6$. Is is a convex constraint?

I think f is a convex function when I write the function in matrix notation I have the sum of a positive definite matrix and a linear vector. How do I show that a constraint is convex?

share|cite|improve this question
Sorry, but what is a convex constraint? – Tomás Oct 5 '12 at 11:19

As written the function is not quadratic. It is not convex either: Consider the restriction $$\phi(u,v):=f(0,0,u,v)=4u+3u^2v^2+2uv=4u+u v(2+3uv)\ .$$ The linear term $4u$ is irrelevant, and the degree $2$ term $2uv$ assumes both signs in the immediate neighborhood of $(0,0)$. It follows that the graph of $f$ intersects its tangent plane at $(0,0,0,0)$.

share|cite|improve this answer

I think, you should differentiate it twice.

$$\begin{align*} f'({\bf x}) &:= \begin{bmatrix} \partial_1f, \partial_2f, \partial_3f, \partial_4f \end{bmatrix} \\ f''({\bf x})&:=[\partial_i\partial_jf]_{i,j} \end{align*} $$ and conclude whether this symmetric matrix $f''({\bf x})$ is positive semidefinit or not.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.