I have a function $f(x_1,x_2,\ldots,x_m):\mathbb{R}^m\rightarrow \mathbb{R}$ ($m\geq 2$) that is jointly convex in $x_i$ and $x_j$ for all $i$ and $j$.
Can I prove that this function is convex in $\mathbb{R}^m$?
Thanks for any help!
I have a function $f(x_1,x_2,\ldots,x_m):\mathbb{R}^m\rightarrow \mathbb{R}$ ($m\geq 2$) that is jointly convex in $x_i$ and $x_j$ for all $i$ and $j$.
Can I prove that this function is convex in $\mathbb{R}^m$?
Thanks for any help!
No. Think of the quadratic functions $f(x)=x^TAx$. Here, $f$ being convex is equivalent to $A$ being positive semidefinite. If the statement in your question were true, we'd be able to check positive semidefiniteness by considering a bunch of $2\times 2$ submatrices, without having to work with large minors as in Sylvester's criterion. That sounds too good to be true. A concrete example is $$f(x,y,z) = x^2+y^2+z^2 - c(x+y+z)^2,$$ where $\frac13 < c \le\frac12$. This is not convex because $$ f(t,t,t) = (3-9c)t^2 < 0 $$ but convex in any two variables, because $$ f(x,y,z_0) = (1-c)\left(x^2+y^2 - \frac{2c}{1-c}xy \right) + \text{linear term in }x,y $$ where $\frac{2c}{1-c}\le 2$.