What is the exterior normal to the boundary of a Riemannian manifold? Let $(M,g)$ be a Riemannian manifold with boundary $\partial M$. Let $p \in \partial M$ and in local coordinates $(x_1,\ldots,x_n)$ near $p = (0,\ldots,0)$ the manifold $M$ is given by $\{x_n \geqslant 0\}$. What is the exterior normal to $M$ at point $p$? Is it $\bigl(-\frac{\partial}{\partial x_n}\bigr)$? Or it is a vector in the orthogonal complement to the span of $\frac{\partial}{\partial x_1}$, $\ldots$, $\frac{\partial}{\partial x_{n-1}}$ with respect to the metric $g$?
 A: I would guess it is a (unit ?) vector orthogonal to $\frac{\partial}{\partial x_j}$, $j<n$ such that its scalar product with $\frac{\partial}{\partial x_n}$ is negative. 
The other definition you proposed ($-\frac{\partial}{\partial x_n}$) would depend on the coordinates.
A: Giving explicit expressions to what was said in the first answer: If you have a Riemannian manifold $M^n$ with boundary, take any local embedding at the boundary into euclidean space $\mathbb{R}^{n+1}$. Then the outward pointing normal vector $\nu_g$ with respect to the metric $g$ can be optained by the euclidean outward pointing normal vector $\nu$ with the following formula:
$$\nu_{g,i}=\frac{g^{ij}\nu_j}{(\nu_k g^{kl}\nu_l)^{1/2}}$$
Using the inverse of the metric tensor (which itself is symmetric and positive definite) at the boundary, in other notation: 
$$\nu_g=\frac{g^{-1}\cdot\nu}{(\nu^T\cdot g^{-1}\cdot \nu)^{1/2}}$$
Note that it is unital, $|\nu_g|_g=1$, that is is $g$-orthogonal to the boundary. (Let $E$ be any vector in $T\partial M$, then $<E,\nu_g>_g=\frac{1}{(\nu^T\cdot g^{-1}\cdot \nu)^{1/2}}\cdot E^T\cdot g \cdot g^{-1}\cdot\nu=0$, by the fact that $\nu$ is normal w.r.t euclidean metric.) Also, it is outward-pointing, that is into the same Halfspace as $\nu$:
$$<\nu_g,\nu>_{\text{euclidean}}\;=\sqrt{\nu^T\cdot g^{-1}\nu}\quad>0$$ Thus it satisfies all three conditions for the outward pointing normal vector. In your question, $\nu=-e_n$ and therefore $\nu_{g,i}=-\frac{g^{in}}{\sqrt{g^{nn}}}$. Pull this back and use the metric on 1-forms to rewrite: $$\nu_g(p)=-\frac{<\operatorname{d}\!x^i,\operatorname{d}\!x^n>\cdot\frac{\partial}{\partial x_i}}{\sqrt{<\operatorname{d}\!x^n,\operatorname{d}\!x^n>}}$$
