I know that a function with one variable has to have continuous positive second order derivative for every $x$. Is there an easy way like that to check convexity for multi-variable functions? For example let's consider the function $f(x_1,x_2)=\frac{1}{3}x_1^3-4x_1+\frac{1}{3}x_2^3-16x_2$
Easy way to check if multi-variable function is convex
-
0I think you are looking for a positive definite Hessian – 2017-02-12
-
0Hessian should be positive definite for every x you mean? – 2017-02-12
-
0$$f (x_1, 0) = \frac 13 x_1^3 - 4 x_1$$ is clearly non-convex. That was easy. In general, it is much, much harder. – 2017-02-13
-
0"Multivariable functions" is way too broad. Affine functions? Polynomial? What degrees? – 2017-02-13
1 Answers
When dealing with bivariate functions, one may be able to decide whether a given function is convex merely by plotting it. For example, the function you give is clearly non-convex:
which is unsurprising, as the function is defined by a bivariate polynomial of degree $3$, which is odd.
When dealing with more general multivariate polynomial functions... it's complicated:
- Amir Ali Ahmadi, Alex Olshevsky, Pablo A. Parrilo, John N. Tsitsiklis, NP-hardness of Deciding Convexity of Quartic Polynomials and Related Problems, December 2010.
We show that unless P=NP, there exists no polynomial time (or even pseudo-polynomial time) algorithm that can decide whether a multivariate polynomial of degree four (or higher even degree) is globally convex. This solves a problem that has been open since 1992 when N. Z. Shor asked for the complexity of deciding convexity for quartic polynomials. We also prove that deciding strict convexity, strong convexity, quasiconvexity, and pseudoconvexity of polynomials of even degree four or higher is strongly NP-hard. By contrast, we show that quasiconvexity and pseudoconvexity of odd degree polynomials can be decided in polynomial time.
-
0In case you're wondering, the plot above was generated using [Grapher](https://en.wikipedia.org/wiki/Grapher). – 2017-02-13
