{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Summary\n\nCasting out nines is a method to check a computation with integers by the remainders modulo $9$.\nIt uses the fact that a natural number is [[congruent|0TPW25CBN6]] modulo $9$ to the sum of its decimal digits.\nTo check $a \\cdot b = c$, one compares the digit sum of $c$ with the product of the digit sums of $a$ and $b$, all modulo $9$. The same works for sums and differences.\n\n## Remarks\n\nIf the two results are not congruent modulo $9$, the computation is wrong. If they are congruent, the computation can still be wrong. For example, an exchange of two digits in the result is not detected.\nThe method works because of [[divisibility by 9|0ESHD7ZQDX]] and the compatibility of congruences with [[addition|00FWBN7F0Y]] and [[multiplication|072D5G4SK6]].\n\n## Explanations\n\n### L1 human\n\nCheck $46 \\cdot 37 = 1702$. The digit sums are $10 \\equiv 1$ and $10 \\equiv 1$, so the product should be $1 \\cdot 1 = 1$ modulo $9$.\nThe digit sum of $1702$ is $10 \\equiv 1$, so the check passes.\nA wrong result such as $1712$ has the digit sum $11 \\equiv 2$, so the check finds the error.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "kind": "concept",
    "msc": [
      "11A63"
    ],
    "name": "Casting out nines",
    "same_as": {
      "wikidata": "Q1757155",
      "wikipedia": "Casting out nines"
    },
    "sources": [
      {
        "locator": "Checking calculations by casting out nines",
        "url": "https://en.wikipedia.org/wiki/Casting_out_nines"
      }
    ],
    "tag": "0E7W0EM6J6"
  },
  "kind": "concept",
  "link": "https://math2.tamnd.com/node/0E7W0EM6J6/",
  "links": null,
  "markdown": "https://math2.tamnd.com/node/0E7W0EM6J6.md",
  "msc": [
    "11A63"
  ],
  "name": "Casting out nines",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0E7/0E7W0EM6J6.md",
  "status": null,
  "tag": "0E7W0EM6J6",
  "uri": "m2://0E7W0EM6J6",
  "url": "https://math2.tamnd.com/wiki/casting-out-nines/",
  "writing": {
    "tag": "0E7W0EM6J6",
    "kind": "concept",
    "level": "W1",
    "next": [
      {
        "what": "edge defines in",
        "note": "at least one definition",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge instance_of in",
        "note": "at least two examples",
        "have": 0,
        "want": 2
      },
      {
        "what": "edge not_instance_of in",
        "note": "at least one non-example",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge specializes both",
        "note": "the more general notions and the special cases",
        "have": 0,
        "want": 1
      }
    ]
  }
}
