AlgebraInverse - Maple Help

LieAlgebras[AlgebraNorm] - find the norm of a quaternion or octonion

LieAlgebras[AlgebraInverse] - find the multiplicative inverse of a quaternion or octonion

Calling Sequences

AlgebraNorm(X)

AlgebraInverse(X)

Parameters

X   - a quaternion or octonion

Description

 • If  is a quaternion or octonion then the norm of is  where  is the conjugate of $X$.
 • The inverse of $X$ is .
 • For example, if is the quaternion , then =  and ${X}^{-1}$ = .

Examples

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$$\mathrm{with}\left(\mathrm{LieAlgebras}\right):$

Example 1.

Use AlgebraLibraryData to retrieve the structure equations for the quaternions. Call the algebra $\mathrm{Qalg}$.

 > $\mathrm{AD}≔\mathrm{AlgebraLibraryData}\left("Quaternions",\mathrm{Qalg}\right)$
 ${\mathrm{AD}}{:=}\left[{{\mathrm{e1}}}^{{2}}{=}{\mathrm{e1}}{,}{\mathrm{e1}}{.}{\mathrm{e2}}{=}{\mathrm{e2}}{,}{\mathrm{e1}}{.}{\mathrm{e3}}{=}{\mathrm{e3}}{,}{\mathrm{e1}}{.}{\mathrm{e4}}{=}{\mathrm{e4}}{,}{\mathrm{e2}}{.}{\mathrm{e1}}{=}{\mathrm{e2}}{,}{{\mathrm{e2}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e2}}{.}{\mathrm{e3}}{=}{\mathrm{e4}}{,}{\mathrm{e2}}{.}{\mathrm{e4}}{=}{-}{\mathrm{e3}}{,}{\mathrm{e3}}{.}{\mathrm{e1}}{=}{\mathrm{e3}}{,}{\mathrm{e3}}{.}{\mathrm{e2}}{=}{-}{\mathrm{e4}}{,}{{\mathrm{e3}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e3}}{.}{\mathrm{e4}}{=}{\mathrm{e2}}{,}{\mathrm{e4}}{.}{\mathrm{e1}}{=}{\mathrm{e4}}{,}{\mathrm{e4}}{.}{\mathrm{e2}}{=}{\mathrm{e3}}{,}{\mathrm{e4}}{.}{\mathrm{e3}}{=}{-}{\mathrm{e2}}{,}{{\mathrm{e4}}}^{{2}}{=}{-}{\mathrm{e1}}\right]$ (2.1)

Initialize the algebra of quaternions.

 > $\mathrm{DGsetup}\left(\mathrm{AD},\left['e','i','j','k'\right],\left['\mathrm{\alpha }'\right]\right)$
 ${\mathrm{algebra name: Qalg}}$ (2.2)

Define a quaternion $X.$

 Qalg > $X≔2e+3i-4j+k$
 ${X}{:=}{2}{}{e}{+}{3}{}{i}{-}{4}{}{j}{+}{k}$ (2.3)

Calculate the norm of $X.$

 Qalg > $\mathrm{AlgebraNorm}\left(X\right)$
 $\sqrt{{30}}$ (2.4)

Calculate the inverse of and check the result.

 Qalg > $Y≔\mathrm{AlgebraInverse}\left(X\right)$
 ${Y}{:=}\frac{{1}}{{15}}{}{e}{-}\frac{{1}}{{10}}{}{i}{+}\frac{{2}}{{15}}{}{j}{-}\frac{{1}}{{30}}{}{k}$ (2.5)
 Qalg > $\mathrm{evalDG}\left(X·Y\right)$
 ${e}$ (2.6)

Example 2.

