# How to check whether a complex multivariable function is convex?

Given a convex function $f : \mathbb R^2 \to \mathbb R$ and real numbers $a$ and $b$, I want to check whether the following function $g : \mathbb R^2 \to \mathbb R$ is convex.

First, I think I should use the lemma below:

So I start to write down g(αx1 + (1-α)y1 , αx2+(1-α)y2)

what I get is like this:

Then I get stuck, the function I get is just too complex and I don't know how to do next. Did I do it in the wrong way? Can anyone give me some hints?

• use the fact that the sum of convex function is also convex – Hamza Dec 7 '16 at 19:24
• Is the sum of two convex functions convex? – Doug M Dec 7 '16 at 19:24
• yes of course !!! en.wikipedia.org/wiki/Convex_function#Convex_function_calculus – Hamza Dec 7 '16 at 19:28
• I only know that f(x) is convex if f(x) = c1f1(x) + c2f1(x) and f1(x), f2(x) are convex and c1+c2 = 1 – Parting Dec 7 '16 at 19:33
• @Chen: that is in general not true: Consider $x^2 - 2y^2$ for $(x,y)\in\mathbb R^2$. – user251257 Dec 7 '16 at 19:46

$$g(x,y)=a(x,y)+b(x,y)+c(x,y)$$ where $$a(x,y)= 5(x^2+y^2+xy)=\frac{5x^2}{4}+5 \left(\frac{x}{4}+y \right)^2=a_1(x,y)+a_2(x,y)\\ b(x,y)=f(x-y,ax+by)=f(A(x,y)) \textrm { where } A=\left(\begin{matrix}1 &-1\\ a &b \end{matrix} \right) \\ c(x,y)=\max\{|x-y|,2y-x\}=\max\{c_1(x,y),c_2(x,y)\}$$ we have $a_1$ is convex ($x^p$ is convex if $p\geq 1$), and $a_2$ is a composite of convex ($x \mapsto x^2$) and linear function ($x\mapsto x/4+y$), so convex :

if $f$ is convex and $g$ is affine then $f \circ g$ is convex : \begin{eqnarray*} f(g(\alpha x+ (1-\alpha)y))&=& f(\alpha g(x)+ (1-\alpha)g(y))\\ &\leq & \alpha f(g(x))+(1-\alpha)f(g(y)) \end{eqnarray*}

so $a$ is convex.

The same argument works for $b$, so $b$ is convex too.

Finally, the maximum of two convex function is also convex, which proves that $c$ is convex.

We conclude that $g$ is convex.

• Is there any requirement that matrix A need to satisfy? – Parting Dec 7 '16 at 21:12
• no for all matrix $A$ because the important thing is that $A$ is linear. – Hamza Dec 7 '16 at 22:37

Hints:

1. Sum of convex functions are convex.
2. Non-negative multiple of a convex function is convex.
3. Composition of a convex function and an affine function is convex.
4. Maximum of convex functions is convex.