Skip to content

Quaternion algebras

We provide a model for quaternion algebras over a field K in standard form, which is parametrized by two elements a,bK. The corresponding quaternion algebra has a basis 1,i,j,k satisfying i2=a, j2=b and ij=ji=k.

This functionality is currently restricted to fields of characteristic not equal to two.

Creation

quaternion_algebra Method
julia
quaternion_algebra(K::Field, a, b) -> QuaternionAlgebra

Return the quaternion algebra (a,b|K) defined by i2=a, j2=b.

At the moment, the field must have characteristic not equal to 2.

Examples

julia
julia> Q = quaternion_algebra(QQ, -1, -1)
Quaternion algebra
  over rational field
  defined by i^2 = -1, j^2 = -1

julia> K, sqrt2 = quadratic_field(2);

julia> Q = quaternion_algebra(K, sqrt2, -1)
Quaternion algebra
  over real quadratic field defined by x^2 - 2
  defined by i^2 = sqrt(2), j^2 = -1
source

Arithmetic of elements

conjugate Method
julia
conjugate(a::AssociativeAlgebraElem{_, QuaternionAlgebra})
                             -> AssociativeAlgebraElem{_, QuaternionAlgebra}

Return the image of a under the canonical involution of the quaternion algebra.

Examples

julia
julia> Q = quaternion_algebra(QQ, -1, -1); a = Q([1, 1, 1, 1])
1 + i + j + k

julia> conjugate(a)
1 - i - j - k
source
trred Method
julia
trred(x::AbstractAssociativeAlgebraElem{T}) where T -> T

Returns the reduced trace of x.

source
normred Method
julia
normred(x::AbstractAssociativeAlgebraElem{T}) where T -> T

Returns the reduced norm of x.

source
reduced_charpoly Method
julia
reduced_charpoly(a::AbstractAssociativeAlgebraElem) -> PolyRingElem

Returns the reduced characteristic polynomial of a as a polynomial over base_ring(algebra(a)).

source

Example

julia
julia> Q = quaternion_algebra(QQ, -1, -1)
Quaternion algebra
  over rational field
  defined by i^2 = -1, j^2 = -1

julia> z = Q([1, 2, 0, 1//3])
1 + 2*i + 1//3*k

julia> trred(z)
2

julia> normred(z)
46//9

julia> reduced_charpoly(z)
x^2 - 2*x + 46//9

julia> m = reduced_charpoly(z)
x^2 - 2*x + 46//9

julia> m(z)
0

Splitting of quaternion algebras

is_split_with_zero_divisor Function
julia
is_split_with_zero_divisor(A::QuaternionAlgebra) -> Bool, AssociativeAlgebraElem

Given a quaternion algebra A, return whether A is split together with an element, which is a zero-divisor in case A is split.

Examples

julia
julia> A = quaternion_algebra(QQ, 1, 4);

julia> is_split_with_zero_divisor(A)
(true, 1 + i)

julia> A = quaternion_algebra(QQ, -1, -1);

julia> is_split_with_zero_divisor(A)
(false, 0)
source