
# Notes on Riemannian Geometry

Recently I have been studying differential geometry, including Riemannian geometry. When studying this subject, a lot of aha moments came up due to my previous (albeit informal) exposure to the geometric point-of-view of natural gradient method. I found that the argument from this point-of-view to be very elegant, which motivates me further to study geometry in depth. This writing is a collection of small notes (largely from Lee’s Introduction to Smooth Manifolds and Introduction to Riemannian Manifolds) that I find useful as a reference on this subject. Note that, this is by no means a completed article. I will update it as I study further.

## Manifolds

We are interested in generalizing the notion of Euclidean space into arbitrary smooth curved space, called smooth manifold. Intuitively speaking, a topological $n$-manifold $\M$ is a topological space that locally resembles $\R^n$. A smooth $n$-manifold is a topological $n$-manifold equipped with locally smooth map $\phi_p: \M \to \R^n$ around each point $p \in \M$, called the local coordinate chart.

Example 1 (Euclidean spaces). For each $n \in \mathbb{N}$, the Euclidean space $\R^n$ is a smooth $n$-manifold with a single chart $\phi := \text{Id}_{\R^n}$, the identity map, for all $p \in \M$. Thus, $\phi$ is a global coordinate chart.

//

Example 2 (Spaces of matrices). Let $\text{M}(m \times n, \R)$ denote the set of $m \times n$ matrices with real entries. We can identify it with $\R^{mn}$ and as before, this is a smooth $mn$-dimensional manifold. Some of its subsets, e.g. the general linear group $\text{GL}(n, \R)$ and the space of full rank matrices, are smooth manifolds.

//

Remark 1. We will drop $n$ when referring a smooth $n$-manifold from now on, for brevity sake. Furthermore, we will start to use the Einstein summation convention: repeated indexes above and below are implied to be summed, e.g. $v_i w^i := \sum_i v_i w^i$.

//

## Tangent vectors and covectors

At each point $p \in \M$, there exists a vector space $T_p \M$, called the tangent space of $p$. An element $v \in T_p \M$ is called the tangent vector. Let $f: \M \to \R$ be a smooth function. In local coordinate $\{x^1, \dots, x^n\}$ defined around $p$, the coordinate vectors $\{ \partial/\partial x^1, \dots, \partial/\partial x^n \}$ form a coordinate basis for $T_p \M$.

A tangent vector $v \in T_p \M$ can also be seen as a derivation, a linear map $C^\infty(\M) \to \R$ that follows Leibniz rule (product rule of derivative), i.e.

$v(fg) = f(p)vg + g(p)vf \enspace \enspace \forall f, g \in C^\infty(\M) \, .$

Thus, we can also see $T_p \M$ to be the set of all derivations of $C^\infty(\M)$ at $p$.

For each $p \in \M$ there also exists the dual space $T_p^* \M$ of $T_p \M$, called the cotangent space at $p$. Each element $\omega \in T_p^* \M$ is called the tangent covector, which is a linear functional $\omega: T_p \M \to \R$ acting on tangent vectors at $p$. Given the same local coordinate as above, the basis for the cotangent space at $p$ is called the dual coordinate basis and is given by $\{ dx^1, \dots, dx^n \}$, such that $dx^i(\partial/\partial x^j) = \delta^i_j$ the Kronecker delta. Note that, this implies that if $v := v^i \, \partial/\partial x^i$, then $dx^i(v) = v^i$.

Tangent vectors and covectors follow different transformation rules. We call an object with lower index, e.g. the components of tangent covector $\omega_i$ and the coordinate basis $\partial/\partial x^i =: \partial_i$, to be following the covariant transformation rule. Meanwhile an object with upper index, e.g. the components a tangent vector $v^i$ and the dual coordinate basis $dx^i$, to be following the contravariant transformation rule. These stem from how an object transform w.r.t. change of coordinate. Recall that a vector, when all the basis vectors are scaled up by a factor of $k$, the coefficients in its linear combination will be scaled by $1/k$, thus it is said that a vector transforms contra-variantly (the opposite way to the basis). Analogously, we can show that when we apply the same transformation to the dual basis, the covectors coefficients will be scaled by $k$, thus it transforms the same way to the basis (co-variantly).

The partial derivatives of a scalar field (real valued function) on $\M$ can be interpreted as the components of a covector field in a coordinate-independent way. Let $f$ be such scalar field. We define a covector field $df: \M \to T^* \M$, called the differential of $f$, by

$df_p(v) := vf \enspace \enspace \text{for} \, v \in T_p\M \, .$

