[back] [prev] [next] [index] [root]

 


MatSmithTrans

Computes the Smith normal form together with transformation matrices.

Syntax:

L := MatSmithTrans(M);

list
  L  
matrix
  M  

Description:

The MatSmithTrans routine computes the Smith normal form S of the integer matrix M. Additionally it computes the rank of M and transformation matrices A and B such that S = A*{\tt M}* B. The result is a list L which contains the rank, the Smith normal form S and the transformation matrices A and B.


Example:

Compute the upper column Smith normal form of \left(\begin{array}{ccc} 3 & 7 & 10 20 & 25 & 40 17 & 6 & 9 \end{array}right).

kash> M := Mat(Z,[[3,7,10],[20,25,40],[17,6,9]]);
[ 3  7 10]
[20 25 40]
[17  6  9]
kash> L := MatSmithTrans(M);;
kash> rank := L[1];
3
kash> S := L[2];
[  1   0   0]
[  0   1   0]
[  0   0 405]
kash> A := L[3];
[  1   0   0]
[-56 -11   4]
[-70 -14   5]
kash> B := L[4];
[   1    1 -318]
[   4    1 -308]
[  -3   -1  311]
kash> A*M*B;
> [  1   0   0]
[  0   1   0]
[  0   0 405]


<- back[back] [prev] [next] [index] [root]