Introduction

A quaternion algebra A over a field K is a central simple algebra of dimension four over K, or equivalently when K does not have characteristic 2, an algebra generated by elements i, j which satisfy i2=a, j2=b, ji= - ij with a, b ∈K * . A quaternion algebra in Magma is a specialized type AlgQuat, which is a subtype of associative algebra AlgAss defined over a field. Magma can recognize if an associative algebra A is a quaternion algebra and will return a standard representation for A with a, b as above.

Examples of quaternion algebras include the ring M2(K) of 2 x 2-matrices over K with a=b=1, as well as the division ring of Hamiltonians over K=R with a=b= - 1. Every quaternion algebra over a finite field or an algebraically closed field is isomorphic to M2(K). Over a local field, there is a unique quaternion algebra (up to isomorphism) which is a division ring.

Every quaternion algebra A over K not isomorphic to M2(K) is a division algebra. Finding a zerodivisor in A is computationally equivalent to the problem of finding a K-rational point on a conic. Given a zerodivisor in A, Magma will compute an explicit isomorphism A to M2(K). If L is an extension field of K, then AL=A tensor K L is a quaternion algebra over L, and we say L is a splitting field if AL isomorphic to M2(L). If [L:K]=2, then L is a splitting field if and only if there exists a K-embedding L -> A, and such an embedding can be computed in Magma.

Further functionality is available for quaternion algebras A defined over number fields K. Such an algebra is said to be unramified at a noncomplex place v of K if Kv is a splitting field for A, otherwise A is ramified at v. Testing if an algebra is ramified at a place is encoded in the Hilbert symbol, which can be computed for any such algebra. The set S of ramified places of an algebra is finite and of even cardinality, and conversely, given such a set S there exists a quaternion algebra which is ramified only at S. One may compute the set of ramified places of A as well as constructing an algebra given its ramification set.

In Magma, there are algorithms for quaternion algebras which are analogous to those for number fields---computation of the ring of integers, class group, and unit group. One may compute a maximal order O ⊂A, a p-maximal order for a prime p of K, and orders with given index in a maximal order. Secondly, a representative set of (right) ideal classes in O can be enumerated, and one can test if two ideals are isomorphic (hence if a given ideal is principal). Finally, for a definite quaternion algebra (defined over a totally real field), one may compute the group of units of norm 1 in O. Over Q, these functions tie into machinery for constructing the Brandt module, with applications to modular forms.

Orders for quaternion algebras over the rational numbers and over rational function fields in Magma have type AlgQuatOrd and ideals have type AlgQuatOrdIdl. Over other number rings, orders have the general type AlgAssVOrd and ideals AlgAssVOrdIdl which is also the type for used for associative orders, see Section Orders for information about these orders. The types AlgQuatOrd, AlgQuatOrdElt and AlgQuatOrdIdl inherit from the types AlgAssVOrd, AlgAssVOrdElt and AlgAssVOrdIdl respectively.

The main reference for material in this chapter is the book of Vignéras [Vig80]. Most nontrivial algorithms for quaternion algebras over the rationals and over number fields are described in [KV10].

IMPORTANT WARNING.

In Magma, the rationals are not considered to be a number field (the type FldRat is not a subtype of FldNum). Much of the functionality for quaternion algebras, and particularly for orders in quaternion algebras, is implemented only for algebras whose base field is a FldNum (while some, but not all, also works for algebras over the FldRat). To compute with algebras over Q, in many cases the best solution is to create Q as a number field at the outset, using RationalsAsNumberField(), and create the algebra over this field instead of Rationals().

V2.28, 13 July 2023