# Fundamental theorem of Riemannian geometry

The fundamental theorem of Riemannian geometry states that on any Riemannian manifold (or pseudo-Riemannian manifold) there is a unique affine connection that is torsion-free and metric-compatible, called the Levi-Civita connection or (pseudo-)Riemannian connection of the given metric. Because it is canonically defined by such properties, this connection is often automatically used when given a metric.

## Statement

The theorem can be stated as follows:
   Fundamental theorem of Riemannian Geometry. Let (M, g) be a Riemannian manifold (or pseudo-Riemannian manifold). Then there is a unique connection ∇ which satisfies the following conditions:
   * for any vector fields X, Y, and Z we have $X{\bigg(Y,Z){\big )}=g(\nabla _{X}Y,Z)+g(Y,\nabla _{X}Z),$ where X(g(Y, Z)) denotes the derivative of the function g(Y, Z) along vector field X.
   * for any vector fields X, Y, $\nabla _{X}Y-\nabla _{Y}X=[X,Y],$ where [X, Y] denotes the Lie bracket of X and Y.
The first condition is called metric-compatibility of ∇. It may be equivalently expressed by saying that, given any curve in M, the inner product of any two ∇–parallel vector fields along the curve is constant. It may also be equivalently phrased as saying that the metric tensor is preserved by parallel transport, which is to say that the metric is parallel when considering the natural extension of ∇ to act on (0,2)-tensor fields: ∇g = 0. It is further equivalent to require that the connection is induced by a principal bundle connection on the orthonormal frame bundle.
The second condition is sometimes called symmetry of ∇. It expresses the condition that the torsion of ∇ is zero, and as such is also called torsion-freeness. There are alternative characterizations.
An extension of the fundamental theorem states that given a pseudo-Riemannian manifold there is a unique connection preserving the metric tensor, with any given vector-valued 2-form as its torsion. The difference between an arbitrary connection (with torsion) and the corresponding Levi-Civita connection is the contorsion tensor.
The fundamental theorem asserts both existence and uniqueness of a certain connection, which is called the Levi-Civita connection or (pseudo-)Riemannian connection. However, the existence result is extremely direct, as the connection in question may be explicitly defined by either the second Christoffel identity or Koszul formula as obtained in the proofs below. This explicit definition expresses the Levi-Civita connection in terms of the metric and its first derivatives. As such, if the metric is k-times continuously differentiable, then the Levi-Civita connection is (k − 1)-times continuously differentiable.
The Levi-Civita connection can also be characterized in other ways, for instance via the Palatini variation of the Einstein–Hilbert action.

## Proof

The proof of the theorem can be presented in various ways. Here the proof is first given in the language of coordinates and Christoffel symbols, and then in the coordinate-free language of covariant derivatives. Regardless of the presentation, the idea is to use the metric-compatibility and torsion-freeness conditions to obtain a direct formula for any connection that is both metric-compatible and torsion-free. This establishes the uniqueness claim in the fundamental theorem. To establish the existence claim, it must be directly checked that the formula obtained does define a connection as desired.

### Local coordinates

