Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a function $f(x) = (\mathbf x ^ \top \mathbf x) ^ {p/2}$.

Its gradient is $\nabla f(x) = 2p (\mathbf x ^ \top \mathbf x) ^ {(p-2)/2} \mathbf x$

How do I compute its Hessian $\nabla^2f(x) $? Should I use product rule? Can someone show me how to do it or refer me to some resource?


share|cite|improve this question
The factor 2 in the gradient should not be there! – Fabian Feb 12 '12 at 9:49
Note also that $\nabla^2$ is conventionally used to denote the Laplacian $\Delta$. In a way $\Delta = \nabla \cdot \nabla$ whereas the Hessian is given by the dyadic product $\nabla \otimes \nabla$. – Fabian Feb 12 '12 at 10:00

Let's do it with indexes: $$ \frac{\partial^2}{\partial x_i \partial x_j} \left( x_k x_k \right)^{p/2} = \frac{\partial}{\partial x_i} \left\{ p \left( x_k x_k \right)^{p/2-1} x_j \right\} = p \left( x_k x_k \right)^{p/2-1} \delta_{i,j} - p(p-2) \left( x_k x_k \right)^{p/2-2} x_i x_j $$ Now rewriting this in coordinate free notations: $$ \nabla \otimes \nabla f(x) = p \left( x^\top x \right)^{p/2-1} \mathbb{I} - p(p-2) \left( x^\top x \right)^{p/2-2} x \otimes x^\top $$

share|cite|improve this answer
Thanks. That's very helpful. Is there any rule to derive this Hessian without expanding the vector to its elements? – SeeBees Feb 12 '12 at 6:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.