The special orthogonal group

For this Lie group, several implementations are already covered by the defaults in the generic (matrix) multiplication operation.

Functions

Base.exp โ€” Method
exp(G, X)
exp!(G, g, X)

Compute the Lie group exponential function on the OrthogonalGroup $\mathrm{O}(2)$ or SpecialOrthogonalGroup $\mathrm{SO}(2)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

Since the Lie algebra of both groups agrees and consist of the set of skew symmetric matrices, these simplify for the case of $2ร—2$ matrices to $X=\begin{pmatrix} 0 & -ฮฑ\\ ฮฑ & 0\end{pmatrix}$, for some $ฮฑโˆˆโ„$.

Their exponential is

\[\exp_{\mathcal G}(X) = \begin{pmatrix} \cos(ฮฑ) & -\sin(ฮฑ)\\ \sin(ฮฑ) & \cos(ฮฑ)\end{pmatrix}.\]

This result can be computed in-place of g.

Note that since $\mathrm{O}(2)$ consists of two disjoint connected components and the exponential map is smooth, the result $g$ always lies in the connected component of the identity.

source
Base.exp โ€” Method
exp(G, X)
exp!(G, g, X)

Compute the Lie group exponential function on the OrthogonalGroup $\mathrm{O}(3)$ or SpecialOrthogonalGroup $\mathrm{SO}(3)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

Since the Lie algebra of both groups agrees and consist of the set of skew symmetric matrices, the $3ร—3$ skew symmetric matrices are of the form

\[ X = \begin{pmatrix} 0 & -c & b\\ c & 0 & -a\\ -b & a & 0\end{pmatrix},\]

for some $a, b, c โˆˆ โ„$. To compute the exponential, the Rodrigues' rotation formula can be used. With $ฮฑ = \sqrt{a^2+b^2+c^2} = \frac{1}{\sqrt{2}}\lVert X \rVert_{}$ we obtain for $ฮฑ โ‰  0$

\[\exp_{\mathcal G}(X) = I_3 + \frac{\sin}{ฮฑ}X + \frac{(1 - \cos)}{ฮฑ^2}X^2,\]

and \exp{\mathcal G}(X) = I3`` otherwise.

This result can be computed in-place of g.

Note that since $\mathrm{SO}(3)$ consists of two disjoint connected components and the exponential map is smooth, the result $g$ always lies in the connected component of the identity.

source
Base.log โ€” Method
log(G, g)
log!(G, X, g)

Compute the Lie group logarithm function on the OrthogonalGroup $\mathrm{O}(2)$ or SpecialOrthogonalGroup $\mathrm{SO}(2)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

For the two-dimensional case, any rotation matrix $g$ can be represented as $\begin{pmatrix} \cos(ฮฑ) & -\sin(ฮฑ)\\ \sin(ฮฑ) & \cos(ฮฑ)\end{pmatrix}$. For the SpecialOrthogonalGroup, $g$ might also include reflections.

The logarithm is then

\[\log_{\mathcal G}(g) = \begin{pmatrix} 0 & ฮฑ\\ -ฮฑ & 0\end{pmatrix}.\]

This result can be computed in-place of X

Note the logarithmic map is only locally around the identity uniquely determined. Especially, since $\mathrm{O}(2)$ consists of two disjoint connected components and the exponential map is smooth, for any $g$ in the other component, the logarithmic map is defined, but not the inverse of the exponential map.

source
Base.log โ€” Method
log(G, g)
log!(G, X, g)

Compute the Lie group logarithm function on the OrthogonalGroup $\mathrm{O}(3)$ or SpecialOrthogonalGroup $\mathrm{SO}(3)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

Here, $\exp_{\mathcal G}(X) = g$ is inverted using the Rodrigues' rotation formula

\[\exp_{\mathcal G}(X) = I_3 + \frac{\sin}{ฮฑ}X + \frac{(1 - \cos)}{ฮฑ^2}X^2,\]

For $ฮฑ โˆ‰ \{ 0, ฯ€ \}$ we obtain $X$ from the observation that

\[\mathrm{tr}(g) = 1 + 2\cos(ฮฑ) \qquad\text{ and }\qquad \frac{1}{2}(g-g^\mathrm{T}) = \sin(ฮฑ)X.\]

For $ฮฑ = 0$ we have $g = I_3$ and $X = 0$.

For $ฮฑ = ฯ€$ we have to solve $X^2 = \frac{1}{2}(g-I_3)$, where $X$ is skew-symmetric and hence we have to solve for three unknowns.

\[\log_{\mathcal G}(g) = X.\]

This result can be computed in-place of X

Note the logarithmic map is only locally around the identity uniquely determined. Especially, since $\mathrm{O}(3)$ consists of two disjoint connected components and the exponential map is smooth, for any $g$ in the other component, the logarithmic map is defined, but not the inverse of the exponential map.

