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
If X is a quaternion or octonion then the norm of is X = X⋅X ‾ where X ‾ is the conjugate of X.
The inverse of X is X−1 = 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 X−1 = a− bi − cj −dka2 +b2 +c2 +d2.
with⁡DifferentialGeometry:with⁡LieAlgebras:
Example 1.
Use AlgebraLibraryData to retrieve the structure equations for the quaternions. Call the algebra Qalg.
AD≔AlgebraLibraryData⁡Quaternions,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
Initialize the algebra of quaternions.
DGsetup⁡AD,e,i,j,k,α
algebra name: Qalg
Define a quaternion X.
X≔2⁢e+3⁢i−4⁢j+k
X:=2⁢e+3⁢i−4⁢j+k
Calculate the norm of X.
AlgebraNorm⁡X
30
Calculate the inverse of X and check the result.
Y≔AlgebraInverse⁡X
Y:=115⁢e−110⁢i+215⁢j−130⁢k
evalDG⁡X·Y
e
Example 2.
Use AlgebraData to retrieve the structure equations for the octonions. Call the algebra Oalg.
AD≔AlgebraLibraryData⁡Octonions,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
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.
DGsetup⁡AD
algebra name: Oalg
Define an octonion X:
X≔2⁢e1+3⁢e4−4⁢e5+6⁢e7
X:=2⁢e1+3⁢e4−4⁢e5+6⁢e7
65
Y:=265⁢e1−365⁢e4+465⁢e5−665⁢e7
e1
See Also
DifferentialGeometry
Library
LieAlgebras
AlgebraData
DGconjugate
Download Help Document