{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "NT564Y315M"
    }
  ],
  "body": "\n## Statement\n\nLet $X$ be a [[compact|0TVJZYB6SH]] [[Hausdorff space|0S1FJ8VEX9]].\nLet $C(X, \\R)$ be the space of continuous real functions on $X$ with the [[supremum norm|0PARCKE8WP]].\nLet $A \\subseteq C(X, \\R)$ be a subalgebra with these two properties.\n\n1. $A$ contains the constant functions.\n2. $A$ separates points: for all $x \\ne y$ in $X$ there is $f \\in A$ with $f(x) \\ne f(y)$.\n\nThen $A$ is [[dense|0BSJSX7ME2]] in $C(X, \\R)$.\n\n## Remarks\n\nThe idea of the proof: the closure $\\bar{A}$ is again an algebra.\nBy the [[Weierstrass approximation theorem|0JQE130DHW]], $\\abs{t}$ is a uniform limit of polynomials on each interval, so $f \\in \\bar{A}$ implies $\\abs{f} \\in \\bar{A}$.\nHence $\\bar{A}$ is closed under $\\max$ and $\\min$.\nA compactness argument then approximates any continuous function by finite maxima and minima of functions in $\\bar{A}$.\n\nExamples: polynomials in $n$ variables are dense in $C(K, \\R)$ for each compact $K \\subset \\R^n$.\nTrigonometric polynomials are dense in the continuous $2\\pi$-periodic functions.\n\nBoth hypotheses are needed.\nOn $[-1, 1]$, the even polynomials form an algebra with constants, but it does not separate $1$ from $-1$, and $x$ is not a uniform limit of even functions.\nThe functions $f$ with $f(0) = 0$ separate points but miss the constants.\n\nFor complex functions, $A$ must also be closed under complex conjugation.\nOn the unit circle, the polynomials in $z$ separate points but are not dense: $\\bar{z}$ is not a uniform limit of them.\n\n## Explanations\n\n### L1 human\n\nYou can approximate any continuous function on a compact space as closely as you like, provided your building blocks can tell points apart and include the constants.\nThis is a far-reaching form of Weierstrass's result that polynomials approximate continuous functions on an interval.\n\n### L2 human\n\nThe theorem is the standard way to prove that a class of functions is dense in $C(X)$.\nIt gives density of polynomials, of trigonometric polynomials, and of sums of products $f(x) g(y)$ in $C(X \\times Y)$.\nIn the theory of C*-algebras it is the main tool behind the commutative Gelfand–Naimark theorem.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "about": [
      "MG3X8Y1VT4"
    ],
    "kind": "statement",
    "msc": [
      "46J10",
      "41A65",
      "54C35"
    ],
    "name": "Stone–Weierstrass theorem",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q939927",
      "wikipedia": "Stone–Weierstrass theorem"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Stone%E2%80%93Weierstrass_theorem"
      }
    ],
    "tag": "1P8D3MK79H",
    "uses": [
      "0TVJZYB6SH",
      "0S1FJ8VEX9",
      "0PARCKE8WP",
      "0BSJSX7ME2",
      "0JQE130DHW"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/1P8D3MK79H/",
  "links": [
    {
      "field": "about",
      "target": "MG3X8Y1VT4"
    },
    {
      "field": "uses",
      "target": "0TVJZYB6SH"
    },
    {
      "field": "uses",
      "target": "0S1FJ8VEX9"
    },
    {
      "field": "uses",
      "target": "0PARCKE8WP"
    },
    {
      "field": "uses",
      "target": "0BSJSX7ME2"
    },
    {
      "field": "uses",
      "target": "0JQE130DHW"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/1P8D3MK79H.md",
  "msc": [
    "46J10",
    "41A65",
    "54C35"
  ],
  "name": "Stone–Weierstrass theorem",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/1P8/1P8D3MK79H.md",
  "status": null,
  "tag": "1P8D3MK79H",
  "uri": "m2://1P8D3MK79H",
  "url": "https://math2.tamnd.com/wiki/stone-weierstrass-theorem/",
  "writing": {
    "tag": "1P8D3MK79H",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