Concretely, in smooth coordinates $\{ x^i \}$ around $p$, we can show that it can be written as

$df_p := \frac{\partial f}{\partial x^i} (p) \, dx^i \, \vert_p \, ,$

or as an equation between covector fields instead of covectors:

$df := \frac{\partial f}{\partial x^i} \, dx^i \, .$

The disjoint union of the tangent spaces at all points of $\M$ is called the tangent bundle of $\M$

$TM := \coprod_{p \in \M} T_p \M \, .$

Meanwhile, analogously for the cotangent spaces, we define the cotangent bundle of $\M$ as

$T^*M := \coprod_{p \in \M} T^*_p \M \, .$

If $\M$ and $\mathcal{N}$ are smooth manifolds and $F: \M \to \mathcal{N}$ is a smooth map, for each $p \in \M$ we define a map

$dF_p : T_p \M \to T_{F(p)} \mathcal{N} \, ,$

called the differential of $F$ at $p$, as follows. Given $v \in T_p \M$:

$dF_p (v)(f) := v(f \circ F) \, .$

Moreover, for any $v \in T_p \M$, we call $dF_p (v)$ the pushforward of $v$ by $F$ at $p$. It differs from the previous definition of differential in the sense that this map is a linear map between tangent spaces of two manifolds. Furthermore the differential of $F$ can be seen as the generalization of the total derivative in Euclidean spaces, in which $dF_p$ is represented by the Jacobian matrix.

## Vector fields

If $\M$ is a smooth $n$-manifold, a vector field on $\M$ is a continuous map $X: \M \to T\M$, written as $p \mapsto X_p$, such that $X_p \in T_p \M$ for each $p \in \M$. If $(U, (x^i))$ is any smooth chart for $\M$, we write the value of $X$ at any $p \in U \subset \M$ as

$X_p = X^i(p) \, \frac{\partial}{\partial x^i} \vert_p \, .$

This defines $n$ functions $X^i: U \to \R$, called the component functions of $X$. The restriction of $X$ to $U$ is a smooth vector field if and only if its component functions w.r.t. the chart are smooth.

Example 3 (Coordinate vector fields). If $(U, (x^i))$ is any smooth chart on $\M$, then $p \mapsto \partial/\partial x^i \vert_p$ is a vector field on $U$, called the i-th coordinate vector field. It is smooth as its component functions are constant. This vector fields defines a basis of the tangent space at each point.

//

Example 4 (Gradient). If $f \in C^\infty(\M)$ is a real-valued function on $\M$, then the gradient of $f$ is a vector field on $\M$. See the corresponding section below for more detail.

//

We denote $\mathfrak{X}(\M)$ to be the set of all smooth vector fields on $\M$. It is a vector space under pointwise addition and scalar multiplication, i.e. $(aX + bY)_p = aX_p + bY_p$. The zero element is the zero vector field, whose value is $0 \in T_p \M$ for all $p \in \M$. If $f \in C^\infty(\M)$ and $X \in \mathfrak{X}(\M)$, then we define $fX: \M \to T\M$ by $(fX)_p = f(p)X_p$. Note that this defines a multiplication of a vector field with a smooth real-valued function. Furthermore, if in addition, $g \in C^\infty(\M)$ and $Y \in \mathfrak{X}(\M)$, then $fX + gY$ is also a smooth vector field.

A local frame for $\M$ is an ordered $n$-tuple of vector fields $(E_1, \dots, E_n)$ defined on an open subset $U \subseteq M$ that is linearly independent and spans the tangent bundle, i.e. $(E_1 \vert_p, \dots, E_n \vert_p)$ form a basis for $T_p \M$ for each $p \in \M$. It is called a global frame if $U = M$, and a smooth frame if each $E_i$ is smooth.

If $X \in \mathfrak{X}(\M)$ and $f \in C^\infty(U)$, we define $Xf: U \to \R$ by $(Xf)(p) = X_p f$. $X$ also defines a map $C^\infty(\M) \to C^\infty(\M)$ by $f \mapsto Xf$ which is linear and Leibniz, thus it is a derivation. Moreover, derivations of $C^\infty(\M)$ can be identified with smooth vector fields, i.e. $D: C^\infty(\M) \to C^\infty(\M)$ is a derivation if and only if it is of the form $Df = Xf$ for some $X \in \mathfrak{X}(\M)$.

## Tensors

