linalg(deprecated)
ismith
integer-only Smith normal form
Calling Sequence
Parameters
Description
Examples
ismith(A)
ismith(A, U, V)
A
-
rectangular matrix of integers
U
name
V
Important: The linalg package has been deprecated. Use the superseding packages, LinearAlgebra and VectorCalculus, instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The function ismith computes the Smith normal form S of an n by m rectangular matrix of integers.
If two n by n matrices have the same Smith normal form, they are equivalent.
The Smith normal form is a diagonal matrix where
rank(A) = number of nonzero rows (columns) of S
sign(S[i,i]) = 1 for 0 < i <= rank(A)
S[i,i] divides S[i+1,i+1] for 0 < i < rank(A)
product(S[i,i],i=1..r) divides det(M) for all minors M of rank 0 < r <= rank(A)
Hence if n = m and rank(A) = n then det⁡A=∏i=1n⁡Si,i.
The Smith normal form is obtained by doing elementary row and column operations. This includes interchanging rows (columns), multiplying through a row (column) by -1, and adding integral multiples of one row (column) to another.
Although the rank and determinant can be easily obtained from S this is not an efficient method for computing these quantities except that this may yield a partial factorization of det⁡A without doing any explicit factorizations.
In the case of three arguments, the second argument U and the third argument V will be assigned the transformation matrices on output, such that smith(A) = U &* A &* V.
The command with(linalg,ismith) allows the use of the abbreviated form of this command.
with⁡linalg:
H≔array⁡9,−36,30,−36,192,−180,30,−180,180
H≔9−3630−36192−18030−180180
ismith⁡H
30001200060
A≔array⁡13,5,7,17,31,39
A≔1357173139
B≔ismith⁡A,U,V
B≔100020
eval⁡U
01−11
eval⁡V
−47−11−72127−19459−104159
evalm⁡U&*A&*V−B
000000
See Also
linalg(deprecated)[ihermite]
linalg(deprecated)[smith]
LinearAlgebra
LinearAlgebra[SmithForm]
Download Help Document