{
  "id": "smith-normal-form",
  "title": "Smith normal form",
  "lang": "en",
  "source_lang": "en",
  "summary": "The Smith normal form is a canonical diagonal form for matrices over a principal ideal domain, encoding divisibility invariants and the structure of finitely generated modules.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "Smith form",
    "Smith canonical form"
  ],
  "generated_at": "2026-11-06",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/smith-normal-form/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/smith-normal-form/",
      "json": "https://aiwiki.page/zh/smith-normal-form.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The Smith normal form is a diagonal form of a matrix over a principal ideal domain, obtained by invertible row and column transformations, whose nonzero diagonal entries form a divisibility chain. These entries classify the matrix up to changes of bases in its domain and codomain. Over the integers, they can be chosen positive, making the form unique. The construction is a central tool in the classification of finitely generated abelian groups, the study of modules, and the exact solution of integer linear systems."
    },
    {
      "heading": "Definition and existence",
      "text": "Let \\(R\\) be a principal ideal domain, and let \\(A\\in R^{m\\times n}\\). There exist invertible matrices\n\n\\[U\\in \\operatorname{GL}_m(R), \\qquad V\\in \\operatorname{GL}_n(R)\\]\n\nsuch that\n\n\\[UAV=D,\\]\n\nwhere \\(D\\) is the rectangular diagonal matrix\n\n\\[D=\\operatorname{diag}(d_1,d_2,\\ldots,d_r,0,\\ldots,0)\\]\n\nand\n\n\\[d_i\\ne 0, \\qquad d_1\\mid d_2\\mid\\cdots\\mid d_r.\\]\n\nHere, “rectangular diagonal” means that every entry outside positions \\((i,i)\\), for \\(1\\le i\\le r\\), is zero. The integer \\(r\\) is the rank of \\(A\\), calculated over the field of fractions of \\(R\\).\n\nThe elements \\(d_1,\\ldots,d_r\\) are called the invariant factors of \\(A\\). They are unique up to multiplication by units of \\(R\\). Thus the diagonal matrix becomes unique once a convention for choosing representatives of associated elements has been fixed:\n\n- Over \\(\\mathbb Z\\), the nonzero diagonal entries are chosen positive.\n- Over \\(F[x]\\), the ring of polynomials over a field \\(F\\), they are chosen monic.\n\nThe transformation matrices \\(U\\) and \\(V\\) are generally not unique.\n\nFor integer matrices, invertibility over \\(\\mathbb Z\\) is equivalent to having determinant \\(1\\) or \\(-1\\). Such matrices are called unimodular matrices. Requiring integer inverses is essential: arbitrary rational changes of bases would erase the divisibility information that the Smith form preserves."
    },
    {
      "heading": "Matrix equivalence and changes of bases",
      "text": "Two matrices \\(A\\) and \\(B\\) over \\(R\\) are equivalent if\n\n\\[B=UAV\\]\n\nfor invertible \\(U\\) and \\(V\\) over \\(R\\). The Smith normal form completely classifies this equivalence relation: two matrices of the same dimensions are equivalent exactly when their invariant factors agree up to units.\n\nThis is different from matrix similarity, which has the form \\(B=P^{-1}AP\\). Similarity describes one endomorphism under a change of basis, whereas matrix equivalence allows independent changes of bases in the source and target.\n\nIf \\(A\\) represents a homomorphism\n\n\\[A:R^n\\longrightarrow R^m,\\]\n\nthen its Smith form expresses that map in suitable bases as\n\n\\[(x_1,\\ldots,x_n) \\longmapsto (d_1x_1,\\ldots,d_rx_r,0,\\ldots,0).\\]\n\nIt therefore isolates the nonzero components of the map while recording their divisibility properties."
    },
    {
      "heading": "Determinantal divisors and uniqueness",
      "text": "The invariant factors can be characterized without explicitly finding \\(U\\) and \\(V\\).\n\nSet \\(\\Delta_0=1\\). For \\(1\\le k\\le r\\), let \\(\\Delta_k\\) be a greatest common divisor of all \\(k\\times k\\) minors of \\(A\\). These elements are called the determinantal divisors. Over a general principal ideal domain, each is defined up to a unit.\n\nThey satisfy\n\n\\[\\Delta_k=d_1d_2\\cdots d_k,\\]\n\nup to multiplication by a unit. Consequently,\n\n\\[d_k=\\frac{\\Delta_k}{\\Delta_{k-1}}, \\qquad 1\\le k\\le r,\\]\n\nwith compatible choices of representatives.\n\nThe underlying reason is that invertible row and column operations preserve the ideal generated by the \\(k\\times k\\) minors. For a Smith diagonal matrix, the divisibility chain makes this ideal precisely\n\n\\[(d_1d_2\\cdots d_k).\\]\n\nThis also proves uniqueness of the invariant factors up to units.\n\nFor a nonsingular integer \\(n\\times n\\) matrix,\n\n\\[d_1d_2\\cdots d_n=|\\det A|.\\]\n\nThe determinant gives only the product of the invariant factors; smaller minors distinguish matrices with the same determinant."
    },
    {
      "heading": "Examples",
      "text": "Consider\n\n\\[A= \\begin{pmatrix} 2&4\\\\ 6&8 \\end{pmatrix}.\\]\n\nSubtracting three times the first row from the second gives\n\n\\[\\begin{pmatrix} 2&4\\\\ 0&-4 \\end{pmatrix}.\\]\n\nSubtracting twice the first column from the second, then changing the sign of the second row, gives\n\n\\[D= \\begin{pmatrix} 2&0\\\\ 0&4 \\end{pmatrix}.\\]\n\nSince \\(2\\mid4\\), this is the Smith normal form.\n\nThe determinantal-divisor calculation yields the same result:\n\n\\[\\Delta_1=\\gcd(2,4,6,8)=2, \\qquad \\Delta_2=|\\det A|=8.\\]\n\nHence \\(d_1=2\\) and \\(d_2=8/2=4\\).\n\nA diagonal matrix need not already be in Smith normal form. For example,\n\n\\[B=\\begin{pmatrix}6&0\\\\0&10\\end{pmatrix}\\]\n\nfails the divisibility condition. Its invariant factors are\n\n\\[d_1=\\gcd(6,10)=2, \\qquad d_2=\\frac{60}{2}=30,\\]\n\nso its Smith form is \\(\\operatorname{diag}(2,30)\\)."
    },
    {
      "heading": "Construction and algorithms",
      "text": "Over the integers, Smith reduction uses elementary operations:\n\n- interchange two rows or two columns;\n- multiply a row or column by \\(-1\\);\n- add an integer multiple of one row or column to another.\n\nOver a general principal ideal domain, multiplication by any unit is allowed, and invertible transformations built from Bézout identities provide gcd reductions.\n\nOver a Euclidean domain, the procedure resembles the Euclidean algorithm:\n\n- Move a nonzero entry to the upper-left position.\n- Use division and row or column operations to reduce the pivot until it divides all entries in its row and column.\n- Clear the remainder of that row and column.\n- If the pivot does not divide an entry of the remaining block, use that entry to obtain a new pivot associated to a proper divisor of the old one.\n- Once the pivot divides the entire remaining block, repeat on that block.\n\nThe fourth step is necessary. Clearing a row and column alone produces a diagonal decomposition, but does not ensure the required divisibility chain.\n\nThe existence theorem holds over every principal ideal domain, not only Euclidean domains. Its abstract proof uses Bézout identities and the ascending chain condition on ideals rather than relying on a Euclidean division function. Effective computation additionally requires suitable algorithms for the underlying ring.\n\nFor integer matrices, naive implementations can create very large intermediate coefficients. More advanced methods use modular computations, coefficient control, and reconstruction. Computing only the invariant factors may be substantially cheaper than also computing the full transformation matrices. This distinction matters for large sparse matrices, whose transformations can become dense."
    },
    {
      "heading": "Modules and finitely generated abelian groups",
      "text": "The most important interpretation of Smith normal form concerns the module presented by a matrix. Regard the columns of \\(A\\) as relations among \\(m\\) generators. The resulting module is the cokernel\n\n\\[\\operatorname{coker}A=R^m/\\operatorname{im}A.\\]\n\nSmith reduction gives an isomorphism\n\n\\[\\operatorname{coker}A \\cong R^{m-r}\\oplus \\bigoplus_{i=1}^{r}R/(d_i).\\]\n\nHere \\(\\oplus\\) denotes a direct sum, and a unit invariant factor contributes a zero module.\n\nThis yields the structure theorem for finitely generated modules over a principal ideal domain. In particular, every finitely generated abelian group has a decomposition\n\n\\[G\\cong \\mathbb Z^s\\oplus \\mathbb Z/d_1\\mathbb Z\\oplus\\cdots\\oplus \\mathbb Z/d_t\\mathbb Z,\\]\n\nwhere\n\n\\[1<d_1\\mid d_2\\mid\\cdots\\mid d_t.\\]\n\nThe integer \\(s\\) and the listed invariant factors are uniquely determined.\n\nFor the matrix in the first example,\n\n\\[\\mathbb Z^2/A\\mathbb Z^2 \\cong \\mathbb Z/2\\mathbb Z\\oplus\\mathbb Z/4\\mathbb Z.\\]\n\nFactoring the invariant factors into powers of primes produces the elementary-divisor decomposition. The conversion between these decompositions uses the Chinese remainder theorem."
    },
    {
      "heading": "Applications",
      "text": "Integer linear equations\n\nFor a system of linear equations\n\n\\[Ax=b, \\qquad A\\in\\mathbb Z^{m\\times n},\\]\n\nsuppose \\(UAV=D\\). Set\n\n\\[c=Ub, \\qquad x=Vy.\\]\n\nThe system becomes \\(Dy=c\\). It has an integer solution exactly when\n\n\\[d_i\\mid c_i\\quad(1\\le i\\le r), \\qquad c_i=0\\quad(r<i\\le m).\\]\n\nWhen these conditions hold, the first \\(r\\) coordinates of \\(y\\) are fixed and the remaining \\(n-r\\) coordinates are arbitrary integers. Smith form thus provides both solvability criteria for linear Diophantine equations and a parametrization of their solutions.\n\nLattices and subgroup index\n\nIf \\(A\\in\\mathbb Z^{n\\times n}\\) has full rank, its columns generate a finite-index subgroup of \\(\\mathbb Z^n\\). The index is\n\n\\[[\\mathbb Z^n:A\\mathbb Z^n] =\\prod_{i=1}^{n}d_i =|\\det A|.\\]\n\nThe individual invariant factors describe the quotient group more precisely than its order alone.\n\nAlgebraic topology\n\nIn algebraic topology, boundary maps of finite chain complexes are represented by integer matrices. Smith reduction helps compute integral homology groups, including their free ranks and torsion factors.\n\nFor\n\n\\[H_k=\\ker\\partial_k/\\operatorname{im}\\partial_{k+1},\\]\n\nthe two maps must be handled compatibly. When explicit bases or generators are required, changes of basis used for one boundary map must be propagated to the adjacent map; their separate diagonal forms do not by themselves specify those generators.\n\nPolynomial matrices and linear operators\n\nOver \\(F[x]\\), Smith form classifies finitely presented modules over a polynomial ring in one variable. Applying it to\n\n\\[xI-T\\]\n\nfor a square matrix \\(T\\) yields polynomial invariant factors that determine the rational canonical form of \\(T\\). This connects Smith reduction with the classification of linear operators without requiring the characteristic polynomial to split over \\(F\\)."
    },
    {
      "heading": "Scope and distinctions",
      "text": "Smith normal form is an exact algebraic construction, unlike the singular value decomposition, which uses orthogonal or unitary transformations and measures real or complex magnitudes. Smith invariant factors instead encode divisibility in the coefficient ring.\n\nOver a field, every nonzero element is a unit, so Smith form reduces to a diagonal matrix with \\(r\\) ones and all remaining entries zero. Its finer information appears over rings such as \\(\\mathbb Z\\) and \\(F[x]\\).\n\nThe theorem does not extend unchanged to arbitrary rings. Even over an integral domain, not every matrix admits a Smith form. For instance, over \\(F[x,y]\\), the row matrix\n\n\\[\\begin{pmatrix}x&y\\end{pmatrix}\\]\n\ncannot be equivalent to a diagonal row matrix: its entries generate the nonprincipal ideal \\((x,y)\\), whereas the entries of a diagonal row matrix generate a principal ideal."
    },
    {
      "heading": "History",
      "text": "The form is named after Henry John Stephen Smith, who introduced the integer-matrix version in 1861 in work on systems of linear indeterminate equations and congruences. Its later formulation over principal ideal domains made it a standard bridge between matrix computations and the structure theory of modules."
    }
  ],
  "links": [
    "matrix",
    "principal-ideal-domain",
    "integer",
    "abelian-group",
    "module-mathematics",
    "matrix-rank",
    "polynomial",
    "field-mathematics",
    "determinant",
    "equivalence-relation",
    "matrix-similarity",
    "greatest-common-divisor",
    "ideal-ring-theory",
    "euclidean-algorithm",
    "sparse-matrix",
    "isomorphism",
    "direct-sum",
    "prime-number",
    "chinese-remainder-theorem",
    "system-of-linear-equations",
    "diophantine-equation",
    "algebraic-topology",
    "characteristic-polynomial",
    "singular-value-decomposition"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}