Tutorials › Real Analysis › Proof of the Composition Theorem

Continuity · Tutorial 347 of 1000

Proof of the Composition Theorem

Follow the nested epsilon-delta choices that prove continuity of a composition, then apply the same control principle to Lipschitz functions.

Intermediate 9 min read

What You'll Learn

  • Identify the outer function’s required input tolerance before choosing the inner function’s tolerance
  • Prove continuity of a composition at a point using the epsilon-delta definition
  • Check that the inner function’s range lies in the outer function’s domain
  • Apply pointwise composition when the outer function is continuous only at the relevant value
  • Derive a Lipschitz constant for a composition from constants for its two functions
  • Recognize why continuity away from the relevant outer input does not affect the pointwise proof

The Proof Depends on the Order of the Choices

The previous tutorial stated the pointwise composition theorem and used it to establish continuity of composite functions. Here we examine the proof’s central technique: an outer function specifies how close its input must be to produce a desired output accuracy, and the inner function then determines how close the original input must be to meet that requirement. The order matters because the outer function acts on the inner function’s values.

Recall the setting. Let \(E,F\subseteq\mathbb{R}\), let \(f:E\to\mathbb{R}\) and \(g:F\to\mathbb{R}\), and suppose \(f(E)\subseteq F\). This last condition ensures that \(g(f(x))\) is defined for every \(x\in E\). The pointwise composition theorem concerns a point \(a\in E\), where \(f\) is continuous at \(a\) and \(g\) is continuous at \(f(a)\).

Proof strategy: Given an output tolerance \(\varepsilon>0\), first use continuity of \(g\) at \(f(a)\) to choose an input tolerance \(\rho>0\). Then use continuity of \(f\) at \(a\) to choose \(\delta>0\) so that inputs within \(\delta\) of \(a\) have images within \(\rho\) of \(f(a)\).

The intermediate tolerance \(\rho\) is not an arbitrary extra parameter. It is the condition on the input to \(g\) that lets us guarantee the final output error is less than \(\varepsilon\). Since that input is \(f(x)\), we must next arrange for \(f(x)\) to satisfy the \(\rho\)-condition.

Proof of the Pointwise Composition Theorem

Theorem: Let \(E,F\subseteq\mathbb{R}\), \(f:E\to\mathbb{R}\), and \(g:F\to\mathbb{R}\), with \(f(E)\subseteq F\). If \(a\in E\), \(f\) is continuous at \(a\), and \(g\) is continuous at \(f(a)\), then \(g\circ f\) is continuous at \(a\).

Proof. Fix an arbitrary \(\varepsilon>0\). By continuity of \(g\) at \(f(a)\), there is a number \(\rho>0\) such that, for every \(y\in F\),

$$ |y-f(a)|<\rho \quad\Longrightarrow\quad |g(y)-g(f(a))|<\varepsilon. $$

Now use continuity of \(f\) at \(a\) with the positive tolerance \(\rho\). There is a \(\delta>0\) such that, for every \(x\in E\),

$$ |x-a|<\delta \quad\Longrightarrow\quad |f(x)-f(a)|<\rho. $$

To verify the definition of continuity for the composition, take any \(x\in E\) satisfying \(|x-a|<\delta\). The choice of \(\delta\) gives \(|f(x)-f(a)|<\rho\). Also \(f(x)\in F\), because \(f(E)\subseteq F\). We can therefore use the implication obtained from continuity of \(g\), with \(y=f(x)\). It follows that

$$ |g(f(x))-g(f(a))|<\varepsilon. $$

By the definition of composition, \(g(f(x))=(g\circ f)(x)\) and \(g(f(a))=(g\circ f)(a)\). Thus, whenever \(x\in E\) and \(|x-a|<\delta\),

$$ |(g\circ f)(x)-(g\circ f)(a)|<\varepsilon. $$

This is the epsilon-delta condition for \(g\circ f\) to be continuous at \(a\). Since \(\varepsilon>0\) was arbitrary, the proof is complete. \(\square\)

Notice that the proof does not require \(x\) to differ from \(a\). When \(x=a\), the two function values agree and the conclusion still holds. Nor does it require \(E\) or \(F\) to contain a whole interval around the relevant point: continuity and the implications above are understood relative to the specified domains. The domain condition also cannot be omitted; without it, \(g(f(x))\) may not be defined.

1
Set the final target.
Start with the desired output error \(\varepsilon\) for \(g\circ f\).
2
Control the outer function.
Continuity of \(g\) turns \(\varepsilon\) into an input tolerance \(\rho\) near \(f(a)\).
3
Control the inner function.
Continuity of \(f\) turns \(\rho\) into a tolerance \(\delta\) near \(a\).
4
Substitute the inner output.
Use \(y=f(x)\) in the outer implication; the range condition makes this substitution valid.

Worked Example: Making the Nested Choices Explicit

Let \(f(x)=x^2\) and \(g(t)=t^2\), both defined on \(\mathbb{R}\). We verify the composition’s continuity at \(a=1\) by carrying out the two tolerance choices. Given \(\varepsilon>0\), set

$$ \rho=\min\{1,\varepsilon/3\}, \qquad \delta=\min\{1,\rho/3\}. $$

If \(|t-1|<\rho\), then \(\rho\leq1\), so \(0<t<2\) and \(|t+1|<3\). Therefore

$$ |g(t)-g(1)| =|t^2-1| =|t-1||t+1| <3\rho \leq\varepsilon. $$

The last inequality follows from \(\rho\leq\varepsilon/3\). Now, if \(|x-1|<\delta\), then \(\delta\leq1\), so \(0<x<2\) and \(|x+1|<3\). Hence

