# Basic question about convexity

A convex function is defined as one that satisfies the following condition for $$p_1 + p_2 = 1$$.

$$f(p_1x_1 + p_2x_2) \leq p_1f(x_1) + p_2f(x_2),$$

Does this imply that for all $$\lambda \leq 1$$

$$f(\lambda x) \leq \lambda f(x)$$

I can imagine this is true but I can only show it for the case where $$f(0) = 0$$. Moreover, is the condition $$\lambda\leq 1$$ even necessary in the above statement? Essentially, I am looking for the most general statement one can make if $$f$$ is convex regarding $$f(\lambda x)$$.

EDIT: As pointed out by Michael, I should also add $$0\leq \lambda$$. My statement now is for $$f$$ convex such that $$f(0) = 0$$, and $$0\leq \lambda \leq 1$$ we have $$f(\lambda x) \leq \lambda f(x)$$. Is this the most general statement one can make?

• Consider $f(x)=e^x$ at $x=0$ for any $\lambda \in (0,1)$. – TM Gallagher Apr 14 at 17:28

## 2 Answers

It's wrong. Try $$f(x)=x^2$$ and $$\lambda=-1.$$

If $$0\leq \lambda\leq1$$, so take $$f(x)=e^x$$.

If also $$f(0)=0$$ it's true already.

$$\lambda f(x)+(1-\lambda)f(0)\geq f(\lambda x+(1-\lambda)0),$$ which gives, which you wish.

• Ah excellent point! If I restrict it to $0 \leq \lambda \leq 1$, is my statement then true? – user1936752 Apr 14 at 17:30
• @user1936752 If so, it's wrong for $f(x)=e^x$. We'll obtain $\lambda e^{(1-\lambda)x}\geq1,$ which is wrong. – Michael Rozenberg Apr 14 at 17:40
• @user1936752 I added something. See please. – Michael Rozenberg Apr 14 at 17:52

$$f(x)=x^2+1$$ (or even just $$f(x)=1$$) is convex but does not have your property.