Let $\{ V_k \}$ and $U$ be real vector spaces. A map $F: V_1 \times \dots \times V_k \to U$ is said to be multilinear if it is linear as a function of each variable separately when the others are held fixed. That is, it is a generalization of the familiar linear and bilinear maps. Furthermore, we write the vector space of all multilinear maps $V_1 \times \dots \times V_k \to U$ as $\text{L}(V_1, \dots, V_k; U)$.

Example 5 (Multilinear functions). Some examples of familiar multilinear functions are

1. The dot product in $\R^n$ is a scalar-valued bilinear function of two vectors. E.g. for any $v, w \in \R^n$, the dot product between them is $v \cdot w := \sum_i^n v^i w^i$, which is linear on both $v$ and $w$.
2. The determinant is a real-valued multilinear function of $n$ vectors in $\R^n$.

//

Let $\{ W_l \}$ also be real vector spaces and suppose

\begin{align} F&: V_1 \times \dots \times V_k \to \R \\ G&: W_1 \times \dots \times W_l \to \R \end{align}

be multilinear maps. Define a function

\begin{align} F \otimes G &: V_1 \times \dots \times V_k \times W_1 \times \dots \times W_l \to \R \\ F \otimes G &(v_1, \dots, v_k, w_1, \dots, w_k) = F(v_1, \dots, v_k) G(w_1, \dots, w_l) \, . \end{align}

From the multilinearity of $F$ and $G$ it follows that $F \otimes G$ is also multilinear, and is called the tensor product of $F$ and $G$. I.e. tensors and tensor products are multilinear map with codomain in $\R$.

Example 6 (Tensor products of covectors). Let $V$ be a vector space and $\omega, \eta \in V^*$. Recall that they both a linear map from $V$ to $\R$. Therefore the tensor product between them is

\begin{align} \omega \otimes \eta &: V \times V \to \R \\ \omega \otimes \eta &(v_1, v_2) = \omega(v_1) \eta(v_2) \, . \end{align}

//

Example 7 (Tensor products of dual basis). Let $\epsilon^1, \epsilon^2$ be the standard dual basis for $(\R^2)^*$. Then, the tensor product $\epsilon^1 \otimes \epsilon^2: \R^2 \times \R^2 \to \R$ is the bilinear function defined by

$\epsilon^1 \otimes \epsilon^2(x, y) = \epsilon^1 \otimes \epsilon^2((w, x), (y, z)) := wz \, .$

//

We use the notation $V_1^* \otimes \dots \otimes V_k^*$ to denote the space $\text{L}(V_1, \dots, V_k; \R)$. Let $V$ be a finite-dimensional vector space. If $k \in \mathbb{N}$, a covariant $k$-tensor on $V$ is an element of the $k$-fold tensor product $V^* \otimes \dots \otimes V^*$, which is a real-valued multilinear function of $k$ elements of $V$ to $\R$. The number $k$ is called the rank of the tensor.

Analogously, we define a contravariant $k$-tensor on $V$ to be an element of the element of the $k$-fold tensor product $V \otimes \dots \otimes V$. We can mixed the two types of tensors together: For any $k, l \in \mathbb{N}$, we define a mixed tensor on $V$ of type $(k, l)$ to be the tensor product of $k$ such $V$ and $l$ such $V^*$.

## Riemannian metrics

So far we have no mechanism to measure the length of (tangent) vectors like we do in standard Euclidean geometry, where the length of a vector $v$ is measured in term of the dot product $\sqrt{v \cdot v}$. Thus, we would like to add a structure that enables us to do just that to our smooth manifold $\M$.

A Riemannian metric $g$ on $\M$ is a smooth symmetric covariant 2-tensor field on $\M$ that is positive definite at each point. Furthermore, for each $p \in \M$, $g_p$ defines an inner product on $T_p \M$, written $\inner{v, w}_g = g_p(v, w)$ for all $v, w \in T_p \M$. We call a tuple $(\M, g)$ to be a Riemannian manifold.

In any smooth local coordinate $\{x^i\}$, a Riemannian metric can be written as tensor product

$g = g_{ij} \, dx^i \otimes dx^j \, ,$

such that

$g(v, w) = g_{ij} \, dx^i \otimes dx^j(v, w) = g_{ij} \, dx^i(v) dx^j(w) = g_{ij} \, v^i w^j \, .$

That is we can represent $g$ as a symmetric, positive definite matrix $G$ taking two tangent vectors as its arguments: $\inner{v, w}_g = v^\text{T} G w$. Furthermore, we can define a norm w.r.t. $g$ to be $\norm{\cdot}_g := \inner{v, v}_g$ for any $v \in T_p \M$.

