The Sup Metric on Bounded Functions
For a sequence of functions, pointwise convergence tests one input at a time. The sup metric instead measures the largest error across the entire domain at once. This makes it the natural metric for uniform convergence, and it leads to a useful completeness result: no matter what the domain set is, a Cauchy sequence of bounded real-valued functions has a bounded limit to which it converges uniformly.
Throughout, \(\mathbb{R}\) has its standard topology. The domain \(X\) is an arbitrary set; no topology on \(X\) is needed. We use the standard completeness of \(\mathbb{R}\): every Cauchy sequence of real numbers converges to a real number.
When \(X\ne\varnothing\), the displayed supremum is finite: if \(|f(x)|\le M\) and \(|g(x)|\le N\) for all \(x\in X\), then \(|f(x)-g(x)|\le M+N\). The supremum need not be attained at any point; its definition only requires it to be the least upper bound.
Proof. If \(X=\varnothing\), then \(B(X)\) has one element and its only distance is \(0\), which satisfies the metric axioms. Now suppose \(X\ne\varnothing\). For any \(f,g\in B(X)\), absolute values are nonnegative, so \(d_\infty(f,g)\ge0\). Also, \(d_\infty(f,g)=0\) implies \(|f(x)-g(x)|\le0\) for every \(x\), and therefore \(f(x)=g(x)\) for every \(x\); hence \(f=g\). If \(f=g\), every value \(|f(x)-g(x)|\) is \(0\), so \(d_\infty(f,g)=0\). Symmetry follows from \(|f(x)-g(x)|=|g(x)-f(x)|\). Finally, for \(f,g,h\in B(X)\), the real triangle inequality gives, for every \(x\in X\), $$ |f(x)-h(x)|\le |f(x)-g(x)|+|g(x)-h(x)| \le d_\infty(f,g)+d_\infty(g,h). $$ Taking the supremum over \(x\) proves \(d_\infty(f,h)\le d_\infty(f,g)+d_\infty(g,h)\). Thus all metric axioms hold. \(\square\)
Computing Sup Distances
Worked Example: A Sup Distance on a Finite Set
Let \(X=\{a,b,c\}\), and define \(f,g:X\to\mathbb{R}\) by \(f(a)=2,\ f(b)=-1,\ f(c)=4\) and \(g(a)=\frac12,\ g(b)=3,\ g(c)=-2\). Every function on this finite set is bounded. Compute their sup distance.
At \(a\), the absolute difference is \(|f(a)-g(a)|=|2-\frac12|=\frac32\). At \(b\), it is \(|f(b)-g(b)|=|-1-3|=4\). At \(c\), it is \(|f(c)-g(c)|=|4-(-2)|=6\). Because these are all the points of \(X\), the supremum is the maximum of these three values: $$ d_\infty(f,g)=\max\left\{\frac32,4,6\right\}=6. $$ Check: the three computed differences are all at most \(6\), and the difference at \(c\) equals \(6\). Thus \(6\) is an upper bound that is attained, so it is exactly the supremum.
A sequence \((f_n)\) in \(B(X)\) is Cauchy in this metric when for each \(\varepsilon>0\) there is \(N\in\mathbb{N}\) such that \(d_\infty(f_n,f_m)<\varepsilon\) whenever \(n,m\ge N\). The following example shows how the supremum can be computed even when the domain is infinite.
Worked Example: A Uniformly Convergent Sequence on \(\mathbb{N}\)
Take \(X=\mathbb{N}=\{1,2,\dots\}\) and define \(f_n(k)=\frac{1}{n+k}\) for \(n,k\in\mathbb{N}\). For each fixed \(n\), \(0<f_n(k)\le\frac{1}{n+1}\), so \(f_n\) is bounded. For \(m>n\), calculate the distance between \(f_n\) and \(f_m\).
For every \(k\in\mathbb{N}\), $$ |f_n(k)-f_m(k)| =\frac{1}{n+k}-\frac{1}{m+k} =\frac{m-n}{(n+k)(m+k)}. $$ The numerator \(m-n\) is positive and fixed. As \(k\) increases, both positive factors in the denominator increase, so the fraction decreases. Its largest value over \(k\in\mathbb{N}\) occurs at \(k=1\). Therefore $$ d_\infty(f_n,f_m)=\frac{m-n}{(n+1)(m+1)} =\frac{1}{n+1}-\frac{1}{m+1}. $$ Check: substituting \(k=1\) into the original difference gives \(\frac{1}{n+1}-\frac{1}{m+1}\), the value just found; for every \(k\ge1\), the denominator \((n+k)(m+k)\) is at least \((n+1)(m+1)\).
For any \(\varepsilon>0\), choose \(N\) so that \(\frac{1}{N+1}<\varepsilon\). If \(m>n\ge N\), the distance formula gives \(d_\infty(f_n,f_m)=\frac{1}{n+1}-\frac{1}{m+1}<\frac{1}{n+1}\le\frac{1}{N+1}<\varepsilon\). The formula is symmetric in the distance, so the same Cauchy condition holds when \(n>m\); when \(n=m\), the distance is \(0\). The pointwise limit is \(f(k)=0\), and \(d_\infty(f_n,f)=\sup_{k\ge1}\frac{1}{n+k}=\frac{1}{n+1}\), with equality at \(k=1\). Thus \(f_n\to f\) in the sup metric, which is uniform convergence.
Completeness of the Bounded Function Space
Proof. If \(X=\varnothing\), the space \(B(X)\) has one element, and every sequence in a one-point metric space converges to that element. It is therefore complete. Suppose now that \(X\ne\varnothing\), and let \((f_n)\) be a Cauchy sequence in \(B(X)\). We will construct its limit in three stages.
First fix any \(x\in X\). Given \(\varepsilon>0\), the Cauchy property gives an \(N\) such that \(d_\infty(f_n,f_m)<\varepsilon\) for \(n,m\ge N\). Since \(|f_n(x)-f_m(x)|\le d_\infty(f_n,f_m)\), the real sequence \((f_n(x))\) is Cauchy. Completeness of \(\mathbb{R}\) gives a limit. Define \(f(x)=\lim_{n\to\infty}f_n(x)\) for each \(x\in X\). This defines a real-valued function \(f\) on \(X\).
Next we prove that \(f\) is bounded, so that it belongs to \(B(X)\). Apply the Cauchy property with \(\varepsilon=1\). There is an \(N\) such that \(d_\infty(f_n,f_m)<1\) whenever \(n,m\ge N\). Fix \(n=N\). For every \(x\in X\) and every \(m\ge N\), \(|f_N(x)-f_m(x)|<1\). Letting \(m\to\infty\) in this real inequality gives \(|f_N(x)-f(x)|\le1\). The inequality may become non-strict in the limit, which is why we use \(\le1\) here. Since \(f_N\in B(X)\), there is a finite \(M\) such that \(|f_N(x)|\le M\) for every \(x\). The real triangle inequality now gives $$ |f(x)|\le |f(x)-f_N(x)|+|f_N(x)|\le 1+M $$ for every \(x\in X\). Hence \(f\) is bounded and belongs to \(B(X)\).
Finally, we prove convergence in the sup metric. Let \(\varepsilon>0\). By the Cauchy property, choose \(N\) such that \(d_\infty(f_n,f_m)<\varepsilon/2\) whenever \(n,m\ge N\). Fix \(n\ge N\) and \(x\in X\). For every \(m\ge N\), \(|f_n(x)-f_m(x)|<\varepsilon/2\). Taking \(m\to\infty\) gives \(|f_n(x)-f(x)|\le\varepsilon/2\). This holds for every \(x\), so \(d_\infty(f_n,f)\le\varepsilon/2<\varepsilon\). The bound holds for every \(n\ge N\), proving \(f_n\to f\) in \(B(X)\). Every Cauchy sequence in \(B(X)\) therefore converges in that space, as required. \(\square\)
The proof separates two issues that should not be conflated. Pointwise convergence supplies a candidate value \(f(x)\) at each input. The uniform Cauchy condition does the additional work: it bounds the limit uniformly using a single bounded function \(f_N\), and it ensures that the errors are small for every input at the same index \(N\).
Worked Example: Pointwise Convergence Is Not Enough
Again take \(X=\mathbb{N}\), and define \(g_n(k)=1\) when \(k\ge n\), and \(g_n(k)=0\) when \(k<n\). Each \(g_n\) is bounded, since its only values are \(0\) and \(1\). For each fixed \(k\), if \(n>k\) then \(g_n(k)=0\). Thus \(g_n(k)\to0\) for every fixed \(k\), so the pointwise limit is the zero function.
Nevertheless, if \(m>n\), take \(k=n\). Then \(g_n(n)=1\), while \(g_m(n)=0\), because \(n<m\). Hence \(|g_n(n)-g_m(n)|=1\). At every \(k\), both function values are either \(0\) or \(1\), so every absolute difference is at most \(1\). It follows that $$ d_\infty(g_n,g_m)=1\qquad(m>n). $$ Check: the lower bound \(1\) is realized at \(k=n\), and the upper bound \(1\) follows from the possible values \(0\) and \(1\). Thus the distance is exactly \(1\), not merely at least \(1\). The sequence is not Cauchy: for \(\varepsilon=\frac12\), no choice of \(N\) works, since \(m=n+1\ge N\) gives distance \(1\) whenever \(n\ge N\).
Common Pitfall: Taking Limits at Each Input
A tempting but incorrect argument is: “For each fixed \(k\), \(g_n(k)\) is eventually zero; therefore the sup distance from \(g_n\) to zero tends to zero.” The conclusion does not follow because the input witnessing a large error can depend on \(n\). In the example above, for each \(n\), the choice \(k=n\) gives \(g_n(n)=1\), and therefore \(d_\infty(g_n,0)=1\). Pointwise convergence allows the index after which the error is small to depend on the input; convergence in the sup metric requires one index that controls the error at every input simultaneously.
The completeness theorem matters precisely because it upgrades the uniform Cauchy condition to a function-space limit. It applies to any domain set, with no compactness assumption and no continuity requirement on the functions. The limit it constructs is bounded and the convergence is uniform. Requiring the functions to be continuous is an additional restriction and is a separate question.
Check Your Understanding
Use the definition of the sup metric and the completeness proof to justify your answers.
- For a nonempty set \(X\), why is \(d_\infty(f,g)\) finite whenever \(f,g\in B(X)\)?
- In the sequence \(f_n(k)=1/(n+k)\) on \(\mathbb{N}\), at which input is \(d_\infty(f_n,f_m)\) attained when \(m>n\)?
- In the completeness proof, why must the pointwise limit be shown bounded before it can be treated as an element of \(B(X)\)?
- For the indicator functions \(g_n\) in the last example, give an input at which \(d_\infty(g_n,g_{n+1})\) is attained.
- Explain why the \(\varepsilon/2\) Cauchy estimate in the proof implies \(d_\infty(f_n,f)\le\varepsilon/2\) after taking the pointwise limit.