$\DeclareMathOperator{\arccosh}{arccosh} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\Exp}{Exp} \newcommand{\geo}{\gamma_{\overset{\frown}{#1,#2}}} \newcommand{\geoS}{\gamma} \newcommand{\geoD}{\gamma_} \newcommand{\geoL}{\gamma(#2; #1)} \newcommand{\gradM}{\nabla_{\M}} \newcommand{\gradMComp}{\nabla_{\M,#1}} \newcommand{\Grid}{\mathcal G} \DeclareMathOperator{\Log}{Log} \newcommand{\M}{\mathcal M} \newcommand{\N}{\mathcal N} \newcommand{\mat}{\mathbf{#1}} \DeclareMathOperator{\prox}{prox} \newcommand{\PT}{\mathrm{PT}_{#1\to#2}#3} \newcommand{\R}{\mathbb R} \newcommand{\SPD}{\mathcal{P}(#1)} \DeclareMathOperator{\Tr}{Tr} \newcommand{\tT}{\mathrm{T}} \newcommand{\vect}{\mathbf{#1}}$

# The symmetric positive definite $\SPD{n}$ matrices of size $n\times n$

The manifold $\SPD{n}$ consists of all matrices $x\in\mathbb R^{n\times n}$ such that for all vectors $\vect{a}\in\mathbb R^n$ the inequality

holds. 1

In this class we use the affine metric as for example described in , but there is also the alternative way of using the Log-Euclidean metric .

For vizualization we can use the following approach. Since $x\in\SPD{n}$ is symmetric, all eigenvalues are real valued; since $x$ is positive definite, all eigenvalues are (strictly) positive. This yields a vizualization for the cases $n=2$ and $n=3$:

For $n=2$ we take the eigenvectors $\vect{v}_1,\vect{v}_2$ of $x\in\SPD{2}$ scaled to unit length and denot the eigenvalues with $\lambda_1,\lambda_2$. Assume further that the eigenvalues are sorten, i.e. $\lambda_1\geq\lambda_2$. We can now interprete the eigenvectors as axis of an ellipse: as major axis $\lambda_1\vect{v}_1$ and minor axis $\lambda_2\vect{v}_2$. An example is the signal from . Visualizazion of $\SPD{2}$-valued signal as ellipses.

Note that the mid points of the ellipses are placed on a regular grid. This grid has no fixed size and should be set to the same value for images that are showing comparable data.

For $n=3$ one can do the similar approach with all three eigenvalues $\lambda_1,\lambda_2,\lambda_3$ and their eigenvectors $\vect{v}_1,\vect{v}_2,\vect{v}_3$ to visualize an ellipsoid. Furthermore this can be used for image, or even 3D/volumetric, data. The following is an atrificial data set from Visualizazion of an image of $\SPD{3}$ valued pixel as ellispids.

Here, the grid is also arbitrarily chosen, see last note. This construction does not yet yield a color. We empoloy the geometric anisotropy index as presented in .

### Footnotes

1. While this page usually sets vectors in small letters and bold, matrices in capital letters and bold, we refrain from this notation to emphasize the matrices here being points on the manifold. This way we keep pages consistent, that are about general manifold theory

### Functions

The orthonormal basis in a tangent space
1
% [Xi,k] = TpMONB(x,y) Compute an ONB in TpM and curvature


This function computes an ONB and correspoinding curvature coefficients, belonging to the parallel transportet orthonormal frame and diagonalizes the curvature tensor along $\geo{x}{y}$. The set of vectors in a tangent space $T_x\SPD{n}$ added as last dimension of the array and consists of $d=\frac{n(n+1)}{2}$ vectors.

more
Add (Rician or Gaussian white) noise
1


Adds Rician (standard) or Gaussian (set 'Distribution' to 'Gaussian') with mean zero (using the tangent space) to data.

The inner product on symmetric positive definite matrices
1
% d = dist(x,y) compute the distance between x,y from P(n).


The distance on the symmetric positive definite matrices $\SPD{n}$ is given by

where $\Log$ denotes the matrix logarithm and $\lVert\cdot\rVert$ is the Frobenius norm of the matrix.

The inner product on symmetric positive definite matrices
1
% dot(x,xi,nu) inner product of two tangent vectors in TxP(m)


The affine invariant metric on the symmetric positive definite matrices is defined for $x\in\SPD{n}$ and $\xi,\nu\in T_x\SPD{n}$ as

where $\Tr$ is the trace of a matrix.

The exponential map on symmetric positive definite matrices
1
% y = exp(x,xi) exponential map at x from P(n) towards xi in TxP(n)


The exponential map on the sphere $\SPD{n}$ is given for $x\in\SPD{n}$, $\xi\in T_x\SPD{n}$ by the formula

where $\Exp$ denotes the matrix exponential.

The logarithmic map on symmetric positive definite matrices
1
% xi = log(x,y) logarithmic map at the point(s) x of points(s) y


The logarithmic map on symmetric positive definite matrices $x,y\in\SPD{n}$ is given by

where where $\Log$ denotes the matrix logarithm.

The parallel transport on symmetric positive definite matrices
1
% eta = parallelTransport(x,y,xi) parallel transport xi along g(.,x,y)


This function parallel transports a vector $\xi\in T_x\SPD{n}$ along the unique geodesic $\geo{x}{y}: [0,1] \to \SPD{n}$. The transport is given by