= Hessian of the Euclidean norm
{title2=$D^2|x|=|x|^{-1}(I-\hat x\hat x^T)$}
For a nonzero <vector> $x\in\mathbb R^n$, put $r=|x|$ and $\hat x=x/r$. The <gradient> of the <Euclidean norm> is $\nabla r=\hat x$. Differentiate its components to obtain the <Hessian matrix>
$$
\partial_i\partial_jr=\frac{\delta_{ij}}r-\frac{x_ix_j}{r^3},\qquad D^2r=\frac1r(I-\hat x\hat x^T).
$$
The factor $I-\hat x\hat x^T$ is the <orthogonal projection matrix> onto the <orthogonal complement> of the radial direction. Thus the <Hessian matrix> has <eigenvalue> zero radially and $1/r$ on each tangential direction, explaining the <convexity> of the <Euclidean norm>. Taking the <trace> gives $\Delta r=(n-1)/r$ away from the origin. The <Euclidean norm> is not <differentiable> at the origin: its restriction to any line is a nonzero multiple of the absolute value.
Back to article page