> For the complete documentation index, see [llms.txt](https://wiki.hanzheteng.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.hanzheteng.com/math/differential-geometry/tangent-space.md).

# Tangent Space

## Tangent Space

* There are several possible approaches to generalizing the notion of a directional derivative Df(x)\[η] = lim t→0  f(x+tη)−f(x) / t to a real-valued function f deﬁned on a manifold.
  * A ﬁrst possibility is to view η as a **derivation** at x.
  * A second, perhaps more intuitive approach to generalizing the directional derivative is to replace t → (x+tη) by **a smooth curve γ on M through x** (i.e., γ(0) = x).
* Let M be a manifold. A smooth mapping γ : R → M : t → γ(t) is termed **a curve in M**.
* A **tangent vector** ξx to a manifold M at a point x is a mapping from Fx(M) to R such that there exists a curve γ on M with γ(0) = x, satisfying ξxf = \`γ(0)f := d(f(γ(t))) / dt | t=0, for all f ∈ Fx(M).
  * Fx(M) denote the set of smooth real-valued functions defined on a neighborhood of x.
  * The point x is called the **foot** of the tangent vector ξx. We will often omit the subscript indicating the foot and simply write ξ for ξx.
  * Such a curve γ is said to **realize** the tangent vector ξx.
  * Given a tangent vector ξ to M at x, there are infinitely many curves γ that realize ξ.
* The **tangent space** to M at x, denoted by TxM, is the set of all tangent vectors to M at x.
  * This set admits a structure of vector space.
  * In the same way that the derivative of a real-valued function provides a local linear approximation of the function, the tangent space TxM provides **a local vector space** approximation of the manifold.
  * Later we can deﬁne mappings, called **retractions**, between M and TxM, which can be used to locally transform an optimization problem on the manifold M into an optimization problem on the more friendly vector space TxM.
* Example tangent spaces
  * The tangent space to St(p, n) at X: TxSt(p, n) = {Z ∈ R^n×p : X^T Z + Z^T X = 0}.
  * The tangent space to quotient spaces: vertical space and horizontal space.

## Riemannian Geometry

* We further need a notion of length that applies to tangent vectors.
* A manifold whose tangent spaces are endowed with a smoothly varying inner product is called a **Riemannian manifold**.
* The smoothly varying inner product is called the **Riemannian metric**.
* Strictly speaking, a Riemannian manifold is thus a couple (M, g), where M is a manifold and g is a Riemannian metric on M.
* A vector space endowed with an inner product is a particular Riemannian manifold called **Euclidean space**.
* The **length of a curve** γ : \[a, b] → M on a Riemannian manifold (M, g) is deﬁned by
  * $$L(γ)= \int\_a^b \sqrt{g(\dot{γ}(t),\dot{γ}(t))} dt$$.
* The **Riemannian distance** on a connected Riemannian manifold (M, g) is
  * $$\text{dist} : \mathcal{M} × \mathcal{M} → \mathbb{R} : \text{dist}(x, y) = \inf\_Γ L(γ)$$
  * where Γ is the set of all curves in M joining points x and y.
  * Metrics and Riemannian metrics should not be confused. A metric is an abstraction of the notion of distance, whereas a Riemannian metric is an inner product on tangent spaces. There is a link since any Riemannian metric induces a distance, the Riemannian distance.
* Given a smooth scalar ﬁeld f on a Riemannian manifold M, the **gradient** of f at x, denoted by grad f(x), is deﬁned as the unique element of TxM that satisﬁes
  * $$\langle \text{grad}f (x), ξ \rangle \_x = \text{D}f (x) \[ξ] , ∀ξ \in T\_xM.$$
* The gradient of a function has the following remarkable steepest-ascent properties:
  * The direction of grad f(x) is the steepest-ascent direction of f at x.
  * The norm of grad f(x) gives the steepest slope of f at x.
