What is the hessian of l2 norm squared?

3.3k Views Asked by At

What is the hessian of l2 norm squared? e.g. if I have a $f(x) = \|x\|_2^2$, that is to solve for $\dfrac{\partial x}{\partial x_i, \partial_j}$.

1

There are 1 best solutions below

0
On BEST ANSWER

This might be easier if we first rewrite the squared norm as a sum:

$$f(\vec{x}) = \sum_i x_i^2$$

It is pretty clear that $\frac{d}{dx_i}f(\vec{x}) = 2x_i$. We can then see that $\frac{d^2}{dx_idy_i} = \begin{cases}2&\:&\mathrm{if}&i = j\\0&&\mathrm{if}& i \neq j\end{cases}$.

So, the Hessian is just $2I$.