Since a subalgebra is closed under addition and scalar multiplication, the given absolute-value property yields
The same identity with a minus sign gives . These are pointwise operations on real-valued continuous functions.
The real Stone-Weierstrass theorem says that a real subalgebra which contains the constants and separates points is dense in for the uniform norm, when is compact Hausdorff space. If is also closed, . The complex version needs closure under complex conjugation; that extra condition is unnecessary here.