Given $(M,g)$ Riemannian manifold, $f \in \mathcal{C}^{\infty}(M)$, I want to prove that the following holds (denoting by $D\,df $ the Hessian of the function $f$ and $\text{grad} f$ its gradient):

$$2D\,df (\text{grad} f,\text{grad} f) = \langle \text{grad} \,|\text{grad} f|^2, \text{grad} f\rangle$$

I tried doing this:

Start from $$D\,df (\text{grad} f,\text{grad} f) = D_{\text{grad} f}D_{\text{grad} f}(f)$$ Then since we can write in coordinates $\text{grad} f = g^{ij}\frac{\partial f}{\partial x^i} \, \frac{\partial f}{\partial x^j}$ then we have:

$$D_{\text{grad} f} \, (g^{ij}\frac{\partial f}{\partial x^i} D_{\frac{\partial }{\partial x^j}}f)$$

Now, since $f$ is a function, the covaiant derivative of $f$ along $\frac{\partial }{\partial x^j} $ is $ \frac{\partial f}{\partial x^j}$ so we get:

$$D_{g^{ab}\frac{\partial f}{\partial x^a}\frac{\partial f}{\partial x^b}}g^{ij}\frac{\partial f}{\partial x^i}\frac{\partial f}{\partial x^j}$$ getting $$g^{ab}\frac{\partial f}{\partial x^a}\left[\frac{\partial}{\partial x^b}\left(g^{ij}\frac{\partial f}{\partial x^i}\frac{\partial f}{\partial x^j}\right)\right]$$

In an analogous fashion, if I develop in coordinates this term $\langle \text{grad} f \,|\text{grad} f|^2, \text{grad} f\rangle$ I get: $$\langle \text{grad} \left( g^{i \alpha}\frac{\partial f}{\partial x^i}\frac{\partial f}{\partial x^\alpha} \right), \text{grad} f\rangle$$ and tracing with the metric we end up with:

$$g^{aA}\frac{\partial f}{\partial x^A}\left[\frac{\partial}{\partial x^a}\left(g^{i\alpha}\frac{\partial f}{\partial x^i}\frac{\partial f}{\partial x^\alpha}\right)\right]$$

First I ask if I am doing the computations correctly, and then why I do not get a $2$, I think I misssed something. Thanks!

  • 1
    $\begingroup$ On one hand $D$ is the derivative; on the other hand $Df$ means $\text{grad }f$. Your writing $Df=df$ is definitively not right. $\endgroup$ Commented Aug 13, 2022 at 18:28
  • $\begingroup$ So the mistake is related to the fact that with $Df$ I keep denoting $\text{grad} \, f$ in the first part, while when I write $Df = df$ I am basically equating a one form and $\text{grad} \, f$ which is a vector field instead? And how can I actually write $\langle D_{Df}\, Df , Df \rangle$ in coordinates? $\endgroup$ Commented Aug 13, 2022 at 20:01
  • $\begingroup$ Thanks! I think I understood and rephresed the question $\endgroup$ Commented Aug 13, 2022 at 23:11
  • $\begingroup$ I’m not sure you can define the hessian in this way: isn’t it $D_{grad(f)} df [grad f]$ with the usual pairing form-vector, giving you a squared term that, after, you derive to get your “2”? $\endgroup$
    – Son Gohan
    Commented Aug 13, 2022 at 23:37

1 Answer 1


The $\textit{Hessian}$ ($\nabla df$) of a differentiable function $f\,:\,M\to \mathbb{R}$ on a Riemannian manifold $M$ is

\begin{equation} \nabla df=\left(\frac{\partial^2f}{\partial x^k \partial x^a}-\Gamma^{m}_{ka}\frac{\partial f}{\partial x^m}\right)dx^k\otimes dx^a \tag{1} \end{equation}

It is easy enough to plug in $\mathrm{grad} f$ as the arguments (and multiply by 2)

\begin{equation} 2\nabla df(\mathrm{grad}f,\mathrm{grad}f)=2\left(\frac{\partial^2f}{\partial x^k \partial x^a}-\Gamma^{m}_{ka}\frac{\partial f}{\partial x^m}\right)\frac{\partial f}{\partial x^b}g^{ab}\frac{\partial f}{\partial x^v}g^{kv}\tag{2} \end{equation}

