Lie bracket of local orthonormal basis of vector fields Let $(M, g, \nabla)$ be a Riemannian manifold (with $\nabla$ the Levi-Civita connection of $g$), and let {$E_i$} be a local orthonormal basis of vector fields ($g(E_i, E_j) = \delta_{ij} )$.
What can I say about 
$[E_i, E_j]$ or equivalently (using the torsion-free property of Levi-Civita connection) about $\nabla_{E_i} E_j$? Is it true that $[E_i, E_j]$ vanishes?
 A: Given a local frame $(X_i)$, the Koszul formula gives an expression for $\nabla$ in terms of the derivatives of the metric coefficients and the commutation coefficients of the frame:
$$\begin{multline}2 g(\nabla_{X_i} X_j, X_k) = X_i \cdot g(X_j, X_k) + X_j \cdot g(X_i, X_k) - X_k \cdot (X_i, X_j) \\ + g([X_i, X_j], X_k) - g([X_i, X_k], X_j) - g([X_j, X_k], X_i)\end{multline} .$$
If $(E_i)$ is orthonormal, by definition $g(E_j, E_k) = \delta_{jk}$ and so the first three terms on the right-hand side vanish,
$$g(\nabla_{E_i} E_j, E_k) = \frac{1}{2}\big(g([E_i, E_j], E_k) - g([E_i, E_k], E_j) - g([E_j, E_k], E_i)\big) ,$$
and we can recover an simple explicit formula for the covariant derivative in terms of the metric and the Lie bracket alone:
$$\begin{align}\nabla_{E_i} E_j &= \sum_k g(\nabla_{E_i} E_j, E_k) E_k \\ &= \frac{1}{2}\sum_k \big(g([E_i, E_j], E_k) - g([E_i, E_k], E_j) - g([E_j, E_k], E_i)\big) E_k\end{align}$$
In particular, we can see that $g(\nabla_{E_i} E_j, E_k)$ is skew in $j, k$. (On the other hand, for coordinate frames $(X_i) = (\partial_{x^i})$, it is the other three terms that automatically vanish, giving the usual coordinate formula for Christoffel symbols.)
Now, if $[E_i, E_j] = 0$ for all $i, j$, then $\nabla_{E_i} E_j = 0$ for all $i, j$, and so substituting in the definition of curvature gives that the restriction of $g$ to the domain of the local frame is actually flat. Thus, for any (locally) nonflat metric $g$ one cannot choose a commuting, orthonormal frame $(E_i)$. On the other hand, as levap's answer shows, even for flat $g$ the brackets need not vanish.
A: The commutator doesn't have to vanish, even if the metric is flat. For example, the calculations here show that $[\hat{r}, \hat{\theta}] = \frac{1}{r} \hat{\theta}$ when 
$$ \hat{r} = \cos \theta \hat{x} + \sin \theta \hat{y},\\
\hat{\theta} = -\sin \theta \hat{x} + \cos \theta \hat{y} $$
is the local orthonormal frame associated to the polar coordinate system on $\mathbb{R}^2 \setminus \{ 0 \}$ (with the standard metric).
A: Actually it should work just by Schwartz's theorem on exchanging second derivatives in $\mathbb{R}^n$:
in fact, what you are doing is choosing local coordinates $x_{i}$ such that $E_i=\frac{\partial}{\partial x^i}$, and thus, around the point where you have defined your basis, you have $[E_i, E_j](f)=(\frac{\partial}{\partial x^i}\frac{\partial}{\partial x^j} - \frac{\partial}{\partial x^j}\frac{\partial}{\partial x^i})(f)=0$ for any $f\in C^{\infty}(M)$, due to Schwartz indeed. 