Example 8 (The Euclidean Metric). The simplest example of a Riemannian metric is the familiar Euclidean metric $g$ of $\R^n$ using the standard coordinate. It is defined by

$g = \delta_{ij} \, dx^i \otimes dx^j \, ,$

which, if applied to vectors $v, w \in T_p \R^n$, yields

$g_p(v, w) = \delta_{ij} \, v^i w^j = \sum_{i=1}^n v^i w^i = v \cdot w \, .$

Note that above, $\delta_{ij}$ is the Kronecker delta. Thus, the Euclidean metric can be represented by the $n \times n$ identity matrix.

//

## The tangent-cotangent isomorphism

Riemannian metrics also provide an isomorphism between the tangent and cotangent space: They allow us to convert vectors to covectors and vice versa. Let $(\M, g)$ be a Riemannian manifold. We define an isomorphism $\hat{g}: T_p \M \to T_p^* \M$ as follows. For each $p \in \M$ and each $v \in T_p \M$

$\hat{g}(v) = \inner{v, \cdot}_g \, .$

Notice that that $\hat{g}(v)$ is in $T_p^* \M$ as it is a linear functional over $T_p \M$. In any smooth coordinate $\{x^i\}$, by definition we can write $g = g_{ij} \, dx^i dx^j$. Thus we can write the isomorphism above as

$\hat{g}(v) = (g_{ij} \, v^i) \, dx^j =: v_i \, dx^j \, .$

Notice that we transform a contravariant component $v^i$ (denoted by the upper index component $i$) to a covariant component $v_i = g_{ij} \, v^i$ (denoted by the lower index component $j$), with the help of the metric tensor $g$. Because of this, we say that we obtain a covector from a tangent vector by lowering an index. Note that, we can also denote this by “flat” symbol in musical sheets: $\hat{g}(v) =: v^\flat$.

As Riemannian metric can be seen as a symmetric positive definite matrix, it has an inverse $g^{ij} := g_{ij}^{-1}$, which we denote by moving the index to the top, such that $g^{ij} \, g_{jk} = g_{kj} \, g^{ji} = \delta^i_k$. We can then define the inverse map of the above isomorphism as $\hat{g}^{-1}: T_p^* \M \to T_p \M$, where

$\hat{g}^{-1}(\omega) = (g^{ij} \, \omega_j) \, \frac{\partial}{\partial x^i} =: \omega^i \, \frac{\partial}{\partial x^i} \, ,$

for all $\omega \in T_p^* \M$. In correspondence with the previous operation, we are now looking at the components $\omega^i := g^{ij} \, \omega_j$, hence this operation is called raising an index, which we can also denote by “sharp” musical symbol: $\hat{g}^{-1}(\omega) =: \omega^\sharp$. Putting these two map together, we call the isomorphism between the tangent and cotangent space as the musical isomorphism.

Let $(\M, g)$ be a Riemannian manifold, and let $f: \M \to \R$ be a real-valued function over $\M$ (i.e. a scalar field on $\M)$. Recall that $df$ is a covector field, which in coordinates has partial derivatives of $f$ as its components. We define a vector field called the gradient of $f$ by

\begin{align} \grad{f} := (df)^\sharp = \hat{g}^{-1}(df) \, . \end{align}

For any $p \in \M$ and for any $v \in T_p \M$, the gradient satisfies

$\inner{\grad{f}, v}_g = vf \, .$

That is, for each $p \in \M$ and for any $v \in T_p \M$, $\grad{f}$ is a vector in $T_p \M$ such that the inner product with $v$ is the derivation of $f$ by $v$. Observe the compatibility of this definition with standard multi-variable calculus: the directional derivative of a function in the direction of a vector is the dot product of its gradient and that vector.

In any smooth coordinate $\{x^i\}$, $\grad{f}$ has the expression

$\grad{f} = g^{ij} \frac{\partial f}{\partial x^i} \frac{\partial}{\partial x^j} \, .$

Example 9 (Euclidean gradient). On $\R^n$ with the Euclidean metric with the standard coordinate, the gradient of $f: \R^n \to \R$ is

$\grad{f} = \delta^{ij} \, \frac{\partial f}{\partial x^i} \frac{\partial}{\partial x^j} = \sum_{i=1}^n \frac{\partial f}{\partial x^i} \frac{\partial}{\partial x^i} \, .$

Thus, again it is coincide with the definition we are familiar with form calculus.

//

