Previous Up Next

6.48.14  Smith normal form in ℤ: ismith

A matrix B is in Smith normal form if the only non-zero entries are on the diagonal (for non-square matrices, this simply means that bij=0 for ij) and bi,i divides bi+1,i+1. The elements bi,i are called invariant factors and are used to describe the structure of finite abelian groups.

For any matrix A with coefficients in ℤ, there exist matrices U and V, invertible in ℤ, such that B=U A V is in Smith normal form and has coefficients in ℤ. The ismith command finds the matrices U, B and V.


Example.
Input:

A:=[[9,-36,30],[-36,192,-180],[30,-180,180]]:;
U,B,V:=ismith(A)

Output:




−301
643
201512



,


300
0120
0060



,


124−30
010
001



The invariant factors are 3, 12 and 60.


Previous Up Next