Use radians and take on the closed interval . This is a complete metric space with distance , and . The mean value theorem and give a contraction mapping with . Both the interval and its preservation matter; a small derivative by itself would not ensure that all subsequent approximations stay in the chosen space.
Starting at gives , , , and . The cosine is decreasing here, so successive iterates alternate around the unique fixed point . The contraction iteration error bound needs no prior knowledge of this numerical value. At step 40, and the latest-step bound is below , certifying error below one millionth for exact iteration. The initial-step bound requires 91 iterations for the same tolerance. The observed step-40 error is only about ; the guarantees allow less favorable behavior than this example actually exhibits.
Figure 1.
Cosine iteration converges with computable error bounds
. The staircase alternates around the intersection of and . The error plot compares measured error against the initial-step and latest-step contraction bounds; both bounds hold without knowing the fixed point. Details.
This is the beauty of the contraction mapping theorem: a uniform local improvement controls the entire infinite process. Completeness is essential. On the incomplete interval , the contraction mapping keeps every iterate inside but has no fixed point there; its missing limit is zero. Banach's 1922 paper developed abstract methods for different spaces of functions with applications to integral equations, a motivation still visible whenever repeated approximation is used to construct a function.[ref]
The Banach fixed-point theorem states that a contraction mapping of a nonempty complete metric space has a unique fixed point, and iterations of a map converge to it from every . Precisely, assume a single constant satisfies for every .
Induction gives . The triangle inequality and the geometric series therefore give, for ,
Thus is a Cauchy sequence. By completeness it converges to some . The contraction mapping is a continuous map, so . If is another fixed point, then , forcing . Letting in the estimate also gives the contraction iteration error bound:
If , is constant and the sequence reaches its unique fixed point after the first step; this also removes any ambiguity about in the displayed estimate at .