Hessian: $\dfrac{\partial^2f(\mathbf{x})}{\partial\mathbf{x}\partial\mathbf{x}^\top}$ or $\dfrac{\partial^2f(\mathbf{x})}{\partial\mathbf{x}^2}$?

58 Views Asked by At

I come across two definitions for the Hessian matrix

$$ \begin{align} \mathbf{H} = \dfrac{\partial^2f(\mathbf{x})}{\partial\mathbf{x}\partial\mathbf{x}^\top} \tag{1} \end{align} $$

and

$$ \begin{align} \mathbf{H} = \dfrac{\partial^2f(\mathbf{x})}{\partial\mathbf{x}^2} \tag{2} \end{align} $$

I suppose both notations follow the denominator layout. On the one hand, I am used to (1), which matches what I was expecting to. On the other hand, I am unsure about what does the author exactly mean by $\partial\mathbf{x}^2$ in (2). Any help is welcome.