7.1.2.14 Matrix_integer Objects

class Matrix_integer
Matrix_integer( parent)

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

echelon_form,$  $ elementary_divisors,$  $ hermite_form,$  $ kernel,$  $ rank,$  $ smith_form

Further documentation:

echelon_form( [include_zero_rows=True])

Return the echelon form of this matrix over the integers.

See the hermite_form function for a related transformation matrix.

sage: A = MatrixSpace(IntegerRing(),2)([1,2,3,4])
sage: A.echelon_form()
[0 2]
[1 0]

sage: A = MatrixSpace(IntegerRing(),5)(range(25))
sage: A.echelon_form()
[ 5  4  3  2  1]
[20 15 10  5  0]
[ 0  0  0  0  0]
[ 0  0  0  0  0]
[ 0  0  0  0  0]

elementary_divisors( )

Return the elementary divisors of self, in order.

The elementary divisors are the invariants of the finite abelian group that is the cokernel of this matrix. They are ordered in reverse by divisibility.

INPUT:
    matrix
OUTPUT:
    list of int's

sage: A = MatrixSpace(IntegerRing(), 3)(range(9))
sage: A.elementary_divisors()
[0, 3, 1]

SEE ALSO: smith_form

hermite_form( )

Return matrices $ H$ and $ U$ where $ H$ is Hermite normal form of self over the integers and $ U$ is a unimodular matrix, such that

$\displaystyle U A = H.
$

The matrix $ H$ is lower triangular Hermite normal form:

INPUT:
    self -- matrix
    
OUTPUT:
    H -- the Hermite normal form of self
    U -- unimodular matrix

sage: A = MatrixSpace(IntegerRing(),2)([1,2,3,4])
sage: H, U = A.hermite_form()
sage: H
[1 0]
[0 2]
sage: U
[-2  1]
[ 3 -1]
sage: U.determinant()
-1
sage: U*A
[1 0]
[0 2]

kernel( )

Return the kernel of this matrix, as a module over the integers with LLL reduced basis.

sage: M = MatrixSpace(IntegerRing(),4,2)(range(8))
sage: M.kernel()
Free module of degree 4 and rank 2 over Integer Ring
Echelon basis matrix:
[ 2 -3  0  1]
[ 1 -2  1  0]

rank( )

Return the rank of self, which is the rank of the space spanned by the rows of self.

smith_form( [transformation=False])

Returns matrices S, U, and V such that S = U*self*V, and S is in Smith normal form. Thus S is diagonal with diagonal entries the ordered elementary divisors of S.

The elementary divisors are the invariants of the finite abelian group that is the cokernel of this matrix. They are ordered in reverse by divisibility.

sage: A = MatrixSpace(IntegerRing(), 3)(range(9))
sage: D, U, V = A.smith_form()
sage: D
[0 0 0]
[0 3 0]
[0 0 1]
sage: U
[-1  2 -1]
[ 0 -1  1]
[ 0  1  0]
sage: V
[ 1  4 -1]
[-2 -3  1]
[ 1  0  0]
sage: U*A*V
[0 0 0]
[0 3 0]
[0 0 1]

SEE ALSO: elementary_divisors

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