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

$\endgroup$
2
  • $\begingroup$ 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 convex $\endgroup$ – la flaca Feb 20 '17 at 16:17
  • $\begingroup$ @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. $\endgroup$ – PPGoodMan Feb 20 '17 at 16:22
1
$\begingroup$

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

$\endgroup$
2
  • $\begingroup$ 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. $\endgroup$ – PPGoodMan Feb 20 '17 at 16:36
  • $\begingroup$ @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 it $\endgroup$ – la flaca Feb 20 '17 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.