Is the function convex?

34 Views Asked by At

Let's have the following function $f:\mathbb{R}^{2}\to\mathbb{R}$ defined by $|x+y|$, is it convex? We have $\lambda\in (0,1),x,y\in$ dom$(f)$, so $|\lambda x+(1-\lambda)y|\le \lambda |x| + (1-\lambda)|y|$. It means the function is convex according to the definition of a convex function. Is it correct?

2

There are 2 best solutions below

1
On BEST ANSWER

The function is convex, but your reasoning is a bit off (or at least a bit too terse, in my opinion). Remember, the elements of the domain of $f$ are pairs $(x,y) \in \mathbb R^2$. You need to show that for $(x,y), (z,w) \in \mathbb R^2$, you have $$f(\lambda \cdot (x,y) + (1-\lambda)\cdot (z,w)) \le \lambda f(x,y) + (1-\lambda)f(z,w).$$ In this case, we see \begin{align*} f(\lambda \cdot (x,y) + (1-\lambda)\cdot (z,w)) &= f(\lambda x + (1-\lambda)z, \lambda y + (1-\lambda)w) \\ &= \lvert \lambda x + (1-\lambda)z + \lambda y + (1-\lambda)w \rvert\\ &= \lvert \lambda(x+y) + (1-\lambda)(z+w)\rvert\\ &\le \lambda\lvert x+y \rvert + (1-\lambda) \lvert z+w \rvert \\ & = \lambda f(x,y) + (1-\lambda)f(z,w) \end{align*} which shows that $f$ is indeed convex.

0
On

Since $|tx+(1-t)y| \le t|x|+(1-t)|y|$ for $t \in [0,1]$ we see that $a(z)=|z|$ is convex.

The map $S((x,y)) = x+y$ is linear and a convex function composed with a linear one is convex.