Here the Einstein summation convention will be used, which is to say that an index repeated as both subscript and superscript is being summed over all values. Let m denote the dimension of M. Recall that, relative to a local chart, a connection is given by m$^3$ smooth functions $\left\{\Gamma _{ij}^{l}\right\},$ with $(\nabla _{X}Y)^{i}=X^{j}\partial _{j}Y^{i}+X^{j}Y^{k}\Gamma _{jk}^{i}$ for any vector fields X and Y. Torsion-freeness of the connection refers to the condition that ∇$_X$Y − ∇$_Y$ X = [X, Y] for arbitrary X and Y. Written in terms of local coordinates, this is equivalent to $0=X^{j}Y^{k}(\Gamma _{jk}^{i}-\Gamma _{kj}^{i}),$ which by arbitrariness of X and Y is equivalent to the condition Γ$^i$ $_{jk}$ = Γ$^i$ $_{kj}$. Similarly, the condition of metric-compatibility is equivalent to the condition $\partial _{k}g_{ij}=\Gamma _{ki}^{l}g_{lj}+\Gamma _{kj}^{l}g_{il}.$ In this way, it is seen that the conditions of torsion-freeness and metric-compatibility can be viewed as a linear system of equations for the connection, in which the coefficients and 'right-hand side' of the system are given by the metric and its first derivative. The fundamental theorem of Riemannian geometry can be viewed as saying that this linear system has a unique solution. This is seen via the following computation: ${\begin{aligned}\partial _{i}g_{jl}+\partial _{j}g_{il}-\partial _{l}g_{ij}&=\left(\Gamma _{ij}^{p}g_{pl}+\Gamma _{il}^{p}g_{jp}\right)+\left(\Gamma _{ji}^{p}g_{pl}+\Gamma _{jl}^{p}g_{ip}\right)-\left(\Gamma _{li}^{p}g_{pj}+\Gamma _{lj}^{p}g_{ip}\right)\\&=2\Gamma _{ij}^{p}g_{pl}\end{aligned}}$ in which the metric-compatibility condition is used three times for the first equality and the torsion-free condition is used three times for the second equality. The resulting formula is sometimes known as the first Christoffel identity. It can be contracted with the inverse of the metric, g$^{kl}$, to find the second Christoffel identity: $\Gamma _{ij}^{k}={\tfrac {1}{2}}g^{kl}\left(\partial _{i}g_{jl}+\partial _{j}g_{il}-\partial _{l}g_{ij}\right).$ This proves the uniqueness of a torsion-free and metric-compatible condition; that is, any such connection must be given by the above formula. To prove the existence, it must be checked that the above formula defines a connection that is torsion-free and metric-compatible. This can be done directly.

### Invariant formulation

The above proof can also be expressed in terms of vector fields. Torsion-freeness refers to the condition that $\nabla _{X}Y-\nabla _{Y}X=[X,Y],$ and metric-compatibility refers to the condition that $X\left(g(Y,Z)\right)=g(\nabla _{X}Y,Z)+g(Y,\nabla _{X}Z),$ where X, Y, and Z are arbitrary vector fields. The computation previously done in local coordinates can be written as ${\begin{aligned}X\left(g(Y,Z)\right)&+Y\left(g(X,Z)\right)-Z\left(g(X,Y)\right)\\&={\Bigg(\nabla _{X}Y,Z)+g(Y,\nabla _{X}Z){\Big )}+{\Bigg(\nabla _{Y}X,Z)+g(X,\nabla _{Y}Z){\Big )}-{\Bigg(\nabla _{Z}X,Y)+g(X,\nabla _{Z}Y){\Big )}\\&=g(\nabla _{X}Y+\nabla _{Y}X,Z)+g(\nabla _{X}Z-\nabla _{Z}X,Y)+g(\nabla _{Y}Z-\nabla _{Z}Y,X)\\&=g(2\nabla _{X}Y+[Y,X],Z)+g([X,Z],Y)+g([Y,Z],X).\end{aligned}}$ This reduces immediately to the first Christoffel identity in the case that X, Y, and Z are coordinate vector fields. The equations displayed above can be rearranged to produce the Koszul formula or identity $2g(\nabla _{X}Y,Z)=X\left(g(Y,Z)\right)+Y\left(g(X,Z)\right)-Z\left(g(X,Y)\right)+g([X,Y],Z)-g([X,Z],Y)-g([Y,Z],X).$ This proves the uniqueness of a torsion-free and metric-compatible condition, since if g(W, Z) is equal to g(U, Z) for arbitrary Z, then W must equal U. This is a consequence of the non-degeneracy of the metric. In the local formulation above, this key property of the metric was implicitly used, in the same way, via the existence of g$^{kl}$. Furthermore, by the same reasoning, the Koszul formula can be used to define a vector field ∇$_X$Y when given X and Y, and it is routine to check that this defines a connection that is torsion-free and metric-compatible.