The Symmetric Positive Definite Matrices mathcal P(n)

The Symmetric Positive Definite $n\times n$ Matrices

The manifold of symmetric positive definite matrices $\mathcal P(3) = \bigl\{ A \in \mathbb R^{n\times n}\ \big|\ A = A^{\mathrm{T}} \text{ and } x^{\mathrm{T}}Ax > 0 \text{ for } 0\neq x \in\mathbb R^n \bigr\}$ posesses the following instances of the abstract types Manifold, MPoint, and TVector.

Manopt.SPDPointType.
SPDPoint <: MPoint

A point $x$ on the SymmetricPositiveDefinite manifold $\mathcal M = \mathcal P(n)$ of $n\times n$, represented in the redundant way of a symmetric positive definite matrix.

source
SPDTVector <: TVector

A tangent vector

\[\xi \in T_x\mathcal M = \{ x^{\frac{1}{2}}\nu x^{\frac{1}{2}} \big| \nu\in\mathbb R^{n,n}\text{ with }\nu=\nu^{\mathrm{T}}\}\]

to the SymmetricPositiveDefinite manifold $\mathcal M = \mathcal P(n)$ at the SPDPoint x represented in the redundant way of a skew symmetric matrix $\nu$, i.e. in the Lie algebra $T_I\mathcal P(n)$, where $I\in\mathbb R^{n\times n}$ denotes the identity matrix.

source
SymmetricPositiveDefinite <: Manifold

The manifold $\mathcal M = \mathcal P(n)$ of $n\times n$ symmetric positive definite matrices.

Fields

  • name – representative String representing the current manifold
  • n – size of the matrices of this manifold, i.e. $n\times n$ matrices
  • abbreviation – short descriptor for the manifold.

Constructor

SymmetricPositiveDefinite(n)

construct the manifold of n-by-n matrices with affine metric.

source

While there are two Riemannian metrics available, this one focuses on the affine metric. The Log-Euclidean Metric needs at least a new tangent vector type inheriting from <: TVector.

Note that saving the points on the manifold in this format is a little bit rendundant, it' enough to save the upper triangular matrix. For ease of computations this is – for now – adapted from Matlab.

Functions

Base.expFunction.
exp(M,x,ξ,[t=1.0])

compute the exponential map on the SymmetricPositiveDefinite manifold M M$=\mathcal P(n)$ with respect to the SPDPoint x and the SPDTVectorξ, which can be shortened with t to . The formula reads

\[\exp_x\xi = x^{\frac{1}{2}}\operatorname{Exp}(x^{-\frac{1}{2}}\xi x^{-\frac{1}{2}})x^{\frac{1}{2}},\]

where $\operatorname{Exp}$ denotes the matrix exponential

source
Base.logMethod.
log(M,x,y)

compute the logarithmic map on the SymmetricPositiveDefinite manifold $\mathcal M=\mathcal P(n)$, i.e. the SPDTVector whose corresponding geodesic starting from SPDPoint x reaches the SPDPointy after time 1. The formula reads

\[\log_x y = x^{\frac{1}{2}}\operatorname{Log}(x^{-\frac{1}{2}} y x^{-\frac{1}{2}})x^{\frac{1}{2}},\]

where $\operatorname{Log}$ denotes the matrix logarithm.

source
LinearAlgebra.dotMethod.
dot(M,x,ξ,ν)

compute the innter product of the two SPDTVectors ξ,ν from the tangent space $T_x\mathcal M$ of the SPDPoint x on the SymmetricPositiveDefinite manifold M given by the formula

$ \langle \xi, \nu \rangle_x = \operatorname{tr}(x^{-1}\xi x^{-1}\nu ),$

where $\operatorname{tr}(y)$ denotes the trace of the matrix $y$.

source
LinearAlgebra.normMethod.
norm(M,x,ξ)

compute the norm of the SPDTVectorξ from the tangent space $T_x\mathcal M$ at the SPDPoint x on the SymmetricPositiveDefinite manifold M induced by the inner product dot as $\lVert\xi\rVert_x = \sqrt{\langle\xi,\xi\rangle_x}$.

source
Manopt.distanceMethod.
distance(M,x,y)

compute the Riemannian distance on the SymmetricPositiveDefinite manifold $\mathcal M=\mathcal P(n)$, given by

\[d_{\mathcal P(n)}(x,y) = \lVert \operatorname{Log}(x^{-\frac{1}{2}}yx^{-\frac{1}{2}})\rVert,\]

where $\operatorname{Log}$ denotes the matrix logarithm and the Norm is the Frobenius norm in matrices