Use AlgebraData to retrieve the structure equations for the octonions. Call the algebra $\mathrm{Oalg}$.

 > $\mathrm{AD}≔\mathrm{AlgebraLibraryData}\left("Octonions",\mathrm{Oalg}\right)$
 ${\mathrm{AD}}{:=}\left[{{\mathrm{e1}}}^{{2}}{=}{\mathrm{e1}}{,}{\mathrm{e1}}{.}{\mathrm{e2}}{=}{\mathrm{e2}}{,}{\mathrm{e1}}{.}{\mathrm{e3}}{=}{\mathrm{e3}}{,}{\mathrm{e1}}{.}{\mathrm{e4}}{=}{\mathrm{e4}}{,}{\mathrm{e1}}{.}{\mathrm{e5}}{=}{\mathrm{e5}}{,}{\mathrm{e1}}{.}{\mathrm{e6}}{=}{\mathrm{e6}}{,}{\mathrm{e1}}{.}{\mathrm{e7}}{=}{\mathrm{e7}}{,}{\mathrm{e1}}{.}{\mathrm{e8}}{=}{\mathrm{e8}}{,}{\mathrm{e2}}{.}{\mathrm{e1}}{=}{\mathrm{e2}}{,}{{\mathrm{e2}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e2}}{.}{\mathrm{e3}}{=}{\mathrm{e4}}{,}{\mathrm{e2}}{.}{\mathrm{e4}}{=}{-}{\mathrm{e3}}{,}{\mathrm{e2}}{.}{\mathrm{e5}}{=}{\mathrm{e6}}{,}{\mathrm{e2}}{.}{\mathrm{e6}}{=}{-}{\mathrm{e5}}{,}{\mathrm{e2}}{.}{\mathrm{e7}}{=}{-}{\mathrm{e8}}{,}{\mathrm{e2}}{.}{\mathrm{e8}}{=}{\mathrm{e7}}{,}{\mathrm{e3}}{.}{\mathrm{e1}}{=}{\mathrm{e3}}{,}{\mathrm{e3}}{.}{\mathrm{e2}}{=}{-}{\mathrm{e4}}{,}{{\mathrm{e3}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e3}}{.}{\mathrm{e4}}{=}{\mathrm{e2}}{,}{\mathrm{e3}}{.}{\mathrm{e5}}{=}{\mathrm{e7}}{,}{\mathrm{e3}}{.}{\mathrm{e6}}{=}{\mathrm{e8}}{,}{\mathrm{e3}}{.}{\mathrm{e7}}{=}{-}{\mathrm{e5}}{,}{\mathrm{e3}}{.}{\mathrm{e8}}{=}{-}{\mathrm{e6}}{,}{\mathrm{e4}}{.}{\mathrm{e1}}{=}{\mathrm{e4}}{,}{\mathrm{e4}}{.}{\mathrm{e2}}{=}{\mathrm{e3}}{,}{\mathrm{e4}}{.}{\mathrm{e3}}{=}{-}{\mathrm{e2}}{,}{{\mathrm{e4}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e4}}{.}{\mathrm{e5}}{=}{\mathrm{e8}}{,}{\mathrm{e4}}{.}{\mathrm{e6}}{=}{-}{\mathrm{e7}}{,}{\mathrm{e4}}{.}{\mathrm{e7}}{=}{\mathrm{e6}}{,}{\mathrm{e4}}{.}{\mathrm{e8}}{=}{-}{\mathrm{e5}}{,}{\mathrm{e5}}{.}{\mathrm{e1}}{=}{\mathrm{e5}}{,}{\mathrm{e5}}{.}{\mathrm{e2}}{=}{-}{\mathrm{e6}}{,}{\mathrm{e5}}{.}{\mathrm{e3}}{=}{-}{\mathrm{e7}}{,}{\mathrm{e5}}{.}{\mathrm{e4}}{=}{-}{\mathrm{e8}}{,}{{\mathrm{e5}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e5}}{.}{\mathrm{e6}}{=}{\mathrm{e2}}{,}{\mathrm{e5}}{.}{\mathrm{e7}}{=}{\mathrm{e3}}{,}{\mathrm{e5}}{.}{\mathrm{e8}}{=}{\mathrm{e4}}{,}{\mathrm{e6}}{.}{\mathrm{e1}}{=}{\mathrm{e6}}{,}{\mathrm{e6}}{.}{\mathrm{e2}}{=}{\mathrm{e5}}{,}{\mathrm{e6}}{.}{\mathrm{e3}}{=}{-}{\mathrm{e8}}{,}{\mathrm{e6}}{.}{\mathrm{e4}}{=}{\mathrm{e7}}{,}{\mathrm{e6}}{.}{\mathrm{e5}}{=}{-}{\mathrm{e2}}{,}{{\mathrm{e6}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e6}}{.}{\mathrm{e7}}{=}{-}{\mathrm{e4}}{,}{\mathrm{e6}}{.}{\mathrm{e8}}{=}{\mathrm{e3}}{,}{\mathrm{e7}}{.}{\mathrm{e1}}{=}{\mathrm{e7}}{,}{\mathrm{e7}}{.}{\mathrm{e2}}{=}{\mathrm{e8}}{,}{\mathrm{e7}}{.}{\mathrm{e3}}{=}{\mathrm{e5}}{,}{\mathrm{e7}}{.}{\mathrm{e4}}{=}{-}{\mathrm{e6}}{,}{\mathrm{e7}}{.}{\mathrm{e5}}{=}{-}{\mathrm{e3}}{,}{\mathrm{e7}}{.}{\mathrm{e6}}{=}{\mathrm{e4}}{,}{{\mathrm{e7}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e7}}{.}{\mathrm{e8}}{=}{-}{\mathrm{e2}}{,}{\mathrm{e8}}{.}{\mathrm{e1}}{=}{\mathrm{e8}}{,}{\mathrm{e8}}{.}{\mathrm{e2}}{=}{-}{\mathrm{e7}}{,}{\mathrm{e8}}{.}{\mathrm{e3}}{=}{\mathrm{e6}}{,}{\mathrm{e8}}{.}{\mathrm{e4}}{=}{\mathrm{e5}}{,}{\mathrm{e8}}{.}{\mathrm{e5}}{=}{-}{\mathrm{e4}}{,}{\mathrm{e8}}{.}{\mathrm{e6}}{=}{-}{\mathrm{e3}}{,}{\mathrm{e8}}{.}{\mathrm{e7}}{=}{\mathrm{e2}}{,}{{\mathrm{e8}}}^{{2}}{=}{-}{\mathrm{e1}}\right]$ (2.7)

