← LibraryThe Smith Normal Form AlgorithmEngineering · MathematicsLesson 242/385← PrevNext →
ArticlePublished 7 Aug 20262 min readBy Kevin JoginSmith normal forminvariant factorselementary divisorsdiagonal form

Integer Matrix Normal Forms

The Smith Normal Form Algorithm

The Smith normal form, its computation by alternating row and column reduction, and the invariant factors it exposes.

Engineering / MathematicsInteger Matrix Normal Forms2 min readKV-MATH-0540

Where the Hermite normal form describes how a submodule sits inside an ambient module, the Smith normal form forgets the embedding and exposes the isomorphism class of the quotient.

Definition

A matrix is in Smith normal form when it is diagonal and each diagonal entry divides the next. The diagonal entries are the invariant factors and are uniquely determined by the matrix.

diag(d_1, d_2, ..., d_r, 0, ..., 0), d_1 | d_2 | ... | d_rThe divisibility chain makes the form unique.

Computation

Smith normal form

  1. Find a small pivotMove the entry of smallest absolute value to the corner.
  2. Clear the row and columnReduce all other entries in the first row and column using the pivot.
  3. Handle non-divisibilityIf some remaining entry is not divisible by the pivot, add its row to the first and repeat — the pivot strictly decreases, guaranteeing termination.
  4. RecurseApply the same procedure to the remaining submatrix.
  5. Enforce divisibilityAdjust adjacent diagonal pairs so each divides the next.

Reading the structure

If a subgroup of a free abelian group of rank n is presented by a matrix whose Smith normal form has invariant factors, the quotient group decomposes accordingly.

Quotient = Z/d_1 x Z/d_2 x ... x Z/d_r x Z^(n-r)Invariant factors equal to one contribute trivial factors.
Reading group structure from the Smith normal form
Feature of the formMeaning for the quotient
Number of non-zero diagonal entriesRank of the subgroup
Entries equal to oneContribute nothing; discard
Entries greater than oneThe cyclic factors
Zero columnsFree part of the quotient
Product of non-zero entriesOrder of the torsion subgroup

Cost and growth

Practical note

Source. Henri Cohen, A Course in Computational Algebraic Number Theory, Springer GTM 138 — 2.4.4. Structural reference unverified: the source file was not available during authoring; chapter and section numbers are taken from the published edition and have not been checked against a physical copy.

Continue learning

Applications of the Hermite Normal FormArticle · MathematicsNEXT LESSON →Recovering Abelian Group Structure from a Relation MatrixArticle · MathematicsCoefficient Explosion in Hermite Normal Form ComputationArticle · MathematicsLLL-Based Hermite Normal Form ComputationArticle · Mathematics