Exploring curvature without coordinates

This part of documentation covers exploration of curvature of manifolds $\mathcal{M}$. There are multiple ways to describe curvature: Christoffel symbols, Riemann tensor, Ricci tensor, sectional curvature, and many other. They are usually considered only in coordinates but there is a way to demonstrate curvature in coordinate-free way.

Sectional curvature matrix

Curvature of a manifold can be explored using the sectional_curvature_matrix function. Note that Riemann tensor and sectional curvature are equivalently full specifications of curvature in a manifold, see [CE08], Eq. (1.12).

Let’s take the SymmetricPositiveDefinite manifold as our first example. It has nonpositive sectional curvature:

using Manifolds
using LinearAlgebra
M = SymmetricPositiveDefinite(3)
p = rand(M)
cm = sectional_curvature_matrix(M, p, DefaultOrthonormalBasis())
6×6 Matrix{Float64}:
  0.0          -0.25        -0.25         …  -3.27827e-21  -1.69744e-21
 -0.25          0.0         -0.125           -0.125        -3.6613e-22
 -0.25         -0.125        0.0             -0.125        -0.25
 -3.45578e-21  -0.25         1.08358e-23     -0.25          1.1524e-21
 -3.27827e-21  -0.125       -0.125            0.0          -0.25
 -1.69744e-21  -3.6613e-22  -0.25         …  -0.25          0.0

We can verify that the curvature is consistent with an approximation based on the Bertrand–Diguet–Puiseux theorem, which relies only on an ONB, exponential map and distance calculation:

cm_bdp = Manifolds.estimated_sectional_curvature_matrix(M, p, DefaultOrthonormalBasis(); r=1e-3, N_pts=100000)
println(norm(cm - cm_bdp))
0.005478929228492168

This approximation converges quite slowly with N_pts and is prone to numerical errors at low values of r and large values of N_pts.

You can also take the vectors from the basis and see what kind of planes they correspond to. It may be easier to see for the identity matrix as the base point.

p = [1.0 0.0 0.0; 0.0 1.0 0.0; 0.0 0.0 1.0]
V = get_vectors(M, p, get_basis(M, p, DefaultOrthonormalBasis()))
cm = sectional_curvature_matrix(M, p, DefaultOrthonormalBasis())
for X in V
    println(exp(M, p, X))
end
[2.718281828459045 0.0 0.0; 0.0 1.0 0.0; 0.0 0.0 1.0]
[1.260591836521356 0.7675231451261162 0.0; 0.7675231451261162 1.2605918365213566 0.0; 0.0 0.0 1.0]
[1.260591836521356 0.0 0.7675231451261162; 0.0 1.0 0.0; 0.7675231451261162 0.0 1.2605918365213566]
[1.0 0.0 0.0; 0.0 2.718281828459045 0.0; 0.0 0.0 1.0]
[1.0 0.0 0.0; 0.0 1.260591836521356 0.7675231451261162; 0.0 0.7675231451261162 1.2605918365213566]
[1.0 0.0 0.0; 0.0 1.0 0.0; 0.0 0.0 2.718281828459045]

The flat planes correspond to directions where the matrix changes independently. In other cases sectional curvature indicates hyperbolic characteristic of a submanifold.

Sectional curvature can be either larger or smaller than entries in the matrix on other planes. Consider for example the manifold of rotation matrices in four dimensions, and a function that computes plane of maximum curvature using random search.

function max_curvature(M::AbstractManifold, p)
    mc = -Inf
    X = zero_vector(M, p)
    Y = zero_vector(M, p)
    for _ in 1:10000
        X_c = rand(M; vector_at=p)
        Y_c = rand(M; vector_at=p)
        sc = sectional_curvature(M, p, X_c, Y_c)
        if sc > mc
            mc = sc
            X .= X_c
            Y .= Y_c
        end
    end
    return mc, X, Y
end

M = Rotations(4)
p = Matrix(I(4) * 1.0)
println(sectional_curvature_matrix(M, p, DefaultOrthonormalBasis()))
mc, X, Y = max_curvature(M, p)
println(mc)
println(X)
println(Y)
[0.0 0.12500000000000003 0.12500000000000003 0.0 0.12500000000000003 0.12500000000000003; 0.12500000000000003 0.0 0.12500000000000003 0.12500000000000003 0.0 0.12500000000000003; 0.12500000000000003 0.12500000000000003 0.0 0.12500000000000003 0.12500000000000003 0.0; 0.0 0.12500000000000003 0.12500000000000003 0.0 0.12500000000000003 0.12500000000000003; 0.12500000000000003 0.0 0.12500000000000003 0.12500000000000003 0.0 0.12500000000000003; 0.12500000000000003 0.12500000000000003 0.0 0.12500000000000003 0.12500000000000003 0.0]
0.23879982034126757
[0.0 -0.2013171245451976 -1.400654029732182 -0.8112103719891702; 0.2013171245451976 0.0 -0.27170456227067813 1.3144049067105412; 1.400654029732182 0.27170456227067813 0.0 -0.045998704993111414; 0.8112103719891702 -1.3144049067105412 0.045998704993111414 0.0]
[0.0 0.3336660585967936 -0.08554339400516117 -1.5227768217618776; -0.3336660585967936 0.0 -1.0875576972336995 0.09481905420477901; 0.08554339400516117 1.0875576972336995 0.0 0.40309853167993015; 1.5227768217618776 -0.09481905420477901 -0.40309853167993015 0.0]

In the planes corresponding to orthonormal basis, the maximum sectional curvature is 0.125 but the true upper bound is 0.25.

Literature

[CE08]
J. Cheeger and D. G. Ebin. Comparison Theorems in Riemannian Geometry (American Mathematical Society, Providence, R.I, 2008).