{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $R$ be a [[principal ideal domain|0CMD0BCH8T]], and let $A$ be an $m \\times n$ matrix over $R$.\nThen there are an [[invertible|0EB9N0S33C]] $m \\times m$ matrix $P$ and an invertible $n \\times n$ matrix $Q$ over $R$, an integer $r \\ge 0$, and nonzero $d_1, \\dots, d_r \\in R$ such that:\n\n1. $PAQ$ is the $m \\times n$ matrix with diagonal entries $d_1, \\dots, d_r, 0, \\dots, 0$ and all other entries $0$;\n2. $d_i$ [[divides|0PG2H7WKGG]] $d_{i+1}$ for $1 \\le i \u003c r$.\n\nThe number $r$ is the rank of $A$, and the elements $d_1, \\dots, d_r$ are unique up to multiplication by units of $R$.\n\n## Remarks\n\nOver a Euclidean domain such as $\\Z$ or $F[x]$, the proof is an algorithm.\nRow and column operations move an entry of smallest size to the top left corner.\nDivision with remainder then reduces the rest of its row and column.\nThis is repeated until the corner entry divides all other entries.\nThen the process continues on the remaining block.\nUniqueness follows because $d_1 d_2 \\cdots d_k$ is a [[greatest common divisor|0C8WYW4KYQ]] of the $k \\times k$ [[minors|0BT9BYWVRY]] of $A$, and this gcd does not change under multiplication by invertible matrices.\n\nExample over $\\Z$: for $A = \\begin{pmatrix} 2 \u0026 4 \\\\ 6 \u0026 8 \\end{pmatrix}$, the gcd of the entries is $2$ and $\\det A = -8$.\nSo $d_1 = 2$ and $d_1 d_2 = 8$ up to sign, and the Smith normal form is $\\operatorname{diag}(2, 4)$.\n\nThe hypothesis that $R$ is a principal ideal domain is needed.\nOver $\\Z[x]$, the $1 \\times 2$ matrix $(2 \\;\\; x)$ has no Smith normal form: $d_1$ would generate the ideal $(2, x)$, which is not principal.\n\nThe $d_i$ are the [[invariant factors|0WHCA4SVP2]] of $A$.\n\n## Explanations\n\n### L1 human\n\nAny matrix over the integers can be brought to diagonal form by invertible integer row and column operations.\nMoreover, each diagonal entry divides the next one, and these entries do not depend on the choice of operations.\nThey are a complete set of invariants of the matrix up to such operations.\n\n### L2 human\n\nThe Smith normal form of a presentation matrix gives the structure theorem for finitely generated modules over a principal ideal domain.\nFor $R = \\Z$ this is the [[structure theorem for finitely generated abelian groups|0RY0B72XAS]].\nApplied to $xI - M$ over $F[x]$, it gives the invariant factors of a square matrix $M$ over a field $F$, hence the rational canonical form.\nTwo square matrices $M$ and $N$ over $F$ are similar if and only if $xI - M$ and $xI - N$ have the same Smith normal form.\n",
  "commit": "5fc425f97f1f6b11da5892c2948ef8c5d8805665",
  "front": {
    "about": [
      "0WHCA4SVP2"
    ],
    "kind": "statement",
    "msc": [
      "15A21",
      "13F10",
      "15B36"
    ],
    "name": "Smith normal form",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q7545384",
      "wikipedia": "Smith normal form"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Smith_normal_form"
      }
    ],
    "tag": "MV28Z5N9XX",
    "uses": [
      "0CMD0BCH8T",
      "0EB9N0S33C",
      "0PG2H7WKGG",
      "0BT9BYWVRY",
      "0C8WYW4KYQ",
      "0WHCA4SVP2"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/MV28Z5N9XX/",
  "links": [
    {
      "field": "about",
      "target": "0WHCA4SVP2"
    },
    {
      "field": "uses",
      "target": "0CMD0BCH8T"
    },
    {
      "field": "uses",
      "target": "0EB9N0S33C"
    },
    {
      "field": "uses",
      "target": "0PG2H7WKGG"
    },
    {
      "field": "uses",
      "target": "0BT9BYWVRY"
    },
    {
      "field": "uses",
      "target": "0C8WYW4KYQ"
    },
    {
      "field": "uses",
      "target": "0WHCA4SVP2"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/MV28Z5N9XX.md",
  "msc": [
    "15A21",
    "13F10",
    "15B36"
  ],
  "name": "Smith normal form",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/MV2/MV28Z5N9XX.md",
  "status": null,
  "tag": "MV28Z5N9XX",
  "uri": "m2://MV28Z5N9XX",
  "url": "https://math2.tamnd.com/wiki/smith-normal-form/",
  "writing": {
    "tag": "MV28Z5N9XX",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
