In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, the Smith normal form (sometimes abbreviated SNF) is a
normal form that can be defined for any
matrix
Matrix (: matrices or matrixes) or MATRIX may refer to:
Science and mathematics
* Matrix (mathematics), a rectangular array of numbers, symbols or expressions
* Matrix (logic), part of a formula in prenex normal form
* Matrix (biology), the m ...
(not necessarily
square
In geometry, a square is a regular polygon, regular quadrilateral. It has four straight sides of equal length and four equal angles. Squares are special cases of rectangles, which have four equal angles, and of rhombuses, which have four equal si ...
) with entries in a
principal ideal domain
In mathematics, a principal ideal domain, or PID, is an integral domain (that is, a non-zero commutative ring without nonzero zero divisors) in which every ideal is principal (that is, is formed by the multiples of a single element). Some author ...
(PID). The Smith normal form of a matrix is
diagonal
In geometry, a diagonal is a line segment joining two vertices of a polygon or polyhedron, when those vertices are not on the same edge. Informally, any sloping line is called diagonal. The word ''diagonal'' derives from the ancient Greek � ...
, and can be obtained from the original matrix by multiplying on the left and right by
invertible
In mathematics, the concept of an inverse element generalises the concepts of opposite () and reciprocal () of numbers.
Given an operation denoted here , and an identity element denoted , if , one says that is a left inverse of , and that ...
square matrices. In particular, the
integers
An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
are a PID, so one can always calculate the Smith normal form of an
integer matrix. The Smith normal form is very useful for working with
finitely generated modules over a PID, and in particular for deducing the structure of a
quotient
In arithmetic, a quotient (from 'how many times', pronounced ) is a quantity produced by the division of two numbers. The quotient has widespread use throughout mathematics. It has two definitions: either the integer part of a division (in th ...
of a
free module
In mathematics, a free module is a module that has a ''basis'', that is, a generating set that is linearly independent. Every vector space is a free module, but, if the ring of the coefficients is not a division ring (not a field in the commu ...
. It is named after the Irish mathematician
Henry John Stephen Smith.
Definition
Let
be a nonzero
matrix over a
principal ideal domain
In mathematics, a principal ideal domain, or PID, is an integral domain (that is, a non-zero commutative ring without nonzero zero divisors) in which every ideal is principal (that is, is formed by the multiples of a single element). Some author ...
. There exist invertible
and
-matrices
(with entries in
) such that the product
is
and the diagonal elements
satisfy
for all
. This is the Smith normal form of the matrix
. The elements
are unique
up to Two Mathematical object, mathematical objects and are called "equal up to an equivalence relation "
* if and are related by , that is,
* if holds, that is,
* if the equivalence classes of and with respect to are equal.
This figure of speech ...
multiplication by a
unit and are called the ''elementary divisors'', ''invariants'', or ''invariant factors''. They can be computed (up to multiplication by a unit) as
:
where
(called ''i''-th ''determinant divisor'') equals the
greatest common divisor
In mathematics, the greatest common divisor (GCD), also known as greatest common factor (GCF), of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers. For two integers , , the greatest co ...
of the determinants of all
minors of the matrix
and
.
Example : For a
matrix,
with
and
.
Algorithm
The first goal is to find invertible square matrices
and
such that the product
is diagonal. This is the hardest part of the algorithm. Once diagonality is achieved, it becomes relatively easy to put the matrix into Smith normal form. Phrased more abstractly, the goal is to show that, thinking of
as a map from
(the free
-module of rank
) to
(the free
-module of rank
), there are
isomorphism
In mathematics, an isomorphism is a structure-preserving mapping or morphism between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between the ...
s
and
such that
has the simple form of a diagonal matrix. The matrices
and
can be found by starting out with identity matrices of the appropriate size, and modifying
each time a row operation is performed on
in the algorithm by the corresponding column operation (for example, if row
is added to row
of
, then column
should be subtracted from column
of
to retain the product invariant), and similarly modifying
for each column operation performed. Since row operations are left-multiplications and column operations are right-multiplications, this preserves the invariant
where
denote current values and
denotes the original matrix; eventually the matrices in this invariant become diagonal. Only invertible row and column operations are performed, which ensures that
and
remain invertible matrices.
For
, write
for the number of prime factors of
(these exist and are unique since any PID is also a
unique factorization domain
In mathematics, a unique factorization domain (UFD) (also sometimes called a factorial ring following the terminology of Bourbaki) is a ring in which a statement analogous to the fundamental theorem of arithmetic holds. Specifically, a UFD is ...
). In particular,
is also a
Bézout domain
In mathematics, a Bézout domain is an integral domain in which the sum of two principal ideals is also a principal ideal. This means that Bézout's identity holds for every pair of elements, and that every finitely generated ideal is principal. ...
, so it is a
gcd domain
In mathematics, a GCD domain (sometimes called just domain) is an integral domain ''R'' with the property that any two elements have a greatest common divisor (GCD); i.e., there is a unique minimal principal ideal containing the ideal generated ...
and the gcd of any two elements satisfies a
Bézout's identity
In mathematics, Bézout's identity (also called Bézout's lemma), named after Étienne Bézout who proved it for polynomials, is the following theorem:
Here the greatest common divisor of and is taken to be . The integers and are called B� ...
.
To put a matrix into Smith normal form, one can repeatedly apply the following, where
loops from 1 to
.
Step I: Choosing a pivot
Choose
to be the smallest column index of
with a non-zero entry, starting the search at column index
if
.
We wish to have
; if this is the case this step is complete, otherwise there is by assumption some
with
, and we can exchange rows
and
, thereby obtaining
.
Our chosen pivot is now at position
.
Step II: Improving the pivot
If there is an entry at position (''k'',''j''
''t'') such that
, then, letting
, we know by the Bézout property that there exist σ, τ in ''R'' such that
:
By left-multiplication with an appropriate invertible matrix ''L'', it can be achieved that row ''t'' of the matrix product is the sum of σ times the original row ''t'' and τ times the original row ''k'', that row ''k'' of the product is another
linear combination
In mathematics, a linear combination or superposition is an Expression (mathematics), expression constructed from a Set (mathematics), set of terms by multiplying each term by a constant and adding the results (e.g. a linear combination of ''x'' a ...
of those original rows, and that all other rows are unchanged. Explicitly, if σ and τ satisfy the above equation, then for
and
(which divisions are possible by the definition of β) one has
:
so that the matrix
:
is invertible, with inverse
:
Now ''L'' can be obtained by fitting
into rows and columns ''t'' and ''k'' of the
identity matrix
In linear algebra, the identity matrix of size n is the n\times n square matrix with ones on the main diagonal and zeros elsewhere. It has unique properties, for example when the identity matrix represents a geometric transformation, the obje ...
. By construction the matrix obtained after left-multiplying by ''L'' has entry β at position (''t'',''j''
''t'') (and due to our choice of α and γ it also has an entry 0 at position (''k'',''j''
''t''), which is useful though not essential for the algorithm). This new entry β divides the entry
that was there before, and so in particular
; therefore repeating these steps must eventually terminate. One ends up with a matrix having an entry at position (''t'',''j''
''t'') that divides all entries in column ''j''
''t''.
Step III: Eliminating entries
Finally, adding appropriate multiples of row ''t'', it can be achieved that all entries in column ''j''
''t'' except for that at position (''t'',''j''
''t'') are zero. This can be achieved by left-multiplication with an appropriate matrix. However, to make the matrix fully diagonal we need to eliminate nonzero entries on the row of position (''t'',''j''
''t'') as well. This can be achieved by repeating the steps in Step II for columns instead of rows, and using multiplication on the right by the
transpose
In linear algebra, the transpose of a Matrix (mathematics), matrix is an operator which flips a matrix over its diagonal;
that is, it switches the row and column indices of the matrix by producing another matrix, often denoted by (among other ...
of the obtained matrix ''L''. In general this will result in the zero entries from the prior application of Step III becoming nonzero again.
However, notice that each application of Step II for either rows or columns must continue to reduce the value of
, and so the process must eventually stop after some number of iterations, leading to a matrix where the entry at position (''t'',''j''
''t'') is the only non-zero entry in both its row and column.
At this point, only the block of ''A'' to the lower right of (''t'',''j''
''t'') needs to be diagonalized, and conceptually the algorithm can be applied recursively, treating this block as a separate matrix. In other words, we can increment ''t'' by one and go back to Step I.
Final step
Applying the steps described above to the remaining non-zero columns of the resulting matrix (if any), we get an
-matrix with column indices
where
. The matrix entries
are non-zero, and every other entry is zero.
Now we can move the null columns of this matrix to the right, so that the nonzero entries are on positions
for
. For short, set
for the element at position
.
The condition of divisibility of diagonal entries might not be satisfied. For any index