Space of continuous functions on a compact space (source code)

= Space of continuous functions on a compact space
{title2=$C(K)$}

For a <compact Hausdorff space> $K$, $C(K)$ consists of continuous scalar-valued functions with the <supremum norm>. It is a <Banach space> and, with complex scalars, pointwise multiplication and conjugation make it a commutative unital <C-star algebra>.

Why does <completeness> hold? A <Cauchy sequence> in the <supremum norm> is Cauchy at every point, hence has a pointwise limit. The uniform Cauchy estimate passes to that limit, giving <uniform convergence>; the <uniform limit theorem> makes the limit continuous. Thus the <norm> and the chosen regularity of the functions cooperate to keep every limit inside $C(K)$.

Changing to the <L2 norm> on $C([0,1])$ loses this property. For integers $n\geq2$, the <continuous functions> $h_n(x)=\min(1,\max(0,n(x-1/2)))$ approximate the <step function> $h(x)=0$ for $x\leq1/2$ and $h(x)=1$ for $x>1/2$. Direct integration gives
$$
\|h_n-h\|_2^2=\int_{1/2}^{1/2+1/n}\bigl(1-n(x-1/2)\bigr)^2\,dx=\frac1{3n}.
$$
The <triangle inequality> makes $(h_n)$ a <Cauchy sequence>, but no <continuous function> agrees with $h$ <almost everywhere>: continuity would force value zero on the whole left open interval and one on the whole right open interval. Hence this <normed space> is incomplete. The missing limit exists in <L2 space>, its <completion of a normed space>, showing exactly what the larger space adds.