source
Base.log โ€” Method
log(G, g)
log!(G, X, g)

Compute the Lie group logarithm function on the OrthogonalGroup $\mathrm{O}(4)$ or SpecialOrthogonalGroup $\mathrm{SO}(4)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

The implementation is based on a generalized variant of the Rodrigues' like formula. For details, see [GX02, Section 3].

This result can be computed in-place of X

Note the logarithmic map is only locally around the identity uniquely determined.

source
LieGroups.jacobian_exp โ€” Function
jacobian_exp(M::SpecialOrthogonalGroup{TypeParameter{Tuple{3}}}, X, ::DefaultLieAlgebraOrthogonalBasis)
jacobian_exp!(M::SpecialOrthogonalGroup{TypeParameter{Tuple{3}}}, J, X, ::DefaultLieAlgebraOrthogonalBasis)

Compute Jacobian of the Lie group exponential in a basis of the Lie algebra on the SpecialOrthogonalGroup(3) manifold. The formula reads

\[J = ๐•€ + \frac{\cos(ฮธ) - 1}{ฮธ^2} X + \frac{ฮธ - \sin(ฮธ)}{ฮธ^3} X^2,\]

where $ฮธ$ is the norm of X. It is adapted from [Chi12], Eq. (10.86), to LieGroups.jl conventions.

source
LieGroups.jacobian_exp! โ€” Method
jacobian_exp(M::SpecialOrthogonalGroup{TypeParameter{Tuple{3}}}, X, ::DefaultLieAlgebraOrthogonalBasis)
jacobian_exp!(M::SpecialOrthogonalGroup{TypeParameter{Tuple{3}}}, J, X, ::DefaultLieAlgebraOrthogonalBasis)

Compute Jacobian of the Lie group exponential in a basis of the Lie algebra on the SpecialOrthogonalGroup(3) manifold. The formula reads

\[J = ๐•€ + \frac{\cos(ฮธ) - 1}{ฮธ^2} X + \frac{ฮธ - \sin(ฮธ)}{ฮธ^3} X^2,\]

where $ฮธ$ is the norm of X. It is adapted from [Chi12], Eq. (10.86), to LieGroups.jl conventions.

source
ManifoldsBase.exp! โ€” Method
exp(G, X)
exp!(G, g, X)

Compute the Lie group exponential function on the OrthogonalGroup $\mathrm{O}(2)$ or SpecialOrthogonalGroup $\mathrm{SO}(2)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

Since the Lie algebra of both groups agrees and consist of the set of skew symmetric matrices, these simplify for the case of $2ร—2$ matrices to $X=\begin{pmatrix} 0 & -ฮฑ\\ ฮฑ & 0\end{pmatrix}$, for some $ฮฑโˆˆโ„$.

Their exponential is

\[\exp_{\mathcal G}(X) = \begin{pmatrix} \cos(ฮฑ) & -\sin(ฮฑ)\\ \sin(ฮฑ) & \cos(ฮฑ)\end{pmatrix}.\]

This result can be computed in-place of g.

Note that since $\mathrm{O}(2)$ consists of two disjoint connected components and the exponential map is smooth, the result $g$ always lies in the connected component of the identity.

source
ManifoldsBase.exp! โ€” Method
exp(G, X)
exp!(G, g, X)

Compute the Lie group exponential function on the OrthogonalGroup $\mathrm{O}(3)$ or SpecialOrthogonalGroup $\mathrm{SO}(3)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

Since the Lie algebra of both groups agrees and consist of the set of skew symmetric matrices, the $3ร—3$ skew symmetric matrices are of the form

\[ X = \begin{pmatrix} 0 & -c & b\\ c & 0 & -a\\ -b & a & 0\end{pmatrix},\]

for some $a, b, c โˆˆ โ„$. To compute the exponential, the Rodrigues' rotation formula can be used. With $ฮฑ = \sqrt{a^2+b^2+c^2} = \frac{1}{\sqrt{2}}\lVert X \rVert_{}$ we obtain for $ฮฑ โ‰  0$

\[\exp_{\mathcal G}(X) = I_3 + \frac{\sin}{ฮฑ}X + \frac{(1 - \cos)}{ฮฑ^2}X^2,\]

and \exp{\mathcal G}(X) = I3`` otherwise.

This result can be computed in-place of g.

Note that since $\mathrm{SO}(3)$ consists of two disjoint connected components and the exponential map is smooth, the result $g$ always lies in the connected component of the identity.

