# Euclidean space

The Euclidean space $ℝ^n$ is a simple model space, since it has curvature constantly zero everywhere; hence, nearly all operations simplify. The easiest way to generate an Euclidean space is to use a field, i.e. `AbstractNumbers`

, e.g. to create the $ℝ^n$ or $ℝ^{n\times n}$ you can simply type `M = ℝ^n`

or `ℝ^(n,n)`

, respectively.

`Manifolds.Euclidean`

— Type`Euclidean{T<:Tuple,𝔽} <: Manifold{𝔽}`

Euclidean vector space.

**Constructor**

`Euclidean(n)`

Generate the $n$-dimensional vector space $ℝ^n$.

```
Euclidean(n₁,n₂,...,nᵢ; field=ℝ)
𝔽^(n₁,n₂,...,nᵢ) = Euclidean(n₁,n₂,...,nᵢ; field=𝔽)
```

Generate the vector space of $k = n_1 \cdot n_2 \cdot … \cdot n_i$ values, i.e. the manifold $𝔽^{n_1, n_2, …, n_i}$, $𝔽\in\{ℝ,ℂ\}$, whose elements are interpreted as $n_1 × n_2 × … × n_i$ arrays. For $i=2$ we obtain a matrix space. The default `field=ℝ`

can also be set to `field=ℂ`

. The dimension of this space is $k \dim_ℝ 𝔽$, where $\dim_ℝ 𝔽$ is the `real_dimension`

of the field $𝔽$.

`Manifolds.EuclideanMetric`

— Type`EuclideanMetric <: RiemannianMetric`

A general type for any manifold that employs the Euclidean Metric, for example the `Euclidean`

manifold itself, or the `Sphere`

, where every tangent space (as a plane in the embedding) uses this metric (in the embedding).

Since the metric is independent of the field type, this metric is also used for the Hermitian metrics, i.e. metrics that are analogous to the `EuclideanMetric`

but where the field type of the manifold is `ℂ`

.

This metric is the default metric for example for the `Euclidean`

manifold.

`Base.exp`

— Method`exp(M::Euclidean, p, X)`

Compute the exponential map on the `Euclidean`

manifold `M`

from `p`

in direction `X`

, which in this case is just

\[\exp_p X = p + X.\]

`Base.log`

— Method`log(M::Euclidean, p, q)`

Compute the logarithmic map on the `Euclidean`

`M`

from `p`

to `q`

, which in this case is just

\[\log_p q = q-p.\]

`LinearAlgebra.norm`

— Method`norm(M::Euclidean, p, X)`

Compute the norm of a tangent vector `X`

at `p`

on the `Euclidean`

`M`

, i.e. since every tangent space can be identified with `M`

itself in this case, just the (Frobenius) norm of `X`

.

`Manifolds.flat`

— Method`flat(M::Euclidean, p, X)`

Transform a tangent vector `X`

into a cotangent. Since they can directly be identified in the `Euclidean`

case, this yields just the identity for a tangent vector `w`

in the tangent space of `p`

on `M`

.

`Manifolds.sharp`

— Method`sharp(M::Euclidean, p, ξ)`

Transform the cotangent vector `ξ`

at `p`

on the `Euclidean`

`M`

to a tangent vector `X`

. Since cotangent and tangent vectors can directly be identified in the `Euclidean`

case, this yields just the identity.

`ManifoldsBase.distance`

— Method`distance(M::Euclidean, p, q)`

Compute the Euclidean distance between two points on the `Euclidean`

manifold `M`

, i.e. for vectors it's just the norm of the difference, for matrices and higher order arrays, the matrix and ternsor Frobenius norm, respectively.

`ManifoldsBase.embed`

— Method`embed(M::Euclidean, p, X)`

Embed the tangent vector `X`

at point `p`

in `M`

. Equivalent to an identity map.

`ManifoldsBase.embed`

— Method`embed(M::Euclidean, p)`

Embed the point `p`

in `M`

. Equivalent to an identity map.

`ManifoldsBase.injectivity_radius`

— Method`injectivity_radius(M::Euclidean)`

Return the injectivity radius on the `Euclidean`

`M`

, which is $∞$.

`ManifoldsBase.inner`

— Method`inner(M::Euclidean, p, X, Y)`

Compute the inner product on the `Euclidean`

`M`

, which is just the inner product on the real-valued or complex valued vector space of arrays (or tensors) of size $n_1 × n_2 × … × n_i$, i.e.

\[g_p(X,Y) = \sum_{k ∈ I} \overline{X}_{k} Y_{k},\]

where $I$ is the set of vectors $k ∈ ℕ^i$, such that for all $1 ≤ j ≤ i$ it holds $1 ≤ k_j ≤ n_j$ and $\overline{\cdot}$ denotes the complex conjugate.

For the special case of $i ≤ 2$, i.e. matrices and vectors, this simplifies to

\[g_p(X,Y) = X^{\mathrm{H}}Y,\]

where $\cdot^{\mathrm{H}}$ denotes the Hermitian, i.e. complex conjugate transposed.

`ManifoldsBase.manifold_dimension`

— Method`manifold_dimension(M::Euclidean)`

Return the manifold dimension of the `Euclidean`

`M`

, i.e. the product of all array dimensions and the `real_dimension`

of the underlying number system.

`ManifoldsBase.project`

— Method`project(M::Euclidean, p, X)`

Project an arbitrary vector `X`

into the tangent space of a point `p`

on the `Euclidean`

`M`

, which is just the identity, since any tangent space of `M`

can be identified with all of `M`

.

`ManifoldsBase.project`

— Method`project(M::Euclidean, p)`

Project an arbitrary point `p`

onto the `Euclidean`

manifold `M`

, which is of course just the identity map.

`ManifoldsBase.representation_size`

— Method`representation_size(M::Euclidean)`

Return the array dimensions required to represent an element on the `Euclidean`

`M`

, i.e. the vector of all array dimensions.

`ManifoldsBase.vector_transport_to`

— Method`vector_transport_to(M::Euclidean, p, X, q, ::AbstractVectorTransportMethod)`

Transport the vector `X`

from the tangent space at `p`

to the tangent space at `q`

on the `Euclidean`

`M`

, which simplifies to the identity.

`ManifoldsBase.zero_tangent_vector`

— Method`zero_tangent_vector(M::Euclidean, x)`

Return the zero vector in the tangent space of `x`

on the `Euclidean`

`M`

, which here is just a zero filled array the same size as `x`

.