# How can I prove this set is convex?

I'm given the problem:

The function $f:\mathbb R^n\to\mathbb R$ is convex, $a\in\mathbb R^n$, $b\in\mathbb R$: $$\mathcal B = \lbrace x\in\mathbb R^n : f(x) = 0,\langle a,x\rangle\leq b,x\geq 0\rbrace$$

It's easy to check that if $x_1,x_2 \in B$, then $(1-λ)x_1 + λx_2$ satisfies the last two requirements which are $\langle \alpha，x\rangle \le b$, and $x \ge 0$.

But when I tried to verify the first requirement I get stuck.

This is what I get:

$$f((1-\lambda)x_1+\lambda x_2)\leq (1-\lambda)f(x_1)+\lambda f(x_2)$$ Since $f(x_1) = f(x_2) = 0$, we have that: $$f((1-\lambda x_1)+\lambda x_2)\leq (1-\lambda) 0+\lambda 0 = 0$$

but I don't know how can I prove it is equal to $0$.

Can anyone give a hint?

• how is the $x \ge 0$ used in the proof as it does not make sense since $x \in \mathbb{R^n}$ – DeepSea Dec 11 '16 at 5:30
• @DeepSea It probably means that each element of the vector $x$ is non-negative. – Theoretical Economist Dec 11 '16 at 5:39
• Don't you think it is $f(x)>0$ instead of $f(x)=0$ ? In this way, the problem boils down to the fact that the intersection of convex sets (here 3 of them) is convex. – Jean Marie Dec 11 '16 at 5:56
• @JeanMarie I don't think convexity of $f$ guarantees that $\{ x:f(x)>0 \}$ is convex. It does guarantee that $\{ x:f(x)\leq 0 \}$ is convex, though. – Theoretical Economist Dec 11 '16 at 7:25
• @Theoretical Economist Oops, you are perfectly right. Waiting for Chen's reaction now... – Jean Marie Dec 11 '16 at 7:44

Suppose, for example, that $n=1$, $f(x)=(x-2)^2 - 4$, $a=1$ and $b=4$. Then,
$$\mathcal{B}=\{0,4 \}$$
• $0\lambda + 4(1-\lambda)$ is not in $\mathcal{B}$ for $\lambda \in (0,1)$, no? – Theoretical Economist Dec 11 '16 at 5:50
• Oh okay on $B$ – IAmNoOne Dec 11 '16 at 5:52