# Equivalent conditions for a linear connection $\nabla$ to be compatible with Riemannian metric $g$

I am reading John M. Lee's Riemannian Manifolds: An Introduction to Curvature. In Lemma $5.2$, it is said that the following conditions are equivalent for a linear connection $\nabla$ on a Riemannian manifold:

(a) $\nabla$ is compatible with $g$. i.e., for any vector fields $X,Y,Z$, $$\nabla_X g(Y,Z) = g(\nabla_X Y,Z) + g(Y,\nabla_X Z)$$ (b) $\nabla g\equiv 0.$

How do we go from (a) to (b) (and (b) to (a))?

Hint: Use Lemma $4.6$ (ii) (i.e. the formula displayed here) to deduce that
$$(\nabla_X g)(Y, Z) = \nabla_Xg(Y, Z) - g(\nabla_XY, Z) - g(Y, \nabla_XZ).$$
As $g(Y, Z)$ is a smooth function, $\nabla_Xg(Y, Z) = Xg(Y, Z)$ so the metric compatibility condition can also be written as
$$Xg(Y, Z) = g(\nabla_XY, Z) + g(Y, \nabla_XZ).$$
• @MichaelAlbenese, please, I am a little confused. By definition, the connection is a map $\nabla \mathcal X(M) \times \mathcal X(M) \to X(M)$, where $\mathcal X(M)$ is the set of smooth vector fields on the manifold $M$. Can a smooth function be seen as a smooth vector field? Commented Jul 24, 2020 at 18:24
• @DaniloGregorin: A connection $\nabla$ on $TM$ can be viewed as such a map, but it induces a connection on all tensor bundles, in particular the trivial line bundle $M\times\mathbb{R}$. A smooth section of the trivial line bundle is nothing but a smooth function and for the induced connection we have $\nabla_Xf = Xf$. See Lemma 4.15 of Lee's Introduction to Riemannian Manifolds (second edition). Commented Jul 24, 2020 at 19:37