source
ManifoldsBase.get_coordinates! โ€” Method
get_coordinates(๐”ค::OrthogonalLieAlgebra, X, ::DefaultLieAlgebraOrthogonalBasis)
get_coordinates(G::SpecialOrthogonalLieAlgebra, X, ::DefaultLieAlgebraOrthogonalBasis)
get_coordinates!(G::OrthogonalLieAlgebra, c, X ::DefaultLieAlgebraOrthogonalBasis)
get_coordinates!(G::SpecialOrthogonalLieAlgebra, c, X ::DefaultLieAlgebraOrthogonalBasis)

Compute the vector of coordinates $c โˆˆ โ„^d$ from the Lie algebra tangent vector $X โˆˆ ๐”ฌ(n)$ of the OrthogonalGroup O(n) in the DefaultLieAlgebraOrthogonalBasis, where $d$ is the dimension of the Lie algebra. This is also the version used in vee.

For $O(2)$ there is only one coefficient $ฮฑ$ in the basis $\begin{pmatrix} 0 & -ฮฑ\\ ฮฑ & 0\end{pmatrix}$, which is returned as $c = (ฮฑ)^\mathrm{T}$.

A usual basis representation of ``๐”ฌ(3) is given by

\[ X = \begin{pmatrix} 0 & -ฮณ & ฮฒ\\ ฮณ & 0 & -ฮฑ\\ -ฮฒ & ฮฑ & 0\end{pmatrix},\]

hence the coordinate vector is $c = (ฮฑ, ฮฒ, ฮณ)^\mathrm{T} โˆˆ โ„^3$.

For n โ‰ฅ 4the lower triangular part is added toc` row-wise.

source
ManifoldsBase.get_coordinates โ€” Method
get_coordinates(๐”ค::OrthogonalLieAlgebra, X, ::DefaultLieAlgebraOrthogonalBasis)
get_coordinates(G::SpecialOrthogonalLieAlgebra, X, ::DefaultLieAlgebraOrthogonalBasis)
get_coordinates!(G::OrthogonalLieAlgebra, c, X ::DefaultLieAlgebraOrthogonalBasis)
get_coordinates!(G::SpecialOrthogonalLieAlgebra, c, X ::DefaultLieAlgebraOrthogonalBasis)

Compute the vector of coordinates $c โˆˆ โ„^d$ from the Lie algebra tangent vector $X โˆˆ ๐”ฌ(n)$ of the OrthogonalGroup O(n) in the DefaultLieAlgebraOrthogonalBasis, where $d$ is the dimension of the Lie algebra. This is also the version used in vee.

For $O(2)$ there is only one coefficient $ฮฑ$ in the basis $\begin{pmatrix} 0 & -ฮฑ\\ ฮฑ & 0\end{pmatrix}$, which is returned as $c = (ฮฑ)^\mathrm{T}$.

A usual basis representation of ``๐”ฌ(3) is given by

\[ X = \begin{pmatrix} 0 & -ฮณ & ฮฒ\\ ฮณ & 0 & -ฮฑ\\ -ฮฒ & ฮฑ & 0\end{pmatrix},\]

hence the coordinate vector is $c = (ฮฑ, ฮฒ, ฮณ)^\mathrm{T} โˆˆ โ„^3$.

For n โ‰ฅ 4the lower triangular part is added toc` row-wise.

source
ManifoldsBase.get_vector! โ€” Method
get_vector(G::OrthogonalLieAlgebra, e, c, ::DefaultLieAlgebraOrthogonalBasis)
get_vector(G::SpecialOrthogonalLieAlgebra, e, c, ::DefaultLieAlgebraOrthogonalBasis)
get_vector!(G::OrthogonalLieAlgebra, X, e, c, ::DefaultLieAlgebraOrthogonalBasis)
get_vector!(G::SpecialOrthogonalLieAlgebra, X, e, c, ::DefaultLieAlgebraOrthogonalBasis)

Compute the tangent vector $X โˆˆ ๐”ฌ(n)$ from a vector of coordinates $c โˆˆ โ„^d$.

Here $d$ is the dimension of the Lie algebra of the OrthogonalGroup O(n) and the coordinates are with respect to the DefaultLieAlgebraOrthogonalBasis. This is also the version used in hat.

For $O(2)$ there is only one coefficient ``$c = (ฮฑ)^\mathrm{T}$ and hence $X = \begin{pmatrix} 0 & -ฮฑ\\ ฮฑ & 0\end{pmatrix}$ is returned.

For $n=3$ a usual representtion turns $c = (ฮฑ, ฮฒ, ฮณ)^\mathrm{T} โˆˆ โ„^3$ into

\[ X = \begin{pmatrix} 0 & -ฮณ & ฮฒ\\ ฮณ & 0 & -ฮฑ\\ -ฮฒ & ฮฑ & 0\end{pmatrix},\]

hence the coordinate vector is .

