[Math] Checking whether a multivariable function is convex

convex-analysismultivariable-calculus

I have a simple question. I have a multi-variable function that I'm supposed to check whether convex or not. I know the definition for convexity as follows:

The function $f(x)$ is convex if:

$$ f(\lambda x_1 + (1 – \lambda x_2)) \leq \lambda f(x_1) + (1 – \lambda )f(x_2)$$

But this is for the single variable case. How do I generalize it for multi-variable case? The author of this question seems to be showing that the function $f(x,y)$ is convex if,

$$ f(\lambda x_1 + (1 – \lambda x_2),\lambda y_1 + (1 – \lambda y_2) ) \leq \lambda f(x_1,y_1) + (1 – \lambda )f(x_2,y_2) $$

But it hasn't been explicitly written anywhere. Is this correct?

Please help.

EDIT:
The two functions should be corrected as:
$$ f(\lambda x_1 + (1 – \lambda) x_2) \leq \lambda f(x_1) + (1 – \lambda )f(x_2)$$
$$ f(\lambda x_1 + (1 – \lambda) x_2,\lambda y_1 + (1 – \lambda) y_2 ) \leq \lambda f(x_1,y_1) + (1 – \lambda )f(x_2,y_2) $$

Best Answer

A set $X \subset \mathbb{R}^n$ is said to be convex if for any $\lambda \in [0,1]$ and any $x,y \in X$ the following holds: $$\lambda x+(1-\lambda)y \in X$$ This just means that if you pick any two points of the set, the segment joining them lies entirely in the set, and you need that hypothesis because otherwise you could not evaluate $f(\lambda x+(1-\lambda)y)$ for any $\lambda \in [0,1]$

More info in https://en.m.wikipedia.org/wiki/Convex_set

Related Question