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

If the characteristic of K isn't 2, return the quaternion algebra (a,b)K defined by i2=a, j2=b, and ij=ji.

If the characteristic of K is 2, return the quaternion algebra [a,b)K defined by i2+i=a, j2=b, and ij=ji+j.

Examples

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

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, ij = -ji

julia> R, x = polynomial_ring(GF(2), "x"); F=fraction_field(R);

julia> Q = quaternion_algebra(F, 0, x)
Quaternion algebra
  over fraction field of R
  defined by i^2 = i+0, j^2 = x, ij = ji+j
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, ij = -ji

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