Proving the convexity of $f(x,y) = x^2 + y^2 + |xy|$

58 Views Asked by At

I am trying to show that the function $f(x,y) = x^2 + y^2 + |xy|$ is convex. So I can show that both $x^2 + y^2 + xy$ and $x^2 + y^2 - xy$ are convex because their hessian is a diagonally dominant matrix with strictly positive entries on the diagonal. So this shows that my function is convex within all 4 quadrants. But I would like to prove my function is convex everywhere - not just within each quadrant. Any steps on how I can go about this?

2

There are 2 best solutions below

2
On BEST ANSWER

As you already know, both $f_1(x, y) = x^2 + y^2 + xy$ and $f_2(x, y) = x^2 + y^2 -xy$ are convex in $\Bbb R^2$. It follows that $$ f(x, y) = x^2+y^2+|xy| = \max(f_1(x, y), f_2(x, y)) $$ is also convex, since the maximum of two convex functions is convex.

More precisely, both $f_1$ and $f_2$ are strictly convex, which implies that $f$ is strictly convex.

enter image description here

0
On

Let $g(x,y)=x^2+y^2+xy$ for $x,y\ge 0$. The Hessian of $g$ is $\begin{pmatrix}2 & 1\\1 & 2\end{pmatrix}$. As an alternative to the approach of the OP we may compute the eigenvalues $1$ and $3$, which shows that the Hessian is positive definite and that $g$ is (strictly) convex.

Further, notice that $g$ is (strictly) increasing in the first coordinate, and also increasing in the second coordinate.

Now, notice that $f(x,y)=g(|x|,|y|)$. Fix a (non-trivial) convex combination $z=\alpha(x,y)+\beta(x',y')$. Since the absolute value $|x|$ is (strictly) convex and $g$ is (strictly) increasing in each coordinate, we have $$f(z)<g(\alpha|x|+\beta|x'|,\alpha|y|+\beta|y'|).$$ But now, since $g$ is (strictly) convex, this yields $$f(z)<\alpha g(|x|,|y|)+\beta g(|x'|,|y'|)=\alpha f(x,y)+\beta f(x',y').$$ This shows that $f$ is (strictly) convex.