All in all then, given a basis, in matrix notation, let $G$ be the matrix representation of $g$ and let $d$ be the matrix representation of $df$ (i.e. as a row vector containing all partial derivatives of $f$), then: $\grad{f} = G^{-1} d^\T$.

The interpretation of the gradient in Riemannian manifold is analogous to the one in Euclidean space: its direction is the direction of steepest ascent of $f$ and it is orthogonal to the level sets of $f$; and its length is the maximum directional derivative of $f$ in any direction.

## Connections

Let $(\M, g)$ be a Riemannian manifold and let $X, Y: \M \to T \M$ be a vector field. Applying the usual definition for directional derivative, the way we differentiate $X$ is by

$D_X \vert_p Y = \lim_{h \to 0} \frac{Y_{p+hX_p} - Y_p}{h} \, .$

However, we will have problems: We have not defined what this expression $p+hX_p$ means. Furthermore, as $Y_{p+hX_p}$ and $Y_p$ live in different vector spaces $T_{p+hX_p} \M$ and $T_p \M$, it does not make sense to subtract them, unless there is a natural isomorphism between each $T_p \M$ and $\M$ itself, as in Euclidean spaces. Hence, we need to add an additional structure, called connection that allows us to compare different tangent vectors from different tangent spaces of nearby points.

Specifically, we define the affine connection to be a connection in the tangent bundle of $\M$. Let $\mathfrak{X}(\M)$ be the space of vector fields on $\M$; $X, Y, Z \in \mathfrak{X}(\M)$; $f, g \in C^\infty(\M)$; and $a, b \in \R$. The affine connection is given by the map

\begin{align} \nabla: \mathfrak{X}(\M) \times \mathfrak{X}(\M) &\to \mathfrak{X}(\M) \\ (X, Y) &\mapsto \nabla_X Y \, , \end{align}

which satisfies the following properties

1. $C^\infty(\M)$-linearity in $X$, i.e., $\nabla_{fX+gY} Z = f \, \nabla_X Z + g \, \nabla_Y Z$
2. $\R$-linearity in Y, i.e., $\nabla_X (aY + bZ) = a \, \nabla_X Y + b \, \nabla_X Z$
3. Leibniz rule, i.e., $\nabla_X (fY) = (Xf) Y + f \, \nabla_X Y$ .

We call $\nabla_X Y$ the covariant derivative of $Y$ in the direction $X$. Note that the notation $Xf$ means $Xf(p) := D_{X_p} \vert_p f$ for all $p \in \M$, i.e. the directional derivative (it is a scalar field). Furthermore, notice that, covariant derivative and connection are the same thing and they are useful to generalize the notion of directional derivative to vector fields.

In any smooth local frame $(E_i)$ in $T \M$ on an open subset $U \in \M$, we can expand the vector field $\nabla_{E_i} E_j$ in terms of this frame

$\nabla_{E_i} E_j = \Gamma^k_{ij} E_k \,.$

The $n^3$ smooth functions $\Gamma^k_{ij}: U \to \R$ is called the connection coefficients or the Christoffel symbols of $\nabla$.

Example 10 (Covariant derivative in Euclidean spaces). Let $\R^n$ with the Euclidean metric be a Riemannian manifold. Then

$(\nabla_Y X)_p = \lim_{h \to 0} \frac{Y_{p+hX_p} - Y_p}{h} \enspace \enspace \forall p \in \M \, ,$

the usual directional derivative, is a covariant derivative.

//

There exists a unique affine connection for every Riemannian manifold $(\M, g)$ that satisfies

1. Symmetry, i.e., $\nabla_X Y - \nabla_Y X = [X, Y]$
2. Metric compatible, i.e., $Z \inner{X, Y}_g = \inner{\nabla_Z X, Y}_g + \inner{X, \nabla_Z Y}_g$,

for all $X, Y, Z \in \mathfrak{X}(\M)$. It is called the Levi-Civita connection. Note that, $[\cdot, \cdot]$ is the Lie bracket, defined by $[X, Y]f = X(Yf) - Y(Xf)$ for all $f \in C^\infty(\M)$. Note also that, the connection shown in Example 10 is the Levi-Civita connection for Euclidean spaces with the Euclidean metric.

## Riemannian Hessians

Let $(\M, g)$ be a Riemannian manifold equipped by the Levi-Civita connection $\nabla$. Given a scalar field $f: \M \to \R$ and any $X, Y \in \mathfrak{X}(\M)$, the Riemannian Hessian of $f$ is the covariant 2-tensor field $\text{Hess} \, f := \nabla^2 f := \nabla \nabla f$, defined by

