We provide a model for quaternion algebras over a field K in standard form, which is parametrized by two elements a,b∈K. 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.
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> 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