5.4.1.4 Matrix_rational_dense Objects

class Matrix_rational_dense
The Matrix_rational_dense class derives from Matrix, and defines functionality for dense matrices over the field $ \mathbf{Q}$ of rational numbers.
Matrix_rational_dense( parent, [entries=True], [coerce_entries=True], [copy=0])

Instances of class Matrix_rational_dense have the following methods (in addition to inherited methods and special methods):

charpoly,$  $ hessenberg_form,$  $ iterates

These methods are defined as follows:

charpoly( [bound=None])

Return the characteristic polynomial of this matrix, computed using the standard multimodular Hessenberg algorithm.

The multimodular algorithm works by first computing a bound B, then computing the characteristic polynomial (using Hessenberg form) modulo enough primes so that their product is bigger than B. One then uses the Chinese Remainder Theorem to recover the characteristic polynomial. If the optional bound is specified, that bound is used for B instead of a potentially much worse general bound.

hessenberg_form( )

Return the Hessenberg form of this matrix.

iterates( v, n)

Let A be this matrix. Return a matrix with rows

$\displaystyle v, Av, A^2v, ..., A^(n-1)v.
$

Instances of class Matrix_rational_dense also have the following special methods:

__getitem__( ij)

Use A[i,j] to obtain the the $ (i,j)$ th entry of $ A$ , and A[i] to obtain the $ i$ -th row of $ A$ .

__setitem__( ij, x)

Use A[i,j]=x to set the $ (i,j)$ th entry of $ A$ to $ x$ , and A[i]=v to set the $ i$ th row of $ A$ to the entries of $ v$ .

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