AlgebraInverse - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


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

Examples

Description

• 

If X  is a quaternion or octonion then the norm of is X = XX  where X  is the conjugate of X.

• 

The inverse of X is X1 = X _/X2.

• 

For example, if X is the quaternion X=a + bi + cj +dk, then X  = a  bi  cj dk, X = a2 +b2  +c2  +d2 and X1 =  a bi  cj dka2 +b2  +c2  +d2.

Examples

withDifferentialGeometry:withLieAlgebras:

 

Example 1.

Use AlgebraLibraryData to retrieve the structure equations for the quaternions. Call the algebra Qalg.

ADAlgebraLibraryDataQuaternions,Qalg

AD:=e12=e1,e1.e2=e2,e1.e3=e3,e1.e4=e4,e2.e1=e2,e22=e1,e2.e3=e4,e2.e4=e3,e3.e1=e3,e3.e2=e4,e32=e1,e3.e4=e2,e4.e1=e4,e4.e2=e3,e4.e3=e2,e42=e1

(2.1)

 

Initialize the algebra of quaternions.

DGsetupAD,e,i,j,k,α

algebra name: Qalg

(2.2)

 

Define a quaternion X.

Qalg > 

X2e+3i4j+k

X:=2e+3i4j+k

(2.3)

 

Calculate the norm of X.

Qalg > 

AlgebraNormX

30

(2.4)

 

Calculate the inverse of X and check the result.

Qalg > 

YAlgebraInverseX

Y:=115e110i+215j130k

(2.5)
Qalg > 

evalDGX·Y

e

(2.6)

 

Example 2.

Use AlgebraData to retrieve the structure equations for the octonions. Call the algebra Oalg.

ADAlgebraLibraryDataOctonions,Oalg

AD:=e12=e1,e1.e2=e2,e1.e3=e3,e1.e4=e4,e1.e5=e5,e1.e6=e6,e1.e7=e7,e1.e8=e8,e2.e1=e2,e22=e1,e2.e3=e4,e2.e4=e3,e2.e5=e6,e2.e6=e5,e2.e7=e8,e2.e8=e7,e3.e1=e3,e3.e2=e4,e32=e1,e3.e4=e2,e3.e5=e7,e3.e6=e8,e3.e7=e5,e3.e8=e6,e4.e1=e4,e4.e2=e3,e4.e3=e2,e42=e1,e4.e5=e8,e4.e6=e7,e4.e7=e6,e4.e8=e5,e5.e1=e5,e5.e2=e6,e5.e3=e7,e5.e4=e8,e52=e1,e5.e6=e2,e5.e7=e3,e5.e8=e4,e6.e1=e6,e6.e2=e5,e6.e3=e8,e6.e4=e7,e6.e5=e2,e62=e1,e6.e7=e4,e6.e8=e3,e7.e1=e7,e7.e2=e8,e7.e3=e5,e7.e4=e6,e7.e5=e3,e7.e6=e4,e72=e1,e7.e8=e2,e8.e1=e8,e8.e2=e7,e8.e3=e6,e8.e4=e5,e8.e5=e4,e8.e6=e3,e8.e7=e2,e82=e1

(2.7)

 

Initialize the algebra of octonions. We shall use the labelling e1, e2, e3, e4, e5, e6, e7 for the basis vectors with e1 being the identity.

DGsetupAD

algebra name: Oalg

(2.8)

 

Define an octonion X:

Qalg > 

X2e1+3e44e5+6e7

X:=2e1+3e44e5+6e7

(2.9)

 

Calculate the norm of X.

Qalg > 

AlgebraNormX

65

(2.10)

 

Calculate the inverse of X and check the result.

Qalg > 

YAlgebraInverseX

Y:=265e1365e4+465e5665e7

(2.11)
Qalg > 

evalDGX·Y

e1

(2.12)

See Also

DifferentialGeometry

Library

LieAlgebras

AlgebraData

DGconjugate