$$ |f(x)-f(1)| =|x^2-1| =|x-1||x+1| <3\delta \leq\rho. $$

The outer estimate can now be applied with \(t=f(x)\), giving \(|g(f(x))-g(f(1))|<\varepsilon\). Indeed, \(g(f(x))=(x^2)^2=x^4\) and \(g(f(1))=1\). The explicit choices illustrate why \(\rho\) is selected before \(\delta\): the value of \(\delta\) is built to meet the already determined outer input requirement.

Continuity Is Needed at the Relevant Value

The theorem uses continuity of \(g\) at \(f(a)\), not continuity of \(g\) at every point of its domain. Nearby inputs \(x\) are sent by \(f\) to values near \(f(a)\), and that is the region in which the outer continuity condition is used. This local nature is often useful when \(g\) has discontinuities elsewhere.

Worked Example: An Outer Function Discontinuous Elsewhere

Define \(g:\mathbb{R}\to\mathbb{R}\) by \(g(t)=t\) for \(t\ne1\), and \(g(1)=9\). This function is discontinuous at \(1\): values \(t\ne1\) arbitrarily close to \(1\) have \(g(t)=t\), which is close to \(1\), while \(g(1)=9\). Let \(f(x)=x+2\), and consider the composition at \(a=0\). Here \(f(0)=2\), and \(g\) is continuous at \(2\).

For a direct check, fix \(\varepsilon>0\) and choose \(\delta=\min\{\varepsilon,1/2\}\). If \(|x|<\delta\), then \(x+2>3/2\), so \(f(x)\ne1\). Also \(g(2)=2\). Thus

$$ |(g\circ f)(x)-(g\circ f)(0)| =|g(x+2)-g(2)| =|(x+2)-2| =|x| <\delta \leq\varepsilon. $$

The composition is continuous at \(0\), despite the discontinuity of \(g\) at \(1\). The important outer input is \(f(0)=2\), and the chosen neighborhood keeps \(f(x)\) away from \(1\).

A Quantitative Extension: Lipschitz Compositions

The same principle applies when continuity is expressed through a stronger, numerical control. A function \(f:E\to\mathbb{R}\) is Lipschitz with constant \(L_f\geq0\) if \(|f(x)-f(y)|\leq L_f|x-y|\) for all \(x,y\in E\). A Lipschitz estimate for the inner function controls the distance between its outputs; a second estimate controls the effect of the outer function on that distance.

Theorem: Let \(f:E\to F\) be Lipschitz with constant \(L_f\geq0\), and let \(g:F\to\mathbb{R}\) be Lipschitz with constant \(L_g\geq0\). Then \(g\circ f\) is Lipschitz on \(E\) with constant \(L_gL_f\).

Proof. Take arbitrary \(x,y\in E\). Since \(f(x),f(y)\in F\), the Lipschitz inequality for \(g\) applies to these two points. The inequality for \(f\) then gives

$$ |(g\circ f)(x)-(g\circ f)(y)| =|g(f(x))-g(f(y))| \leq L_g|f(x)-f(y)| \leq L_gL_f|x-y|. $$

This holds for every \(x,y\in E\), so \(L_gL_f\) is a Lipschitz constant for \(g\circ f\). The proof includes the cases \(L_f=0\) or \(L_g=0\): the displayed inequalities still hold, and the composition is then constant on the relevant image or domain. \(\square\)

Worked Example: Multiplying Lipschitz Bounds

Let \(f:\mathbb{R}\to\mathbb{R}\) be \(f(x)=3x-4\), and let \(g:\mathbb{R}\to\mathbb{R}\) be \(g(t)=|t|\). For any \(x,y\in\mathbb{R}\),

$$ |f(x)-f(y)| =|(3x-4)-(3y-4)| =3|x-y|. $$

Thus \(f\) is Lipschitz with constant \(3\). The absolute-value inequality established in “Continuity of Absolute Value” gives \(\bigl||u|-|v|\bigr|\leq|u-v|\), so \(g\) is Lipschitz with constant \(1\). The theorem gives the bound \(3\cdot1=3\) for the composition. Indeed, the composition is \(g(f(x))=|3x-4|\), and for all \(x,y\),

$$ \bigl||3x-4|-|3y-4|\bigr| \leq|(3x-4)-(3y-4)| =3|x-y|. $$

This bound is global: the same constant works for every pair of inputs, not merely for inputs near a particular point.

Common Proof Errors

The nested-tolerance argument is short, but several errors can disrupt it. One is choosing \(\delta\) before identifying what the outer function requires. Continuity of \(f\) can produce an output tolerance of our choosing, but the tolerance must be the one that continuity of \(g\) supplies. Another is writing \(\rho=\delta\) without justification. The two tolerances serve different functions and generally need not be equal.

A separate error is omitting the domain check when substituting \(y=f(x)\). The implication from continuity of \(g\) applies only to inputs in \(F\); the inclusion \(f(E)\subseteq F\) ensures that \(f(x)\) is one of them. Finally, one should not replace pointwise continuity of \(g\) at \(f(a)\) by an unnecessary assumption of continuity throughout \(F\). The pointwise proof uses only values sufficiently close to \(f(a)\).

Check Your Understanding

Use the proof strategy and estimates in this tutorial to answer the following questions.

  1. In the pointwise composition proof, what does the outer tolerance \(\rho\) control?
  2. Why must the choice of \(\delta\) come after the choice of \(\rho\)?
  3. Where is the condition \(f(E)\subseteq F\) used in the proof?
  4. At which point must \(g\) be continuous to conclude continuity of \(g\circ f\) at \(a\)?
  5. If \(f\) and \(g\) have Lipschitz constants \(L_f\) and \(L_g\), what constant does the proof give for their composition?