source
manifoldDimension(x)

returns the manifold dimension of the SymmetricPositiveDefinite manifold M manifold the SPDPoint x belongs to, i.e. for $n\times n$ matrices the dimension is $\frac{n(n+1)}{2}$.

source
manifoldDimension(M)

return the manifold dimension of the SymmetricPositiveDefinite Manifold M, i.e. for $n\times n$ matrices the dimension is $\frac{n(n+1)}{2}$.

source
parallelTransport(M,x,y,ξ)

compute the paralllel transport of the SPDTVectorξ from the tangent space $T_x\mathcal M$ at SPDPoint x to $T_y\mathcal M$ at SPDPointy on the SymmetricPositiveDefinite manifold M along the geodesic $g(\cdot;x,y)$. The formula reads

\[P_{x\to y}(\xi) = x^{\frac{1}{2}} \operatorname{Exp}\bigl( \frac{1}{2}x^{-\frac{1}{2}}\log_x(y)x^{-\frac{1}{2}} \bigr) x^{-\frac{1}{2}}\xi x^{-\frac{1}{2}} \operatorname{Exp}\bigl( \frac{1}{2}x^{-\frac{1}{2}}\log_x(y)x^{-\frac{1}{2}} \bigr) x^{\frac{1}{2}},\]

where $\operatorname{Exp}$ denotes the matrix exponential and log the logarithmic map.

source
Manopt.randomMPointFunction.
randomMPoint(M,:Gaussian[, σ=1.0])

gerenate a random symmetric positive definite matrix on the SymmetricPositiveDefinite manifold M.

source
Manopt.randomTVectorFunction.
randomTVector(M,x [,:Gaussian,σ = 1.0])

generate a random tangent vector in the tangent space of the SPDPoint x on the SymmetricPositiveDefinite manifold M by using a Gaussian distribution with standard deviation σ on an ONB of the tangent space.

source
Manopt.randomTVectorFunction.
randomTVector(M,x [,:Gaussian,σ = 1.0])

generate a random tangent vector in the tangent space of the SPDPoint x on the SymmetricPositiveDefinite manifold M by using a Rician distribution with standard deviation σ.

source
Manopt.tangentONBMethod.
Ξ,κ = tangentONB(M,x,y)

compute a ONB in the tangent space of the SPDPoint x on the SymmetricPositiveDefinite manifold M where the first vector is given by the normed log(M,x,y), i.e. the direction to the SPDPoint y.

source
Manopt.tangentONBMethod.
Ξ,κ = tangentONB(M,x,y)

compute a ONB in the tangent space of the SPDPoint x on the SymmetricPositiveDefinite manifold M where the first vector is the normed tangent vector of the SPDTVector ξ.

The basis is computed using the eigenvectors $v_i$, $i=1,\ldots,n$, of ξ and define

\[\xi_{ij} := \begin{cases} \frac{1}{2} (v_i v_j^{\mathrm{T}} + v_j v_i^{\mathrm{T}}) & \mathrm{ if } i=j ,\\ \frac{1}{\sqrt{2}} (v_i v_j^{\mathrm{T}} + v_j v_i^{\mathrm{T}}), & \mathrm{ if } i \neq j, \end{cases} \qquad\text{where } i=1,\ldots,n, k=i,\ldots,n,\]

and the correspoinding eigenvalues of the curvature tensor are given using the eigenvalues $\lambda_i$, $i=1,\ldots,n$ of ξ as

\[\kappa_{i,j} = -\frac{1}{4}(\lambda_i-\lambda_j)^2,\qquad \text{where } i=1,\ldots,n, k=i,\ldots,n,\]
source
typicalDistance(M)

returns the typical distance on the SymmetricPositiveDefinite manifold M $\sqrt{\frac{n(n+1)}{2}}$.

source
validateMPoint(M,x)

validate that the SPDPoint x is a valid point on the manifold SymmetricPositiveDefinite manifold M, i.e. the matrix is symmetric and positive definite.

source
validateTVector(M,x,ξ)

validate, that the SPDTVectorξ is a tangent vector at the SPDPoint x on the SymmetricPositiveDefinite M, i.e. all dimensions are corrrect and the matrix is skew symmetric since we only store the corresponding value in the Lie algebra.

source
Manopt.zeroTVectorMethod.
ξ = zeroTVector(M,x)

returns a zero vector in the tangent space $T_x\mathcal M$ of the SPDPoint $x\in\mathcal P(n)$ on the SymmetricPositiveDefinite manifold M.

source