$\text{Hess} \, f(X, Y) := X(Yf) - (\nabla_X Y)f = \inner{\nabla_X \, \grad{f}, Y}_g \, .$

Another way to define Riemannian Hessian is to treat is a linear map $T_p \M \to T_p \M$, defined by

$\text{Hess}_{v} \, f = \nabla_v \, \grad{f} \, ,$

for every $p \in \M$ and $v \in T_p \M$.

In any local coordinate $\{x^i\}$, it is defined by

$\text{Hess} \, f = f_{; i,j} \, dx^i \otimes dx^j := \left( \frac{\partial f}{\partial x^i \partial x^j} - \Gamma^k_{ij} \frac{\partial f}{\partial x^k} \right) \, dx^i \otimes dx^j \, .$

Example 11 (Euclidean Hessian). Let $\R^n$ be a Euclidean space with the Euclidean metric and standard Euclidean coordinate. We can show that connection coefficients of the Levi-Civita connection are all $0$. Thus the Hessian is defined by

$\text{Hess} \, f = \left( \frac{\partial f}{\partial x^i \partial x^j} \right) \, dx^i \otimes dx^j \, .$

It is the same Hessian as we have seen in calculus.

//

## Geodesics

Let $(\M, g)$ be a Riemannian manifold and let $\nabla$ be a connection on $T\M$. Given a smooth curve $\gamma: I \to \M$, a vector field along $\gamma$ is a smooth map $V: I \to T\M$ such that $V(t) \in T_{\gamma(t)}\M$ for every $t \in I$. We denote the space of all such vector fields $\mathfrak{X}(\gamma)$. A vector field $V$ along $\gamma$ is said to be extendible if there exists another vector field $\tilde{V}$ on a neighborhood of $\gamma(I)$ such that $V = \tilde{V} \circ \gamma$.

For each smooth curve $\gamma: I \to \M$, the connection determines a unique operator

$D_t: \mathfrak{X}(\gamma) \to \mathfrak{X}(\gamma) \, ,$

called the covariant derivative along $\gamma$, satisfying (i) linearity over $\R$, (ii) Leibniz rule, and (iii) if it $V \in \mathfrak{X}(\gamma)$ is extendible, then for all $\tilde{V}$ of $V$, we have that $D_t V(t) = \nabla_{\gamma’(t)} \tilde{V}$.

For every smooth curve $\gamma: I \to \M$, we define the acceleration of $\gamma$ to be the vector field $D_t \gamma’$ along $\gamma$. A smooth curve $\gamma$ is called a geodesic with respect to $\nabla$ if its acceleration is zero, i.e. $D_t \gamma’ = 0 \enspace \forall t \in I$. In term of smooth coordinates $\{x^i\}$, if we write $\gamma$ in term of its components $\gamma(t) := \{x^1(t), \dots, x^n(t) \}$, then it follows that $\gamma$ is a geodesic if and only if its component functions satisfy the following geodesic equation:

$\ddot{x}^k(t) + \dot{x}^i(t) \, \dot{x}^j(t) \, \Gamma^k_{ij}(x(t)) = 0 \, ,$

where we use $x(t)$ as an abbreviation for $\{x^1(t), \dots, x^n(t)\}$. Observe that, this gives us a hint that to compute a geodesic we need to solve a system of second-order ODE for the real-valued functions $x^1, \dots, x^n$.

Suppose $\gamma: [a, b] \to \M$ is a smooth curve segment with domain in the interval $[a, b]$. The length of $\gamma$ is

$L_g (\gamma) := \int_a^b \norm{\gamma'(t)}_g \, dt \, ,$

//

## References

1. Lee, John M. “Smooth manifolds.” Introduction to Smooth Manifolds. Springer, New York, NY, 2013. 1-31.
2. Lee, John M. Riemannian manifolds: an introduction to curvature. Vol. 176. Springer Science & Business Media, 2006.
3. Fels, Mark Eric. “An Introduction to Differential Geometry through Computation.” (2016).
4. Absil, P-A., Robert Mahony, and Rodolphe Sepulchre. Optimization algorithms on matrix manifolds. Princeton University Press, 2009.
5. Boumal, Nicolas. Optimization and estimation on manifolds. Diss. Catholic University of Louvain, Louvain-la-Neuve, Belgium, 2014.
6. Graphics: https://tex.stackexchange.com/questions/261408/sphere-tangent-to-plane.