# Stone–Weierstrass theorem

The **Stone–Weierstrass theorem** is a result of analysis stating that on a compact [Hausdorff space](https://www.edgepedia.org/hausdorff-space) (space where distinct points have disjoint open neighborhoods) \( X \), any subalgebra of the algebra \( C(X) \) of real-valued continuous functions that contains the constants and separates points is dense in \( C(X) \) under the uniform (supremum) norm<sup>[1](https://ncatlab.org/nlab/show/Stone-Weierstrass%2Btheorem)</sup>. It generalizes the classical Weierstrass approximation theorem, which asserts that polynomials are uniformly dense in the continuous functions on a compact interval<sup>[2](https://people.math.harvard.edu/~shlomo/docs/Real_Variables.pdf)</sup>. Marshall Stone proved the general version in 1937, recognizing that very few properties of the polynomials are essential to the result<sup>[3](https://wiki.math.ntnu.no/_media/ma8106/2020v/stoneweierstrass.pdf)</sup>.

| Key fact | Detail |
|---|---|
| Setting | \( X \) compact Hausdorff; \( C(X) \) is a commutative real Banach algebra with unit under pointwise operations and the sup-norm \( \|f\| = \sup_{x \in X} \|f(x)\| \)<sup>[1](https://ncatlab.org/nlab/show/Stone-Weierstrass%2Btheorem)</sup> |
| Real version | A subalgebra \( \mathcal{A} \subseteq C(X \to \mathbb{R}) \) containing the constant function 1 and separating points is dense in \( C(X \to \mathbb{R}) \)<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup> |
| Separating points | For every pair of distinct points \( x_1, x_2 \in X \) there is an \( f \in \mathcal{A} \) with \( f(x_1) \neq f(x_2) \)<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup> |
| Special case | Real polynomials on a compact interval \( [a,b] \) form a subalgebra with unity that separates points, so they are dense in \( C([a,b]) \)<sup>[5](https://www.isibang.ac.in/~sury/hyderstone.pdf)</sup> |
| Complex version | Holds with the extra assumption that the algebra is closed under conjugation \( f \mapsto \overline{f} \)<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup> |
| Nonunital case | A closed point-separating subalgebra without identity is either all of \( C(S) \) or the algebra of all continuous functions vanishing at a single point \( x_\infty \)<sup>[2](https://people.math.harvard.edu/~shlomo/docs/Real_Variables.pdf)</sup> |
| Publication | Stone, "The generalized Weierstrass approximation theorem," Mathematics Magazine 21:4 (March–April 1948), pp. 167–184, continued in 21:5, pp. 237–254<sup>[6](https://celebratio.org/article/414/)</sup> |

## Statement and the Weierstrass special case

Let \( X \) be a compact Hausdorff space. The algebra \( C(X) \) of real-valued continuous functions carries pointwise addition and multiplication and the sup-norm, making it a commutative real Banach algebra with unit<sup>[1](https://ncatlab.org/nlab/show/Stone-Weierstrass%2Btheorem)</sup>. A subalgebra \( \mathcal{A} \) is a vector subspace closed under multiplication and containing the unit; it **separates points** if for any distinct \( x, y \in X \) some \( f \in \mathcal{A} \) satisfies \( f(x) \neq f(y) \)<sup>[1](https://ncatlab.org/nlab/show/Stone-Weierstrass%2Btheorem)</sup>.

The theorem then says that the inclusion \( \mathcal{A} \subseteq C(X) \) is dense if and only if \( \mathcal{A} \) separates points; equivalently, a Banach (closed) subalgebra inclusion is the identity if and only if it separates points<sup>[1](https://ncatlab.org/nlab/show/Stone-Weierstrass%2Btheorem)</sup>. In the common formulation, a subalgebra of \( C(X \to \mathbb{R}) \) containing the constant function 1 and separating points is dense<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup>.

The original Weierstrass theorem is the special case \( X = [a,b] \): the polynomials form a subalgebra with unity that separates points of \( [a,b] \), so their closure in the uniform topology is all of \( C([a,b]) \)<sup>[5](https://www.isibang.ac.in/~sury/hyderstone.pdf)</sup>. Stone's contribution was to see that almost none of the special structure of polynomials matters; any point-separating algebra of continuous functions suffices<sup>[3](https://wiki.math.ntnu.no/_media/ma8106/2020v/stoneweierstrass.pdf)</sup>.

## Proof ideas

The standard proof passes through a lattice statement: the version for algebras follows from a version for function lattices<sup>[5](https://www.isibang.ac.in/~sury/hyderstone.pdf)</sup>. The key step shows that a uniformly closed algebra contains absolute values, approximating \( |x| \) on \( [0,1] \) by a polynomial \( Q \) without constant term; then \( Q(f^2) \in \mathcal{A} \) approximates \( |f| \)<sup>[2](https://people.math.harvard.edu/~shlomo/docs/Real_Variables.pdf)</sup>. From \( |f| \in \mathcal{A} \) the identities

\[ \max(f,g) = \frac{f+g}{2} + \left|\frac{f-g}{2}\right|, \qquad \min(f,g) = \frac{f+g}{2} - \left|\frac{f-g}{2}\right| \]

show that \( \mathcal{A} \) is a lattice, meaning \( \max(f,g) \) and \( \min(f,g) \) lie in \( \mathcal{A} \) whenever \( f, g \in \mathcal{A} \)<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup>. A lattice of real-valued continuous functions on a Hausdorff space with the two-point interpolation property is dense in the continuous functions in the topology of uniform convergence on compact sets; for a closed lattice on a compact space, point separation alone does not suffice, and constants (or an equivalent stronger condition) are also needed<sup>[2](https://people.math.harvard.edu/~shlomo/docs/Real_Variables.pdf)</sup><sup> • </sup><sup>[15](https://web.math.utk.edu/~freire/teaching/m561f22/Stone_Weierstrass_proof.pdf)</sup>.

The approximation of \( |x| \) ultimately depends on the [Taylor series](https://www.edgepedia.org/taylor-series) of \( \sqrt{1-t} \), more precisely on the summability of the binomial coefficients,

\[ \sum_{n=0}^{\infty} \left| \binom{1/2}{n} \right| < \infty. \]

<sup>[5](https://www.isibang.ac.in/~sury/hyderstone.pdf)</sup> Stone's own expository account appeared in two parts in Mathematics Magazine in 1948<sup>[6](https://celebratio.org/article/414/)</sup>. A constructive proof of the theorem was given by Mulvey<sup>[1](https://ncatlab.org/nlab/show/Stone-Weierstrass%2Btheorem)</sup>, and the lattice route gives a proof independent of Weierstrass's theorem, making the classical result a proper corollary<sup>[7](https://home.iiserb.ac.in/~prahlad/documents/expository/stones_theorem.pdf)</sup>.

## The complex version

The theorem as stated fails for complex-valued functions. On the closed unit disk \( \mathbb{D} \), the algebra \( \mathcal{H}(\mathbb{D}) \) of functions continuous on \( \mathbb{D} \) and holomorphic on its interior is a closed proper subalgebra of \( C(\mathbb{D} \to \mathbb{C}) \) that separates points: by Cauchy's theorem and its converse (Morera's theorem), membership is characterized by vanishing contour integrals, which forces closedness, while \( z \mapsto z \) separates all points<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup>.

The correct complex version adds one axiom, self-adjointness: a complex subalgebra of \( C(X \to \mathbb{C}) \) containing the constants, separating points, and closed under conjugation \( f \mapsto \overline{f} \) is dense in \( C(X \to \mathbb{C}) \)<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup>. The reduction is direct: writing \( f = u + iv \), the real and imaginary parts \( u = (f + \overline{f})/2 \) and \( v = (f - \overline{f})/(2i) \) lie in the real subalgebra \( \mathcal{A}_\mathbb{R} \), which separates points and vanishes at no point, so the real version applies to \( u \) and \( v \) separately<sup>[8](https://www.jirka.org/ra/html/sec_stoneweier.html)</sup>.

Without self-adjointness the situation is subtler. Kenneth Kunen, a set theorist at the [University of Wisconsin–Madison](https://www.edgepedia.org/university-of-wisconsin-madison), studied the **Complex Stone–Weierstrass Property** (CSWP): a compact space \( X \) has the CSWP if every subalgebra of \( C(X) \) that separates points and contains the constants is dense. [Walter Rudin](https://www.edgepedia.org/walter-rudin) showed that all scattered spaces (those with no perfect subsets) have the CSWP, and Kunen described a class of non-scattered spaces with the property; by another result of Rudin such spaces cannot be metrizable<sup>[9](https://arxiv.org/abs/math/0305076)</sup>.

## Variants

**Lattice version.** On a compact Hausdorff space, a unital point-separating real vector sublattice of \( C(X, \mathbb{R}) \) is uniformly dense: for every \( f \in C(X, \mathbb{R}) \) and \( \varepsilon > 0 \) it contains a member within \( \varepsilon \) of \( f \) at every point<sup>[10](https://alphabetamath.cc/topology/stone-weierstrass-general)</sup>.

**Nonunital version.** If the algebra does not contain the identity, the conclusion changes: for a compact space \( S \) and a point-separating algebra \( \mathcal{A} \) of continuous real-valued functions, the uniform closure is either all of \( C(S) \) or the algebra of all continuous functions vanishing at a single point \( x_\infty \)<sup>[2](https://people.math.harvard.edu/~shlomo/docs/Real_Variables.pdf)</sup>. Equivalently, a closed point-separating subalgebra of \( C(X \to \mathbb{R}) \) without the identity equals \( \{ f : f(x_0) = 0 \} \) for a unique \( x_0 \in X \)<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup>.

**Locally compact spaces.** For a locally compact metric space \( X \) and a closed subalgebra \( A \subseteq C_0(X, \mathbb{R}) \) (functions vanishing at infinity) that separates points, either \( A = C_0(X, \mathbb{R}) \), or there is a unique \( x_0 \in X \) with \( A = I_{x_0} = \{ f \in C_0(X, \mathbb{R}) : f(x_0) = 0 \} \); the first case holds exactly when \( A_x = \mathbb{R} \) for all \( x \), the second when \( A_{x_0} = \{0\} \)<sup>[11](https://mathweb.ucsd.edu/~bdriver/140_F12-S13/Lecture%20Notes/140C_Versions/Math_140C_Ver3.pdf)</sup>. On non-compact spaces such as \( \mathbb{R} \), uniform approximation by a smaller class of functions is generally not possible, so the locally compact formulation works with \( C_0 \)<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup>.

**Relaxed separation.** Versions exist in which the algebra need not separate all points: if \( \mathcal{A} \) separates the points of \( K \setminus K_0 \) and separates each point of \( K_0 \) from every point of \( K \), with the vanishing, constants, and conjugation conditions on \( K \setminus K_0 \), density in \( C(K, \mathbb{C}) \) still follows<sup>[12](https://arxiv.org/abs/1905.03409)</sup>.

## Applications

The theorem converts a small concrete class of functions into a dense one, which is why it appears across analysis.

**Trigonometric polynomials.** The space \( \mathcal{T} \) of trigonometric polynomials \( x \mapsto \sum_{n=-N}^{N} c_n e^{2\pi i n x} \) on the circle \( \mathbb{R}/\mathbb{Z} \) is dense in \( C(\mathbb{R}/\mathbb{Z} \to \mathbb{C}) \) in the uniform topology, and dense in \( L^p \) for all \( 0 < p < \infty \)<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup>.

**Separability.** For a compact metric space \( X \), the theorem underlies the proof that \( C(X \to \mathbb{C}) \) and \( C(X \to \mathbb{R}) \) are separable<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup>.

**Probability theory.** Finite real linear combinations of suitable classes of functions are dense in \( C(\Omega) \), which makes them convergence-determining classes for weak convergence of probability measures<sup>[13](https://ndl.ethernet.edu.et/bitstream/123456789/61531/1/95.pdf)</sup>. The theorem is one of the tools for proving that the characteristic function characterizes the law of a random vector and that weak convergence of laws is equivalent to convergence of characteristic functions<sup>[12](https://arxiv.org/abs/1905.03409)</sup>.

**Large deviations.** Bryc's theorem, which produces a large deviation principle with rate function \( J(x) = \sup_{h \in \mathcal{C}_b(X)} \{ h(x) - \Lambda(h) \} \), extends to any topological space when \( \mathcal{C}_b(X) \) is replaced by the bounded-above part of any algebra of real-valued continuous functions separating the points, or any well-separating class<sup>[14](https://arxiv.org/abs/0804.2214)</sup>.

**Products and coordinates.** On a product \( X \times Y \) of compact Hausdorff spaces, every \( f \in C(X \times Y \to \mathbb{R}) \) is a uniform limit of finite sums \( (x,y) \mapsto \sum_{j=1}^{k} f_j(x) g_j(y) \); on an arbitrary product of compact Hausdorff spaces, every continuous function is a uniform limit of functions depending on only finitely many coordinates<sup>[4](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)</sup>.

## References

1. [Stone-Weierstrass theorem, nLab](https://ncatlab.org/nlab/show/Stone-Weierstrass%2Btheorem)
2. [Sternberg, S., Real Variables, Section 1.15: The Stone-Weierstrass theorem, Harvard University](https://people.math.harvard.edu/~shlomo/docs/Real_Variables.pdf)
3. [The Stone-Weierstrass Theorem, NTNU MA8106 notes](https://wiki.math.ntnu.no/_media/ma8106/2020v/stoneweierstrass.pdf)
4. [Tao, T., 245B Notes 12: Continuous functions on locally compact Hausdorff spaces](https://terrytao.wordpress.com/2009/03/02/245b-notes-12-continuous-functions-on-locally-compact-hausdorff-spaces/)
5. [Sury, B., The Stone-Weierstrass theorem, ISI Bangalore](https://www.isibang.ac.in/~sury/hyderstone.pdf)
6. [Marshall Harvey Stone publication list, Celebratio Mathematica](https://celebratio.org/article/414/)
7. [The Stone-Weierstrass theorem, expository notes, IISER Bhopal](https://home.iiserb.ac.in/~prahlad/documents/expository/stones_theorem.pdf)
8. [Jirka, J., Basic Analysis: The Stone–Weierstrass theorem](https://www.jirka.org/ra/html/sec_stoneweier.html)
9. [Kunen, K., The Complex Stone-Weierstrass Property, arXiv:math/0305076](https://arxiv.org/abs/math/0305076)
10. [Stone–Weierstrass in General, Alphabeta Math](https://alphabetamath.cc/topology/stone-weierstrass-general)
11. [Driver, B., Math 140C lecture notes, Section 13.3: Stone-Weierstrass Theorem for Locally Compact X, UCSD](https://mathweb.ucsd.edu/~bdriver/140_F12-S13/Lecture%20Notes/140C_Versions/Math_140C_Ver3.pdf)
12. [Lo, G. S., Flexible versions of the Stone-Weierstrass Theorem in General and Applications to Probability Theory, arXiv:1905.03409](https://arxiv.org/abs/1905.03409)
13. [Appendix A: Probability, convergence-determining classes](https://ndl.ethernet.edu.et/bitstream/123456789/61531/1/95.pdf)
14. [Stone-Weierstrass type theorems for large deviations, arXiv:0804.2214](https://arxiv.org/abs/0804.2214)
15. [Stone Weierstrass Proof.pdf, web.math.utk.edu](https://web.math.utk.edu/~freire/teaching/m561f22/Stone_Weierstrass_proof.pdf)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Analysis and mathematical models › Real analysis*

*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
