Show that $f(x)=||x||^p, p\ge 1$ is convex function on $\mathbb{R}^n$

This actually holds for any norm $||\cdot||$ on $\mathbb{R}^n$. Let $h:[0,\infty)\to[0,\infty)$ and $g:\mathbb{R}^n\to[0,\infty)$ be defined as

$$h(x):=x^p,\quad\quad g(x):=||x||.$$

where $p\geq 1$. From the triangle inequality we have that $g$ is convex. Also, it is easy to see that $h$ is non-decreasing and convex (since anywhere on $[0,\infty)$ the first and second derivatives of $h$ are non-negative).

So, for any $x,y\in\mathbb{R}^n$ and $\lambda\in [0,1]$,

$$f(\lambda x+(1-\lambda)y)=h(g(\lambda x+(1-\lambda)y))\leq h(\lambda g(x)+(1-\lambda)g(y))$$ $$\leq \lambda h(g(x))+(1-\lambda)h(g(y))=\lambda f(x)+(1-\lambda)f(y).$$

where the first inequality follows from convexity of $g$ and "increasingness" of $h$ and the second from convexity of $h$.

Edit: I just realised that the above was basically already stated in @GiuseppeNegro's comment. You can also generalise the above by substituting $\mathbb{R}^n$ with any convex normed vector space (over the reals).


Assuming that $\|x\|$ is the Euclidean norm, we may solve it by showing that $f(t) = \|x+ty\|^p$ is convex for every choice of $x$ and $y$ in $\mathbb{R}^n$. Express $f:\mathbb{R}\rightarrow \mathbb{R}$ as follows: $$ f(t) = (x+ty,x+ty)^{p/2}, $$ where $(\cdot,\cdot)$ is the Euclidean inner product. $f$ is differentiable. It is convex if $f''(t)\geq 0$ for all $t$. Differentiating once, $$ f'(t) = \frac{p}{2} (x+ty,x+ty)^{p/2-1} 2(x+ty,y) . $$ Differentiating twice, $$ f''(t) = p(p/2-1)(x+ty,x+ty)^{p/2-2}(x+ty,y)^2 + p (x+ty,x+ty)^{p/2-1} (y,y). $$ Recognize terms as square norms to various powers: $$ f''(t) = p(p/2-1)\|x+ty\|^{p-1} (x+ty,y)^2 + p\|x+ty\|^{p-1/2}\|y\|^2 \geq 0. $$