0

I want to compute the hessian of following function $$f(x) = (a^T x)^2$$

where $a,x \in \mathbb{R^n}$

Therefore H is given by: $$H = \nabla_a \nabla_a^T f = \nabla_a \nabla_a^T (a^T x)^T (a^T x ) $$.

How do I apply $\nabla_a^T$. Is this to be understood element wise, so I should end up with a row vector, in this case the jacobian and in the second step then with a column vector: $\nabla_a (2a^Txx^T) = 2xx^T $

So my heurstic way is to apply $\nabla^T$ on the column vector $a$ and in the second step apply $\nabla$ on the row vector $a^T$ ?

Sarah
  • 409

1 Answers1

0

For the first gradient, apply chain rule. Remember that gradients are column vectors. $$ \nabla f(x) = 2(a^\top x) a = 2aa^\top x $$ This is a linear mapping, so $$ Hf(x) = 2aa^\top. $$