14

Given $f\colon \mathbb{R}^n\rightarrow \mathbb{R}$ smooth and $\phi \in GL(n)$. What is the Hessian matrix $H_{f\circ \phi} = \left(\frac{\partial ^2 (f\circ \phi)}{\partial x_i\partial x_j}\right)_{ij}$?

user36047
  • 155

1 Answers1

14

Denote $H_g(x)$ the Hessian matrix of a function $g$. Denote $g=f\circ \phi$. By the chain rule, we have $$D(f\circ\phi)(x)\cdot h=D(f(\phi (x))\cdot D(\phi (x))\cdot h=D(f(\phi (x)))\cdot \phi (x)\cdot h$$ hence $D(g)(x)=D(f(\phi (x)))\cdot \phi (x)$. In particular, $$\partial_j g(x)=\sum_{k=1}^n\partial_kf(\phi (x))a_{kj},$$ where $a_{kj}$ is the $(k,j)$-th entry of $\phi (x)$.We can do the same, for a fixed $k$, for the map $x\mapsto \partial_kf(\phi (x))$. We get \begin{align} \partial_{ij}f(\phi (x))&=\sum_{k,l=1}^n(H_f(\phi (x)))_{lk}a_{li}a_{kj}\\ &=\sum_{k=1}^n(\phi(x)^t H_f(\phi (x)))_{ik}a_{kj}\\ &=(\phi(x)^tH_f(\phi (x))\phi (x))_{ij}. \end{align}

sunspots
  • 762
Davide Giraudo
  • 172,925
  • I think you are missing a term. If you see the picture in https://cs.stackexchange.com/questions/146526/finding-the-cost-of-hessian-vector-product-computation the result should be what you have plus the gradient of f times the "tensor hessian" of $\phi$. – Thomas Ahle Oct 03 '23 at 23:17
  • 1
    @ThomasAhle $\phi$ is linear. Maybe that makes that term disappear. – Luca T. Castrillón Nov 26 '23 at 21:19
  • If it still matters...this is correct, the term "disappears" given the linearity. In particular if the map is also orthogonal, one can proove that the laplacian is invariant under rotation – Erik Feb 08 '24 at 02:08