How is the covariant derivative of a metric, $\nabla g$, defined? The Levi-Chivita Connection $\nabla$ on a Reimannian manifold $(M,g)$, satisfies the equation $$ X(g(Y,Z))=g(\nabla_X Y,Z)+g(Y,\nabla_X Z) $$ where $X,Y,Z$ are vector fields on $M$.
It might be a ridiculous question, but I do not understand how we say that $\nabla g=0$, if the arguments of $\nabla$ are vector fields, and g can be viewed either as a 2-tensor or as a real-valued function $g_{X,Y}(p)=g|_p(X(p),Y(p))$.
 A: Once you have defined $\nabla$ on scalars (just the usual differential) and vector fields (via the Levi-Civita axioms), there is a unique extension to all tensors that satisfies the product rule $$\nabla(a \otimes b) = \nabla a \otimes b + a \otimes \nabla b$$ and commutes with contractions; and this extension is by definition the derivative operator we are using when we say $\nabla g = 0.$ To see that this equation is the same thing as the metric-compatibility equation you stated, we can apply the product rule to $\nabla_Z(g(X,Y))$ to find $$\nabla_X (g(Y,Z))=(\nabla_Xg)(Y,Z)+g(\nabla_XY,Z)+g(Y,\nabla_XZ).$$
Since $\nabla_X f=  Xf$ for scalars $f$, this can be rearranged to $$(\nabla g)(X,Y,Z) = (\nabla_X g)(Y,Z) = X(g(Y,Z)) - g(\nabla_XY,Z)-g(Y,\nabla_XZ);$$ so $\nabla g=  0$ is equivalent to the RHS vanishing for all $X,Y,Z.$
A: For a given Riemannian space (i.e. metric), one could in principle choose a covariant derivative with some freedom. Metric compatibility is one of the criteria for choosing a connection. In other words, it's by definition.
On the other hand, if you have assumed use of the Levi-Civita connection and the associated formulas for the Christoffel symbols, and are wondering why they imply that the covariant derivative $\tilde{\nabla}$ of the metric vanishes, one can see it in coordinates.
Recall that the covariant derivative of a (0,2) tensor (like the metric) is just the partial derivative, with two correction terms due to the non-Euclidean-ness of the space: 
$$ 
\tilde{\nabla}_v g_{\alpha\beta} = 
\frac{\partial g_{\alpha\beta}}{\partial x^v} - \Gamma_{v\alpha}^\eta g_{\eta \beta} - \Gamma_{v\beta}^\gamma g_{\alpha\gamma}
$$
where I'll use $ h_{ij,k}=\partial_kh_{ij} $ for brevity from now. 
Using $ \Gamma_{ij}^\ell = \frac{1}{2}g^{\ell k}(g_{\ell i,j} + g_{\ell j,i} - g_{ij,\ell}) $, we can see that 
\begin{align} 
\Gamma_{v\alpha}^\eta g_{\eta\beta} &= \frac{1}{2}g^{\eta k}g_{\eta\beta}(g_{kv,\alpha} + g_{k\alpha,v} - g_{v\alpha,k})  \\
&= \frac{1}{2}\delta_\beta^k(g_{kv,\alpha} + g_{k\alpha,v} - g_{v\alpha,k}) \\
&= \frac{1}{2}(g_{\beta v,\alpha} + g_{\beta\alpha,v} - g_{v\alpha,\beta})
\end{align}
and similarly that 
$$
\Gamma_{v\beta}^\gamma g_{\alpha\eta}
=
\frac{1}{2}(g_{\alpha v,\beta} + g_{\alpha\beta,v} - g_{v\beta,\alpha})
$$
Hence, we combine these to get
\begin{align}
\tilde{\nabla}_v g_{\alpha\beta}
&= g_{\alpha\beta,v} - \frac{1}{2}(g_{\beta v,\alpha} + g_{\beta\alpha,v} - g_{v\alpha,\beta})- \frac{1}{2}(g_{\alpha v,\beta} + g_{\alpha\beta,v} - g_{v\beta,\alpha})
= 0
\end{align}
using the fact that $g$ is symmetric, so $ \partial_c g_{ab} = \partial_c g_{ba} $.
In other words, for any point $x\in M$ on the manifold, every component of the covariant derivative (i.e. wrt every local coordinate direction) of every component of the metric vanishes, so we can reasonably say $ \tilde{\nabla} g = 0 $.
See also [1] & [2].
