# Is the following a Convex Set?

Is the following set convex?

$$\{(x_1,x_2,x_3): x_3= |x_2|, x_1\leq 4\}$$

• It contains $(0,1,1)$ and $(0,-1,1)$, but not the point $(0,0,1)$ in between Commented Feb 5, 2017 at 23:03
• So because the point (0,0,1) is on the segment from (0,1,1) and (0,-1,1) you can evaluate it? With respect to lambda how could show this algebraically ? Commented Feb 5, 2017 at 23:07
• A convex set $\Omega$ has the property that if points $A$ and $B$ belong to $\Omega$, then every point on the line segment connecting $A$ and $B$ also belongs to $\Omega$. Can you visualize your set and just see visually that this is not the case? Commented Feb 5, 2017 at 23:09
• Honestly I could visualize the half plane and see the point but I was trying to approach the problem algebraically to look at it differently. and use lambda and 1-lambda to show it. Commented Feb 5, 2017 at 23:11
• I think you should keep it simple and just visualize the set, which makes it obvious that the set is not convex. Once you have visualized the set, it's easy to pick two points such as the ones that @HagenvonEitzen selected, then you can give an algebraic proof of non-convexity. Commented Feb 5, 2017 at 23:17

$$(0,1,1)\cdot k+(1-k)(0,-1,1)=(0,2k-1,1) \text{ for k \in [0,1]}$$
It should be in the set. But if you take $k=1/2$ then you will get the point $(0,0,1)$ which is not in the set and so it is not convex.
To say a set $S$ is convex means that if $u \in S$ and $v \in S$ then every point on the line segment joining $u$ and $v$ belongs to $S$.
Visually, it's clear that the line segment joining the points $u = (0,1,1)$ and $v = (0,-1,1)$ goes outside your set. To give an algebraic proof, just select a value of $\lambda$ such that $0 < \lambda < 1$ and $\lambda u + (1 - \lambda) v$ does not belong to your set. In this case, we can just pick $\lambda = 1/2$, so that $\lambda u + (1 - \lambda) v$ is the midpoint of $u$ and $v$. In other words: $$\lambda u + (1 - \lambda) v = (0,0,1),$$ which is a point that does not belong to your set.