Now that we know what we are looking for we move to the right side of the equation

\begin{equation} |\mathrm{grad}f|^2=g^{ab}\frac{\partial f}{\partial x^a}\frac{\partial f}{\partial x^b} \tag{3} \end{equation}

\begin{equation} <\mathrm{grad}|\mathrm{grad}f|^2,\mathrm{grad}f>=g^{kv}\frac{\partial }{\partial x^k}\left(g^{ab}\frac{\partial f}{\partial x^a}\frac{\partial f}{\partial x^b}\right)\frac{\partial f}{\partial x^v} \tag{4} \end{equation}

Before we evaluate the tedious partial derivatives we remind the reader that an affine connection $\nabla$ is a Riemann connection if it preserves the metric $\nabla g=0$ or equivalently $\nabla_X g=0$ for all vector fields $X$ on $M$. We say that the metric is "compatible" with the connection. In component notation this means that the (partial) covariant derivative of the symmetric nonsingular (2,0) tensor $g^{ab}$ vanishes identically: \begin{equation} \nabla_k g^{ab}=\frac{\partial g^{ab}}{\partial x^k}+\Gamma^{a}_{mk}g^{mb}+\Gamma^{b}_{mk}g^{am}=0 \end{equation}

\begin{equation} \frac{\partial g^{ab}}{\partial x^k}=-\Gamma^{a}_{mk}g^{mb}-\Gamma^{b}_{mk}g^{am}\tag{5} \end{equation}

notice how $k$ is an index in the above expression, not a vector.

Now we are ready to expand the partial derivatives (and please remember the Leibniz (product) rule).

\begin{equation} \frac{\partial }{\partial x^k}\left(g^{ab}\frac{\partial f}{\partial x^a}\frac{\partial f}{\partial x^b}\right)=\frac{\partial g^{ab}}{\partial x^k}\frac{\partial f}{\partial x^a}\frac{\partial f}{\partial x^b}+ g^{ab}\frac{\partial^2 f}{\partial x^k \partial x^a}\frac{\partial f}{\partial x^b}+ g^{ab} \frac{\partial f}{\partial x^a}\frac{\partial^2 f}{\partial x^k \partial x^b}\tag{6} \end{equation}

Obviously the last two terms of $(6)$ are the same and after some dummy index renaming, using $(5)$ and the symmetric property of the metric we end up with

\begin{equation} \frac{\partial }{\partial x^k}\left(g^{ab}\frac{\partial f}{\partial x^a}\frac{\partial f}{\partial x^b}\right)=2g^{ab}\frac{\partial^2 f}{\partial x^k \partial x^a}\frac{\partial f}{\partial x^b}-2 g^{ab} \frac{\partial f}{\partial x^m}\frac{\partial f}{\partial x^b}\Gamma^m_{ak} \tag{7} \end{equation}

Putting this back in $(4)$ we have exactly $(2)$

  • $\begingroup$ Thank you for the time spent in typing it! May I ask you just to clarify the notation $g^{ab}_{|}k=0$ and how did you derive $(5)$? $\endgroup$ Commented Aug 16, 2022 at 6:40
  • 1
    $\begingroup$ $g^{ab}_{|k}$ is the covariant derivative. The covariant derivative of any symmetric nonsingular type (0,2) tensor field vanishes identically whenever that derivative is defined in terms of the connection whose coefficients are the Christoffel symbols defined with respect to the given tensor field. This can be shown by permuting the indices in the definition of the connection, but is a bit outside the scope of your current question. I have tried to simplify / clarify why $g^{ab}_{|k}=0$ in my answer above. $\endgroup$ Commented Aug 16, 2022 at 12:01
  • 1
    $\begingroup$ Also make sure you understand how the covariant derivative is used in index notation, for instance $$\nabla_X Y=X^k(\partial_kY^j+Y^h\Gamma^j_{hk})\partial_j=(X^kY^j_{|k})\partial_j=X^k\nabla_kY^j\partial_j$$ $\endgroup$ Commented Aug 16, 2022 at 12:16
  • $\begingroup$ Thank you very much! $\endgroup$ Commented Aug 18, 2022 at 7:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .