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.SPDPoint — Type.SPDPoint <: MPointA 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.
Manopt.SPDTVector — Type.SPDTVector <: TVectorA tangent vector
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.
Manopt.SymmetricPositiveDefinite — Type.SymmetricPositiveDefinite <: ManifoldThe manifold $\mathcal M = \mathcal P(n)$ of $n\times n$ symmetric positive definite matrices.
Fields
name– representative String representing the current manifoldn– size of the matrices of this manifold, i.e. $n\times n$ matricesabbreviation– short descriptor for the manifold.
Constructor
SymmetricPositiveDefinite(n)construct the manifold of n-by-n matrices with affine metric.
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.exp — Function.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 tξ. The formula reads
where $\operatorname{Exp}$ denotes the matrix exponential
Base.log — Method.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
where $\operatorname{Log}$ denotes the matrix logarithm.
LinearAlgebra.dot — Method.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$.
LinearAlgebra.norm — Method.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}$.
Manopt.distance — Method.distance(M,x,y)compute the Riemannian distance on the SymmetricPositiveDefinite manifold $\mathcal M=\mathcal P(n)$, given by
where $\operatorname{Log}$ denotes the matrix logarithm and the Norm is the Frobenius norm in matrices
Manopt.manifoldDimension — Method.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}$.
Manopt.manifoldDimension — Method.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}$.
Manopt.parallelTransport — Method.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
where $\operatorname{Exp}$ denotes the matrix exponential and log the logarithmic map.
Manopt.project — Method.project(M,x,v)project a $n\times n$ Matrix v on the tangent space of the SPDPoint x.
Manopt.randomMPoint — Function.randomMPoint(M,:Gaussian[, σ=1.0])gerenate a random symmetric positive definite matrix on the SymmetricPositiveDefinite manifold M.
Manopt.randomTVector — Function.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.
Manopt.randomTVector — Function.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 σ.
Manopt.tangentONB — Method.Ξ,κ = 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.
Manopt.tangentONB — Method.Ξ,κ = 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
and the correspoinding eigenvalues of the curvature tensor are given using the eigenvalues $\lambda_i$, $i=1,\ldots,n$ of ξ as
Manopt.typicalDistance — Method.typicalDistance(M)returns the typical distance on the SymmetricPositiveDefinite manifold M $\sqrt{\frac{n(n+1)}{2}}$.
Manopt.validateMPoint — Method.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.
Manopt.validateTVector — Method.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.
Manopt.zeroTVector — Method.ξ = 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.