For more information about elements of orders of associative algebras, see Section Orders.
The zero element of the quaternion algebra A.
The identity element of the quaternion algebra A.
Given a quaternion algebra A and an integer 1≤i≤3, returns the ith generator of A as an algebra over the base ring. Note that the element 1 is always the first element of a basis, and is never returned as a generating element.
Return an element of the quaternion algebra A described by x, where x may be an algebra element, a module element, a sequence, an element of an order of an associative algebra or be coercible into the coefficient ring of A.
The sum of x and y.
The difference of x and y.
The product of x and y.
The quotient of x by the unit y in the quaternion algebra.
Returns true if the elements x and y are equal; otherwise false.
Returns true if and only if the elements x and y are not equal.
Returns true if and only if x is in the algebra A.
Returns true if and only if x is not in the algebra A.
The conjugate bar(x) of the element x of a quaternion algebra, defined so that the reduced trace and reduced norm are bar(x) + x and bar(x)x, respectively.
Given an element x of a quaternion algebra or order, this function returns the sequence of coordinates of x in terms of the basis of its parent.
The reduced norm N(x) of the element x of a quaternion algebra, defined so that the characteristic polynomial for x is x2 - Tr(x)x + N(x) = 0, where Tr(x) is the reduced trace.
The reduced trace Tr(x) of the element x of a quaternion algebra, defined so that the characteristic polynomial for x is x2 - Tr(x)x + N(x) = 0, where N(x) is the reduced norm.
The characteristic polynomial of degree 2 for the element x of a quaternion algebra over the base ring of its parent.
The minimal polynomial of degree 1 or 2 for the element x of a quaternion algebra over the base ring of its parent.
> A := QuaternionAlgebra< RationalField() | -17, -271 >; > x := A![1,-2,3,0]; > Trace(x); 2 > Norm(x); 2508 > x^2 - Trace(x)*x + Norm(x); 0Note that trace and norm of an element x of any algebra can be defined as the trace and norm of the linear operator corresponding to right-multiplication by x. The reduced trace and norm in a quaternion algebra A are taken instead to be the corresponding trace and determinant in any two-dimensional matrix representation of A, or equivalently, the sum and product of an element with its conjugate. The definition of norm and trace used for a general algebra can be realised in a quaternion algebra by the following code.
> P<X> := PolynomialRing(RationalField()); > M := RepresentationMatrix(x, A); > M; [ 1 -2 3 0] [ 34 1 0 3] [-813 0 1 2] [ 0 -813 -34 1] > Trace(M); 4 > Factorization(CharacteristicPolynomial(M)); [ <X^2 - 2*X + 2508, 2> ]The general definition of trace (for the algebra) is twice the reduced trace, and the general definition of norm is the square of the reduced norm.