31.2 Quaternion algebra elements

Module: sage.algebras.quaternion_algebra_element

Quaternion algebra elements

Class: QuaternionAlgebraElement

class QuaternionAlgebraElement
QuaternionAlgebraElement( self, H, x)

Create the element x of the quaternion algebra H.

Functions: additive_order,$ \,$ characteristic_polynomial,$ \,$ charpoly,$ \,$ conjugate,$ \,$ is_pure,$ \,$ is_scalar,$ \,$ is_unit,$ \,$ minimal_polynomial,$ \,$ minpoly,$ \,$ pure_part,$ \,$ reduced_norm,$ \,$ reduced_trace,$ \,$ scalar_part

characteristic_polynomial( self, var)

Return the characteristic polynomial of this element in terms of the given variable.

sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
sage: x=3*i-j+2
sage: x.charpoly('t')
t^2 - 4*t + 51

charpoly( self, var)

Return the characteristic polynomial of this element in terms of the given variable.

sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
sage: x=3*i-j+2
sage: x.charpoly('t')
t^2 - 4*t + 51

conjugate( self)

Return the conjugate of this element.

sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
sage: x=3*i-j+2
sage: x.conjugate()
2 - 3*i + j

is_pure( self)

Return True is this element of a quaternion algebra is "pure" (i.e. has no scalar component, or has reduced-trace zero).

sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
sage: i.is_pure()
True
sage: (i-5+j*k).is_pure()
False
sage: A(12).is_pure()
False

is_scalar( self)

Return True is this element of a quaternion algebra is a scalar (i.e. lies in the base field).

sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
sage: i.is_scalar()
False
sage: (i-5+j*k).is_scalar()
False
sage: A(12).is_scalar()
True

is_unit( self)

Return True if the element is an invertible element of the quaternion algebra.

sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
sage: i.is_unit()
True
sage: (i-5+j*k).is_unit()
True
sage: A(0).is_unit()
False

minimal_polynomial( self, var)

Return the minimal polynomial of this element in terms of the given variable.

sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
sage: x=3*i-j+2
sage: x.minpoly('t')
t^2 - 4*t + 51

minpoly( self, var)

Return the minimal polynomial of this element in terms of the given variable.

sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
sage: x=3*i-j+2
sage: x.minpoly('t')
t^2 - 4*t + 51

pure_part( self)

Return the part of the quaternion 'self' that lies in the vector subspace "<i,j,k>" (figuratively speaking). We just strip off the scalar part...

sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
sage: x = A([1,-3/2,0,2])
sage: x.pure_part()
 -3/2*i + 2*k

reduced_norm( self)

Return the reduced norm of this element.

sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
sage: x=3*i-j+2
sage: x.reduced_norm()
51

reduced_trace( self)

Return the reduced trace of this element.

Note: In a quaternion algebra $ A$ , every element $ x$ is quadratic over the center, thus $ x^2 = \Tr (x)*x - \Nr (x)$ , so we solve for a linear relation $ (1,-\Tr (x),\Nr (x))$ among $ [x^2, x, 1]$ for the reduced trace of $ x$ .

sage: A.<i,j,k>=QuaternionAlgebra(QQ,-5,-2)
sage: x=3*i-j+2
sage: x.reduced_trace()
4

scalar_part( self)

Return the part of the quaternion 'self' that lies in the base field/ring. This is given by the reduced trace (note: we assume characteristic not 2). We could cheat, using self.vector(), but we really don't know what basis is in place. Do we?

sage: A.<i,j,k> = QuaternionAlgebra(QQ,-1,-1)
sage: i.scalar_part()
0
sage: x = A([1,-3/2,0,2])
sage: x.scalar_part()
 1

Special Functions: __cmp__,$ \,$ __init__,$ \,$ _backslash_,$ \,$ _div_

_backslash_( self, other)

Left division in the quaternion algebra

sage: A.<i,j,k>=QuaternionAlgebra(QQ,-1,-1)
sage: x=3*i-j+2
sage: y=i-1
sage: x\y
1/14 + 5/14*i - 1/14*j - 1/14*k

_div_( self, other)

Right division in the quaternion algebra

sage: A.<i,j,k>=QuaternionAlgebra(QQ,-1,-1)
sage: x=3*i-j+2
sage: y=i-1
sage: x/y
1/2 - 5/2*i + 1/2*j - 1/2*k

Note that 1/x will raise an AttributeError. The way to get the inverse of x is

sage: A(1)/x
1/7 - 3/14*i + 1/14*j

Class: QuaternionAlgebraElement_fast

class QuaternionAlgebraElement_fast
QuaternionAlgebraElement_fast( self, H, x)

Functions: conjugate

Special Functions: __init__,$ \,$ _add_,$ \,$ _mul_,$ \,$ _neg_,$ \,$ _sub_

See About this document... for information on suggesting changes.