{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe count the elements of each order and compare with the totient function.\n\n1. Let $p$ be a prime and let $G = (\\Z/p\\Z)^\\times$ be the [[group of units|0F8X8ZRQ53]] of $\\Z/p\\Z$. Write $1$ for its identity $[1]$.\n2. The ring $\\Z/p\\Z$ is a [[field|0NV6E43P4A]], so each nonzero class is a [[unit|019NFGFPR5]].\n3. The class $[0]$ is not a unit, because $[0][x] = [0] \\neq [1]$ for each $x$, as $p \\geq 2$. So $G$ is the set of the $p - 1$ nonzero classes, and $\\abs{G} = p - 1$.\n4. For each positive divisor $d$ of $p - 1$, let $N(d)$ be the number of elements of $G$ of [[order|0WE2NHZJ7B]] $d$.\n5. Each element of the finite group $G$ has an order, and this order [[divides|08V7JHS3QZ]] $\\abs{G} = p - 1$. So $\\sum_{d \\mid p - 1} N(d) = p - 1$.\n6. Fix a positive divisor $d$ of $p - 1$. We show that $N(d) \\leq \\varphi(d)$, where $\\varphi$ is [[Euler's totient function|0VV04M41AN]]. If $N(d) = 0$, this holds, since $\\varphi(d) \\geq 0$.\n7. Otherwise, let $a \\in G$ have order $d$. The powers $a^0, a^1, \\ldots, a^{d-1}$ are $d$ [[distinct elements|031M8HX7DA]] of $G$.\n8. Each power satisfies $(a^k)^d = (a^d)^k = 1$. So each of them is a root of the polynomial $T^d - 1$ in $\\Z/p\\Z$.\n9. The polynomial $T^d - 1$ is nonzero of [[degree|0DPF6WRZW6]] $d$. Since $\\Z/p\\Z$ is a field, it has [[at most $d$ roots|0KJVQV3E0F]] in $\\Z/p\\Z$.\n10. By steps 7 to 9, the roots of $T^d - 1$ in $\\Z/p\\Z$ are exactly $a^0, \\ldots, a^{d-1}$.\n11. Let $b \\in G$ have order $d$. Then $b^d = 1$, so $b$ is a root of $T^d - 1$. By step 10, $b = a^k$ for some $k$ with $0 \\leq k \\leq d - 1$.\n12. By the [[order of a power|0VVPQNVM8S]], $a^k$ has order $d / \\gcd(d, k)$. This equals $d$ if and only if $\\gcd(d, k) = 1$.\n13. The powers in step 7 are distinct, so $N(d)$ is the number of $k$ with $0 \\leq k \\leq d - 1$ and $\\gcd(d, k) = 1$.\n14. Since $\\gcd(d, 0) = d = \\gcd(d, d)$, we may replace $k = 0$ by $k = d$. So $N(d)$ is the number of $k$ with $1 \\leq k \\leq d$ and $\\gcd(d, k) = 1$, which is $\\varphi(d)$.\n15. Thus $N(d) \\leq \\varphi(d)$ for every positive divisor $d$ of $p - 1$.\n16. By step 5, step 15 and the [[sum of the totient over the divisors|09JXE6XMCC]], $p - 1 = \\sum_{d \\mid p - 1} N(d) \\leq \\sum_{d \\mid p - 1} \\varphi(d) = p - 1$.\n17. So the inequality in step 16 is an equality. Each term satisfies $N(d) \\leq \\varphi(d)$, so $N(d) = \\varphi(d)$ for each divisor $d$ of $p - 1$.\n18. In particular, $N(p - 1) = \\varphi(p - 1)$. This is at least $1$, because $k = 1$ satisfies $1 \\leq 1 \\leq p - 1$ and $\\gcd(p - 1, 1) = 1$.\n19. So there is an element $g \\in G$ of order $p - 1$. The subgroup $\\langle g \\rangle$ has $p - 1$ [[distinct elements|031M8HX7DA]].\n20. Since $\\langle g \\rangle \\subseteq G$ and both sets have $p - 1$ elements, $\\langle g \\rangle = G$.\n21. Hence $G = (\\Z/p\\Z)^\\times$ is [[cyclic|0KVGH0J5B3]] of order $p - 1$.\n\n## Idea\n\nIn a field, the equation $x^d = 1$ has at most $d$ solutions. So if one element of order $d$ exists, all elements of order $d$ lie among its powers, and there are exactly $\\varphi(d)$ of them. Thus there are at most $\\varphi(d)$ elements of order $d$. Since the totients of the divisors of $p - 1$ add up to $p - 1$, no order can be missing, not even $p - 1$.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "11A07",
      "20K01"
    ],
    "name": "Proof that the group of units of Z/pZ is cyclic by counting elements of each order",
    "proves": "0QTHB6PE52",
    "sources": [
      {
        "locator": "Section 2, Theorem 2.6",
        "url": "https://kconrad.math.uconn.edu/blurbs/grouptheory/cyclicmodp.pdf"
      }
    ],
    "tag": "G9RVEPQJHM",
    "uses": [
      "0NV6E43P4A",
      "0F8X8ZRQ53",
      "019NFGFPR5",
      "0WE2NHZJ7B",
      "08V7JHS3QZ",
      "031M8HX7DA",
      "0KJVQV3E0F",
      "0DPF6WRZW6",
      "0VVPQNVM8S",
      "0VV04M41AN",
      "09JXE6XMCC",
      "0KVGH0J5B3"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/G9RVEPQJHM/",
  "links": [
    {
      "field": "proves",
      "target": "0QTHB6PE52"
    },
    {
      "field": "uses",
      "target": "0NV6E43P4A"
    },
    {
      "field": "uses",
      "target": "0F8X8ZRQ53"
    },
    {
      "field": "uses",
      "target": "019NFGFPR5"
    },
    {
      "field": "uses",
      "target": "0WE2NHZJ7B"
    },
    {
      "field": "uses",
      "target": "08V7JHS3QZ"
    },
    {
      "field": "uses",
      "target": "031M8HX7DA"
    },
    {
      "field": "uses",
      "target": "0KJVQV3E0F"
    },
    {
      "field": "uses",
      "target": "0DPF6WRZW6"
    },
    {
      "field": "uses",
      "target": "0VVPQNVM8S"
    },
    {
      "field": "uses",
      "target": "0VV04M41AN"
    },
    {
      "field": "uses",
      "target": "09JXE6XMCC"
    },
    {
      "field": "uses",
      "target": "0KVGH0J5B3"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/G9RVEPQJHM.md",
  "msc": [
    "11A07",
    "20K01"
  ],
  "name": "Proof that the group of units of Z/pZ is cyclic by counting elements of each order",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/G9R/G9RVEPQJHM.md",
  "status": null,
  "tag": "G9RVEPQJHM",
  "uri": "m2://G9RVEPQJHM",
  "url": "https://math2.tamnd.com/wiki/proof-that-the-group-of-units-of-z-pz-is-cyclic-by-counting-elements-of-each-order/",
  "writing": {
    "tag": "G9RVEPQJHM",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
