Recognition Functions

A quaternion algebra A over a field K is isomorphic to the matrix ring M2(K) if and only if there exists a zerodivisor ε in A. Given such an ε, we can exhibit an explicit isomorphism; otherwise a zerodivisor will be computed first by finding a point on a conic (see [Vig80, Cor. I.2.4]).

Given an associative algebra, we also have an algorithm to recognize if the algebra is a quaternion algebra, and, if so, return an isomorphism to a quaternion algebra in standard form.

IsMatrixRing(A) : AlgQuat -> BoolElt, AlgMat, Map
    Isomorphism: BoolElt                Default: false
Returns true if and only if the quaternion algebra A with base field F is isomorphic to M2(F), or equivalently if A has no ramified places. The field F has to be Q, Fq(X) (with q odd) or a number field.

If A is isomorphic to M2(F) and Isomorphism is set to true, then M2(F) and an isomorphism A to M2(F) are also returned.

MatrixRing(A, eps) : AlgQuat, AlgQuatElt -> AlgMat, Map
MatrixAlgebra(A, eps) : AlgQuat, AlgQuatElt -> AlgMat, Map
Given a quaternion algebra A and a zerodivisor ε ∈A, the function returns the matrix algebra M2(F) and an isomorphism A to M2(F).

Example AlgQuat_Quaternion_MatrixRing (H93E14)

> A := QuaternionAlgebra<Rationals() | -1, 1>;
> eps := A.3-1;
> MinimalPolynomial(eps), Norm(eps);
x^2 + 2*x
0

Thus, since ε has reduced norm 0, it is a zerodivisor: indeed, ε(ε + 2)=0.

> M2F, phi := MatrixRing(A,eps);
> [<MinimalPolynomial(A.i), MinimalPolynomial(phi(A.i))> : i in [1..3]];
[
    <x^2 + 1, x^2 + 1>,
    <x^2 - 1, x^2 - 1>,
    <x^2 - 1, x^2 - 1>
]
IsQuaternionAlgebra(B) : AlgAss -> BoolElt, AlgQuat, Map
IsQuaternionAlgebra(B) : AlgMat -> BoolElt, AlgQuat, Map
Returns true if and only if the associative algebra B is a quaternion algebra; if true, it returns the associated quaternion algebra A in standard form and an algebra homomorphism from B to A. The algorithm used is [Voi05, Algorithm 4.2.9].

Example AlgQuat_Quaternion_IsQuaternionAlgebra (H93E15)

We create an associative algebra which is known to be a quaternion algebra A and then recover A (or an isomorphic algebra).
> A := AssociativeAlgebra(QuaternionAlgebra<Rationals() | -1,1>);
> vecs := [&+[Random(10)*A.i : i in [1..4]] : j in [1..4]];
> Mchange := Matrix(Rationals(),4,4,&cat[Eltseq(vecs[i]) : i in [1..4]]);
> Mchange := Mchange^(-1);
> seq := [<i,j,k,((vecs[i]*vecs[j])*Mchange)[k]> : i,j,k in [1..4]];
> A := AssociativeAlgebra<Rationals(),4 | seq>;
> bl, Aquat, phi := IsQuaternionAlgebra(A);
> bl;
true
> Aquat;
Quaternion Algebra with base ring Rational Field
> Aquat.1^2, Aquat.2^2;
25 -3924/25
> phi;
Mapping from: AlgAss: A to AlgQuat: Aquat given by a rule

We now verify the functionality when a zerodivisor is encountered.

> A := Algebra(MatrixAlgebra(Rationals(),2));
> IsQuaternionAlgebra(A);
true Quaternion Algebra with base ring Rational Field
Mapping from: AlgAss: A to Quaternion Algebra with base ring Rational Field
given by a rule

The algebra k<x, y> with x2=y2=xy + yx=0 is not semisimple; the ideal generated by x, y is a nontrivial two-sided ideal. Similarly, a commutative algebra is not a quaternion algebra.

> A := Algebra(FPAlgebra<Rationals(), x,y | x^2, y^2, x*y+y*x>);
> IsQuaternionAlgebra(A);
false
> A := Algebra(FPAlgebra<Rationals(), x | x^4+x^2+1>);
> IsQuaternionAlgebra(A);
false

In characteristic 2, the algorithm also performs correctly, both for an associative but non-quaternion algebra and for the "universal" example of a quaternion algebra.

> A := Algebra(FPAlgebra<GF(2), x,y | x^2, y^2, x*y+y*x+1>);
> IsQuaternionAlgebra(A);
false
> F<a,b,x,y,z,w> := FieldOfFractions(PolynomialRing(GF(2),6));
> M := [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1],
>       [0,1,0,0],[a,1,0,0],[0,0,0,1],[0,0,a,1],
>       [0,0,1,0],[0,0,1,1],[b,0,0,0],[b,b,0,0],
>       [0,0,0,1],[0,0,a,0],[0,b,0,0],[a*b,0,0,0]];
> A<alpha,beta> := AssociativeAlgebra<F,4 | M>;
> alpha^2+alpha+a;
(0 0 0 0)
> beta^2+b;
(0 0 0 0)
>
> bl, Aquat, phi := IsQuaternionAlgebra(A);
> bl;
true
> Aquat;
Quaternion Algebra with base ring Multivariate rational function field of
rank 6 over GF(2)
> theta := phi(x+y*alpha+z*beta+w*alpha*beta);
> Trace(theta);
y
> Norm(theta);
a*b*w^2 + a*y^2 + b*z^2 + b*z*w + x^2 + x*y
MatrixRepresentation(A) : AlgQuat -> Map
MatrixRepresentation(R) : AlgQuatOrd -> Map
Given a quaternion algebra A over Q or a quaternion order R over Z, this function returns a 2 x 2-matrix representation of A, defined over a quadratic extension.
V2.28, 13 July 2023