Prove convexity of squared Euclidean norm I need to prove that the square of the Euclidean norm is convex, so:
$||\theta x+(1-\theta)y||^2\leq\theta||x||^2+(1-\theta)||y||^2$.
Can I use the triangular inequality (if yes, how?) or should I use something else?
 A: Notice that $f(x)=x^2$ is convex ($2=f''(x)>0$.) Thus it is convex, which means that it satisfies $f\big(\theta\|x\|+(1-\theta)\|y\|\big)\leq \theta f(\|x\|)+(1-\theta)f(\|y\|)$
for $\theta\in [0, 1]$.
A: The Hessian of the squared Euclidean norm is everywhere (edit: twice) the identity matrix, which is positive definite.
A: First we show  that any norm $|| \cdot ||: \mathbb{R}^n \to \mathbb{R_+}$ is a convex function:
It's clear the domain $\mathbb{R}^n$ is a convex set. Then by properties of the norm, $|| k x || =|k| || x ||$ and $||x+y|| \leq ||x|| + ||y|| $, for any $x,y \in \mathbb{R}^n$ and $0 \leq \theta \leq 1$,
$$|| \theta x + (1-\theta)y || \leq ||\theta x || + ||(1-\theta)y || = \theta || x || + (1-\theta)||y ||  $$
Now that $f(x)=x^2$ and $g(x)=||x||_2$ are both convex, and $f(x)=x^2$ is non-decreasing on $[0, \infty)$, the range of $g$ , therefore the composition $ f \circ g=||\cdot ||_2^2$ is convex.
A: For $\theta \in (0,1)$,
\begin{align*}
    \theta \| x\|^2 + (1-\theta)\|y\|^2 - \|\theta x + (1-\theta) y \|^2 &= \theta \| x\|^2 + (1-\theta)\|y\|^2  - \theta^2\|x\|-(1-\theta)^2\|y\|^2 \\ & \quad -2\theta (1-\theta) \langle x | y \rangle \\
     &\geq \theta(1-\theta)\|x\|^2 + \theta(1-\theta)\|y\|^2-2\theta (1-\theta)\|x\|\|y\|\\
     &= \theta (1-\theta) (\|x\|^2+\|y\|^2-2\|x\|\|y\|)\\
     &= \theta (1-\theta) (\|x\| - \|y\|)^2 \geq 0
\end{align*}
with equality iff $x = y$ because the first equality requires $x =  \alpha y$ for $\alpha \geq 0$ and the second equality requires $\|x\| = \|y\|$. 
