Finding the hessian matrix of $f(x) = g^t(x)g(x)$

60 Views Asked by At

Let $f:\mathbb{R}^n \to \mathbb{R}$ defined by $f(x)=g^t(x)g(x)$, where $g:\mathbb{R}^n \to \mathbb{R}^m$ and $x \in \mathbb{R}^n$. Find the Hessian of $f$.

(The $^t$ means transpose)

My attempt:

The k-th element of gradient vector is:

$\displaystyle f(x) = g^t(x)g(x) = \sum_{i=1}^{m} g_i^2(x)$

$\displaystyle \frac{\partial}{\partial x_k} \sum_{i=1}^{m} g_i^2(x)= \sum_{i=1}^{m} \frac{\partial}{\partial x_k}g_i^2(x)=\sum_{i=1}^{m}2 g_{i}(x)\frac{\partial}{\partial x_k}g_i(x)$

Then $\nabla f(x) = 2g^t(x)Jg(x)$

The mk-th element of hessian matrix is:

$\displaystyle \dfrac{\partial}{\partial x_m}\sum_{i=1}^{m}2 g_{i}(x)\frac{\partial}{\partial x_k}g_i(x) = 2\sum_{i=1}^{m} \dfrac{\partial}{\partial x_m}g_{i}(x)\frac{\partial}{\partial x_k}g_i(x) = 2\sum_{i=1}^{m} \bigg(\dfrac{\partial}{\partial x_m}g_{i}(x)\bigg)\frac{\partial}{\partial x_k}g_i(x) +g_i(x)\bigg(\dfrac{\partial^2}{\partial x_m\partial x_k}g_i(x)\bigg)$

Is this correct?

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

(Just to give an answer)

Yes, this is correct.