smithForm

Smith normal form of an integer matrix.

Category: Mathematics > Linear Algebra

Syntax

D = smithForm(A)

Returns the diagonal Smith form of A.

[U, V, D] = smithForm(A)

Also returns unimodular matrices with U*A*V == D.

Description

The diagonal entries, the invariant factors of A, describe the structure of the integer lattice and of the quotient group Z^n / A*Z^n. The product of the diagonal equals the absolute value of det(A) for a square nonsingular matrix.

Input arguments

A
Matrix of integers.

Output arguments

D
Diagonal matrix in which each diagonal entry divides the next.
U, V
Integer matrices of determinant 1 or -1.

Example

Invariant factors

A = sym([2 4; 6 8]);
D = smithForm(A)
[U, V, D2] = smithForm(A);
U*A*V
Output
D = 
[2, 0]
[0, 4]
ans = 
[2, 0]
[0, 4]

Notes

MatLivre handles integer matrices only.

See also

hermiteForm det svd rank