{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe argue by induction on the number of terms. All computations take place in the [[ordered field|0QSPNASE50]] $\\R$.\n\n1. For nonnegative reals $x_1, \\dots, x_n$, let $P = x_1 \\cdots x_n$ and $\\mu = (x_1 + \\dots + x_n)/n$. Then $P \\ge 0$ and $\\mu \\ge 0$.\n2. The geometric mean $g = \\sqrt[n]{P}$ is the real number $g \\ge 0$ with $g^n = P$.\n3. Lemma. If $0 \\le a \u003c b$ and $n \\ge 1$, then $a^n \u003c b^n$. For $n = 1$ this is the hypothesis. If $a^n \u003c b^n$, then $a^{n+1} = a^n a \\le a^n b \u003c b^n b = b^{n+1}$, since $a^n \\ge 0$ and $b \u003e 0$.\n4. Claim $C(n)$: for all nonnegative $x_1, \\dots, x_n$, we have $P \\le \\mu^n$, and $P \u003c \\mu^n$ unless all $x_i$ are equal. We prove $C(n)$ for each $n \\ge 1$ by induction.\n5. Base case $n = 1$. Then $P = x_1 = \\mu$, and the single number is equal to itself.\n6. Induction step. Assume $C(n)$ for some $n \\ge 1$. Let $x_1, \\dots, x_{n+1} \\ge 0$ have product $P$ and mean $\\mu$.\n7. If all $x_i$ are equal, then each equals $\\mu$, and $P = \\mu^{n+1}$.\n8. Suppose not all $x_i$ are equal. Then some $x_k \\ne \\mu$. Say $x_k \u003e \\mu$. If all $x_i \\ge \\mu$, the sum exceeds $(n+1)\\mu$, which is false. So some $x_j \u003c \\mu$. The case $x_k \u003c \\mu$ is the same with the inequalities reversed.\n9. Reorder the numbers so that $x_n \u003e \\mu$ and $x_{n+1} \u003c \\mu$. This changes neither $P$ nor $\\mu$. Also $\\mu \u003e x_{n+1} \\ge 0$, so $\\mu \u003e 0$.\n10. Let $y = x_n + x_{n+1} - \\mu$. Then $y \\ge x_n - \\mu \u003e 0$.\n11. The $n$ numbers $x_1, \\dots, x_{n-1}, y$ have sum $(n+1)\\mu - \\mu = n \\mu$, so their mean is $\\mu$.\n12. Let $Q = x_1 \\cdots x_{n-1}$, with $Q = 1$ when $n = 1$. Then $Q \\ge 0$. By $C(n)$ for the numbers of step 11, $Q y \\le \\mu^n$.\n13. Expand both sides to check that $\\mu y - x_n x_{n+1} = (x_n - \\mu)(\\mu - x_{n+1})$. Both factors are positive by step 9, so $x_n x_{n+1} \u003c \\mu y$.\n14. If $Q = 0$, then $P = 0 \u003c \\mu^{n+1}$, by step 9.\n15. If $Q \u003e 0$, then by steps 13 and 12, $P = Q x_n x_{n+1} \u003c Q \\mu y = \\mu (Q y) \\le \\mu \\cdot \\mu^n = \\mu^{n+1}$.\n16. Steps 7, 14 and 15 prove $C(n+1)$. By induction, $C(n)$ holds for each $n \\ge 1$.\n17. Now let $g = \\sqrt[n]{P}$. If $g \u003e \\mu$, the lemma gives $P = g^n \u003e \\mu^n$, against $C(n)$. So $g \\le \\mu$.\n18. If all $x_i$ equal some $c$, then $P = c^n$ and $\\mu = c$. Two distinct nonnegative numbers have distinct $n$th powers, by the lemma. Since $c \\ge 0$ and $c^n = P = g^n$, we get $g = c$. So $g = \\mu$.\n19. If not all $x_i$ are equal, then $P \u003c \\mu^n$ by $C(n)$. If $g = \\mu$, then $P = \\mu^n$, which is false. So $g \u003c \\mu$.\n20. Thus $\\sqrt[n]{x_1 \\cdots x_n} \\le (x_1 + \\dots + x_n)/n$, with equality if and only if $x_1 = \\dots = x_n$.\n\n## Idea\n\nIf the numbers are not all equal, take one above the mean and one below it. Replace them by a single number that keeps the mean. This reduces the count by one, and the product of the two old numbers is less than the mean times the new one.\n",
  "commit": "68a8c3dc73fd55004b2796431c607c30960d1a85",
  "front": {
    "kind": "proof",
    "methods": [
      "0ASJVEFA9J"
    ],
    "msc": [
      "26E60"
    ],
    "name": "Proof of the inequality of arithmetic and geometric means by induction",
    "proves": "0DRF0F3XC9",
    "sources": [
      {
        "locator": "Proof by induction",
        "url": "https://en.wikipedia.org/wiki/AM%E2%80%93GM_inequality"
      }
    ],
    "tag": "8EJJF9T071",
    "uses": [
      "0QSPNASE50"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/8EJJF9T071/",
  "links": [
    {
      "field": "proves",
      "target": "0DRF0F3XC9"
    },
    {
      "field": "uses",
      "target": "0QSPNASE50"
    },
    {
      "field": "methods",
      "target": "0ASJVEFA9J"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/8EJJF9T071.md",
  "msc": [
    "26E60"
  ],
  "name": "Proof of the inequality of arithmetic and geometric means by induction",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/8EJ/8EJJF9T071.md",
  "status": null,
  "tag": "8EJJF9T071",
  "uri": "m2://8EJJF9T071",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-inequality-of-arithmetic-and-geometric-means-by-induction/",
  "writing": {
    "tag": "8EJJF9T071",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
