Is $f(x_1,x_2)=x_1x_2$, with $x_1,x_2 \in \mathbb{R}_+$, a convex function?

1k Views Asked by At

Let $f(x_1,x_2)=x_1x_2$, with $x_1,x_2 \ge 0$. Is $f$ a convex function? Why?


Edit (in view of the comments below)

The Hessian matrix is $$H = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$$ which is indefinite (in general). In fact, $x H x'= 2x_1x_2$. However, $2x_1x_2\ge 0$ when $x_1,x_2\ge 0$, so that the Hessian is indeed positive semidefinite when $x_1,x_2\ge 0$. Therefore, is this sufficient to conclude that my $f$ is convex?

2

There are 2 best solutions below

1
On BEST ANSWER

The Hessian is indeed indefinite. A $2\times 2$ matrix $A$ is positive semidefinite if and only if $x'Ax\geq0$ for all $x\in\mathbb{R}\times\mathbb{R}$ and not only those in $\mathbb{R}_+\times\mathbb{R}_+$. Hence $f(x,y)=xy$ is not convex.

Indeed, you could try to see $f(1,0)=f(0,1)=0$ while $f(1/2,1/2)=1/4 > 0$.

3
On

Note that $$\begin{align}f(a(x_1,x_2)+(1-a)(y_1,y_2)) &=f(ax_1+(1-a)y_1 , ax_2+(1-a)y_2) \\ &=(ax_1+(1-a)y_1)(ax_2+(1-a)y_2) \\ &= a^2x_1x_2 +(1-a)^2y_1y_2 +a(1-a)(x_1y_2+x_2y_1) \\ & \leq ax_1x_2 +(1-a)y_1y_2 \\&=af(x_1 ,x_2)+ (1-a)f(y_1,y_2) \end{align}$$

Note that $0<a<1$