0
$\begingroup$

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) $$

  • 0
    Yes, it is correct, but you need to fix parenthesis there, it is not $(1-\lambda x)$ but $(1-\lambda)x$. $\lambda$ ranges between zero and one. Also it only makes sense if the domain itself is convex2017-02-20
  • 0
    @laflaca thanks for pointing the error out. I corrected it. Please explain what you mean by domain being convex? I haven't heard of this before. many thanks.2017-02-20

1 Answers 1

0

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

  • 0
    So when you say "domain is convex", you mean both x and y are coming from convex sets? Sorry for being naive here, not a very mathematical guy here.2017-02-20
  • 0
    @PPGoodMan I mean the domain of the function is a convex set, just as defined above. Pick any two points of the domain, the segment joining them must be contained in the domain, that's all. Check out the link, there are some nice pictures ilustraiting it2017-02-20