Initialize the algebra of octonions. We shall use the labelling for the basis vectors with being the identity.

 > $\mathrm{DGsetup}\left(\mathrm{AD}\right)$
 ${\mathrm{algebra name: Oalg}}$ (2.8)

Define an octonion $X:$

 Qalg > $X≔2\mathrm{e1}+3\mathrm{e4}-4\mathrm{e5}+6\mathrm{e7}$
 ${X}{:=}{2}{}{\mathrm{e1}}{+}{3}{}{\mathrm{e4}}{-}{4}{}{\mathrm{e5}}{+}{6}{}{\mathrm{e7}}$ (2.9)

Calculate the norm of $X.$

 Qalg > $\mathrm{AlgebraNorm}\left(X\right)$
 $\sqrt{{65}}$ (2.10)

Calculate the inverse of and check the result.

 Qalg > $Y≔\mathrm{AlgebraInverse}\left(X\right)$
 ${Y}{:=}\frac{{2}}{{65}}{}{\mathrm{e1}}{-}\frac{{3}}{{65}}{}{\mathrm{e4}}{+}\frac{{4}}{{65}}{}{\mathrm{e5}}{-}\frac{{6}}{{65}}{}{\mathrm{e7}}$ (2.11)
 Qalg > $\mathrm{evalDG}\left(X·Y\right)$
 ${\mathrm{e1}}$ (2.12)