# Divergence and Levi-Civita connection

Let $M$ be a level set of a function in $\mathbb R^3$. Then the mean curvature of $M$ is given by the trace of the second fundamental form which is a divergence term involving the Levi-Civita connection. My question is, why is this the same as the "usual" divergence of the normal vector we learned in early multivariable calculus?

Write $n$ for the normal vector of $M$ in $\mathbb R^3$. Recall that the second fundamental form of $M$ is just $II(X,Y) = <D_Xn,Y>$, where $X, Y \in \mathbb R^3$ are tangent vectors to $M$. Here $< \cdot, \cdot>$ is the Euclidean inner product, and $D_X n$ represents the directional derivative of $n$ in the direction $X$. It is true that the second fundamental form is defined in terms of the Levi-Civita connection, but in $\mathbb R^3$ recall that $\nabla_X Y = D_X Y.$ Now, by the definition of divergence, we see that the mean curvature $H$ satisfies $$H = \mathbb{tr} II = \mathbb{div} \,n$$
To be a little bit more precise, the general definition of divergence is $$\mathbb{div} X = \mathbb{tr} (X \to \nabla X),$$ i.e. the trace of the map sending $X$ to $\nabla X$. Since $\nabla = D$ in $\mathbb R^3$, you can see that this agrees with the usual definition of divergence for a vector in $\mathbb R^3$.