Julia package of reduced biquaternions.
A reduced biquaternion
where
The absolute value of
The conjugate of
Two basic singular (non-invertible) reduced biquaternions are
pkg> add https://github.com/ivanslapnicar/RBiQuaternions.jl
or, after registering,
pkg> add RBiQuaternions
Basic properties
julia> i=rbiquat(0,1,0,0)
RBiQuaternion{Int64}(0, 1, 0, 0)
julia> j=rbiquat(0,0,1,0)
RBiQuaternion{Int64}(0, 0, 1, 0)
julia> k=rbiquat(0,0,0,1)
RBiQuaternion{Int64}(0, 0, 0, 1)
julia> i^2 == -j^2 == k^2 == i*j*k == -1
true
Multiplication is commutative
julia> a=rbiquat(1,2,3,4)
RBiQuaternion{Int64}(1, 2, 3, 4)
julia> b=rbiquat(5,6,7,8)
RBiQuaternion{Int64}(5, 6, 7, 8)
julia> a*b
RBiQuaternion{Int64}(-18, 68, -18, 60)
julia> b*a
RBiQuaternion{Int64}(-18, 68, -18, 60)
Sqare root and absolute value are well defined
julia> c=√a
RBiQuaternionF64(1.5055993983149454, -0.14333523785320212, 0.8620051454093629, 1.4104387361768351)
julia> abs(c*c-a)
1.0877919644084146e-15
Basic singular quaternions are idempotent and mutually orthogonal
julia> e₁
RBiQuaternionF64(0.5, 0.0, 0.5, 0.0)
julia> e₂
RBiQuaternionF64(0.5, 0.0, -0.5, 0.0)
julia> √e₁==e₁==e₁^2, e₂^2==e₂, e₁*e₂==0
(true, true, true)
Splitting into two complex parts
julia> d=splitc(a)
RBiQuaternions.SplitC{Complex{Int64}}(4 + 6im, -2 - 2im)
julia> d.c1*e₁+d.c2*e₂==a
true