# Existence of orthonormal frame

Let $M$ be a surface with Riemannian metric $g$. Recall that an orthonormal framing of $M$ is an ordered pair of vector fields $(E_1,E_2)$ such that $g(E_i,E_j)=\delta_{ij}$. Prove that an orthonormal framing exists iff $M$ is orientable and $M$ admits a nowhere vanishing vector field $X$.

Remark: It's obvious in $\mathbb{R}^3$, but how to formally justify it? The definition for orientabily: $M$ is orientable if there exists an atlas $(u_{\alpha},M_{\alpha})_{\alpha}$ such that $\mathrm{det}(\mathrm{d}(u_{\beta}\circ u_{\alpha}^{-1}))>0$, for each $(\alpha,\beta)$ such that $M_{\alpha} \cap M_{\beta} \neq \Phi$

-

Assume $M$ is orientable and admits a nowhere vanishing vector field $X$. Define $E_1 = \frac{X}{|X|}$. Since $M$ is two dimensional, at each $p \in M$, there are only two choices of tangent vectors that are orthogonal to $(E_1)_p$ and of length $1$. The orientability will help you choose one consistently. Fix an oriented atlas. Take a local oriented coordinate system around $p$ with coordinates $(x_1, x_2)$. First, show that you can solve the problem locally, with the correct orientation. That is, show explicitly that you can define $E_2$ in a neighborhood of $p$, such that $E_2$ is of length 1, orthogonal to $E_1$ and that $(E_1, E_2)$ are positively oriented. Then, show that given two intersecting oriented coordinate system neighborhoods, your definition agrees on the intersection (because the choice of $(E_1, E_2)$ to be positively oriented resolves the sign ambiguity).
For the other direction, given a framing $E_i$, take a coordinate neighborhood $U$ around $p \in M$ with coordinates $(x_1, x_2)$, represent $E_i = e^j_i \frac{\partial}{\partial x^j}$ and check whether $\det (e_i^j) > 0$ (whether the coordinate system $x^i$ "thinks" that $E_i$ are positively oriented). If not, replace $(x_1, x_2)$ with $(x_2, x_1)$. This gives you an atlas. Check that this atlas is consistently oriented.