For n โ‰ฅ 4` all further coefficients are used to fill up the following rows of the lower triangular part โ€“ which determines the upper triangular part due to skew-symmetry

source
ManifoldsBase.get_vector โ€” Method
get_vector(G::OrthogonalLieAlgebra, e, c, ::DefaultLieAlgebraOrthogonalBasis)
get_vector(G::SpecialOrthogonalLieAlgebra, e, c, ::DefaultLieAlgebraOrthogonalBasis)
get_vector!(G::OrthogonalLieAlgebra, X, e, c, ::DefaultLieAlgebraOrthogonalBasis)
get_vector!(G::SpecialOrthogonalLieAlgebra, X, e, c, ::DefaultLieAlgebraOrthogonalBasis)

Compute the tangent vector $X โˆˆ ๐”ฌ(n)$ from a vector of coordinates $c โˆˆ โ„^d$.

Here $d$ is the dimension of the Lie algebra of the OrthogonalGroup O(n) and the coordinates are with respect to the DefaultLieAlgebraOrthogonalBasis. This is also the version used in hat.

For $O(2)$ there is only one coefficient ``$c = (ฮฑ)^\mathrm{T}$ and hence $X = \begin{pmatrix} 0 & -ฮฑ\\ ฮฑ & 0\end{pmatrix}$ is returned.

For $n=3$ a usual representtion turns $c = (ฮฑ, ฮฒ, ฮณ)^\mathrm{T} โˆˆ โ„^3$ into

\[ X = \begin{pmatrix} 0 & -ฮณ & ฮฒ\\ ฮณ & 0 & -ฮฑ\\ -ฮฒ & ฮฑ & 0\end{pmatrix},\]

hence the coordinate vector is .

For n โ‰ฅ 4` all further coefficients are used to fill up the following rows of the lower triangular part โ€“ which determines the upper triangular part due to skew-symmetry

source
ManifoldsBase.log! โ€” Method
log(G, g)
log!(G, X, g)

Compute the Lie group logarithm function on the OrthogonalGroup $\mathrm{O}(2)$ or SpecialOrthogonalGroup $\mathrm{SO}(2)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

For the two-dimensional case, any rotation matrix $g$ can be represented as $\begin{pmatrix} \cos(ฮฑ) & -\sin(ฮฑ)\\ \sin(ฮฑ) & \cos(ฮฑ)\end{pmatrix}$. For the SpecialOrthogonalGroup, $g$ might also include reflections.

The logarithm is then

\[\log_{\mathcal G}(g) = \begin{pmatrix} 0 & ฮฑ\\ -ฮฑ & 0\end{pmatrix}.\]

This result can be computed in-place of X

Note the logarithmic map is only locally around the identity uniquely determined. Especially, since $\mathrm{O}(2)$ consists of two disjoint connected components and the exponential map is smooth, for any $g$ in the other component, the logarithmic map is defined, but not the inverse of the exponential map.

source
ManifoldsBase.log! โ€” Method
log(G, g)
log!(G, X, g)

Compute the Lie group logarithm function on the OrthogonalGroup $\mathrm{O}(3)$ or SpecialOrthogonalGroup $\mathrm{SO}(3)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

Here, $\exp_{\mathcal G}(X) = g$ is inverted using the Rodrigues' rotation formula

\[\exp_{\mathcal G}(X) = I_3 + \frac{\sin}{ฮฑ}X + \frac{(1 - \cos)}{ฮฑ^2}X^2,\]

For $ฮฑ โˆ‰ \{ 0, ฯ€ \}$ we obtain $X$ from the observation that

\[\mathrm{tr}(g) = 1 + 2\cos(ฮฑ) \qquad\text{ and }\qquad \frac{1}{2}(g-g^\mathrm{T}) = \sin(ฮฑ)X.\]

For $ฮฑ = 0$ we have $g = I_3$ and $X = 0$.

For $ฮฑ = ฯ€$ we have to solve $X^2 = \frac{1}{2}(g-I_3)$, where $X$ is skew-symmetric and hence we have to solve for three unknowns.

\[\log_{\mathcal G}(g) = X.\]

This result can be computed in-place of X

Note the logarithmic map is only locally around the identity uniquely determined. Especially, since $\mathrm{O}(3)$ consists of two disjoint connected components and the exponential map is smooth, for any $g$ in the other component, the logarithmic map is defined, but not the inverse of the exponential map.

source
ManifoldsBase.log! โ€” Method
log(G, g)
log!(G, X, g)

Compute the Lie group logarithm function on the OrthogonalGroup $\mathrm{O}(4)$ or SpecialOrthogonalGroup $\mathrm{SO}(4)$, where e is the Identity{MatrixMultiplicationGroupOperation} and G uses a TypeParameter for dispatch.

The implementation is based on a generalized variant of the Rodrigues' like formula. For details, see [GX02, Section 3].

This result can be computed in-place of X

Note the logarithmic map is only locally around the identity uniquely determined.

source