Composition of Continuous Functions
Suppose you know that is continuous. Suppose you also know is continuous. What can you say about ? This function is built by feeding the output of into . The question is not idle. Almost every function encountered in calculus — , , — is a chain of simpler continuous pieces linked by composition. If continuity did not survive this linking operation, the entire calculus of elementary functions would collapse. None of these examples are continuous "from scratch." This article proves the fundamental permanence property that makes such reasoning legitimate. The composition of continuous functions is continuous. This holds at every point where the composition is defined and each piece is continuous. The result complements the Algebra of Continuous Functions, which handles sums, products, and quotients. Composition is the remaining basic way to combine functions. It behaves differently in a way that deserves careful attention. Continuity of at a point , and continuity of at (not at ), is exactly what is needed. The proof is a clean two-line argument once the - definition is unwound. But the bookkeeping of which point each function must be continuous at is where students most often go wrong. We give the direct - proof. We restate it via the Sequential Characterization of Continuity for comparison. We also pin down exactly how the hypotheses must be quantified. By the end you will be able to state the composition theorem precisely. You will be able to prove it two independent ways. You will recognize the one common way the hypotheses get misapplied. You will also see how this single lemma underwrites the continuity of every elementary function you will meet. This foreshadows Continuity of Polynomials, Rational, and Elementary Functions.
- If is continuous at and is continuous at , then is continuous at .
- The hypothesis is about 's continuity at the image point , not at itself.
- The proof is a direct two-step - chase: control near first, then control near .
- An equivalent proof uses the sequential characterization: .
- If is continuous only at (not nearby) and is not continuous at , composition can fail — both hypotheses are load-bearing.
- Key idea: continuity composes because "close inputs give close outputs" is transitive across two maps, provided the second map's continuity is anchored at the first map's output.
Where this lives today
The composition theorem is the quiet engine behind nearly every continuity argument in calculus and beyond. In elementary calculus, it is what justifies calling , , or continuous without re-deriving continuity from scratch each time — each is a finite chain of compositions of functions already known to be continuous, foreshadowing the systematic treatment in Continuity of Polynomials, Rational, and Elementary Functions. In real analysis more broadly, the theorem generalizes verbatim to continuous maps between metric spaces and topological spaces (the proof is identical with replaced by a metric , or with preimages of open sets), making it a cornerstone of point-set topology: the composition of continuous maps between topological spaces is continuous, which is what makes "the category of topological spaces and continuous maps" a coherent category in the first place. In differential calculus, composing continuity lemmas at the right basepoints is the model for the chain rule, where derivative composition again requires the inner function's value to land where the outer function's derivative hypothesis is checked. In dynamical systems, iterating a continuous map relies on this theorem to guarantee that iterates of continuous maps remain continuous, underlying the study of fixed points and orbits. In numerical analysis and engineering, composed continuous transfer functions (filters, coordinate changes, normalization layers) inherit stability guarantees from this same principle — a small perturbation at the input cannot suddenly blow up through a chain of continuous stages. In probability and statistics, continuous transformations of continuous random variables (e.g. for continuous and a random variable with continuous distribution structure) rely on composition results to preserve regularity properties through changes of variables.
Ask the tutor: Can you show me how this composition theorem is used, step by step, to prove that is continuous wherever ?
Let , let satisfy , and let . The composition is defined by
Recall (from the Sequential Characterization of Continuity and the - definition) that a function is continuous at a point if for every there exists such that
The composition theorem below requires: continuous at the point , and continuous at the point — two different basepoints for two different functions.
Intuition
Think of and as two machines wired in series. The first machine, , takes an input near and produces an output near — that is exactly what continuity of at guarantees. The second machine, , takes that output and, because it is continuous at , produces close to whenever its input is close enough to . The subtlety is the phrase "close enough": 's tolerance for how close its input must be to is some determined by and by whatever error bound we were originally handed. It is 's job, using its own continuity at , to guarantee that a sufficiently small perturbation of around forces to land within that -window around . The chain of implications runs backward from the desired output error to the required input error, which is why composition proofs read most naturally "outside in."
Theorem and proof
Let , let , and suppose satisfies . Suppose: 1. is continuous at , and 2. is continuous at the point . Then the composition is continuous at . Consequently, if is continuous on all of and is continuous on all of , then is continuous on all of .
We prove the pointwise statement directly from the - definition of continuity; this is the natural and standard technique for this result, and it does not presuppose the theorem being proved.
Step 1 (Fix the target tolerance). Let be given. We must produce such that
Step 2 (Use continuity of at to get an intermediate tolerance ). Since is continuous at , applying the definition of continuity to with this same yields some such that
This depends only on , on the point , and on ; it does not yet involve or .
Step 3 (Use continuity of at , with target tolerance , to get ). Since and is continuous at , applying the definition of continuity to — with in the role of the "epsilon" for — yields some such that
Step 4 (Chain the two implications). Let with . By , . Since , the point lies in , and it satisfies with as well. Thus the hypothesis of is met with , and we conclude
that is,
We have exhibited, for every , a (constructed in Steps 2–3) with the required property. Hence is continuous at .
The "on all of " consequence. If is continuous at every point of and is continuous at every point of , then for each hypothesis (1) holds at that , and hypothesis (2) holds because and is continuous there. The pointwise result just proved applies at every , so is continuous on all of .
∎Under the same hypotheses as the theorem, if is any sequence in with , then .
This is an independent second proof, using the Sequential Characterization of Continuity rather than - directly; it is logically equivalent to (but not derived from) the proof above, since the sequential characterization is itself proved from the - definition. Let be a sequence in with . Since is continuous at , the sequential characterization of continuity gives
Now is a sequence in (because ) converging to . Since is continuous at , applying the sequential characterization again (this time to , with the sequence ) gives
i.e. . Since was an arbitrary sequence in converging to , the sequential characterization of continuity (applied to at ) gives that is continuous at .
∎The theorem asserts pointwise continuity of at from pointwise data at and only. No claim is made here about uniform continuity of from uniform continuity of and separately; that is a related but distinct statement requiring its own hypotheses and proof, and is not addressed by this theorem.
Worked examples
Example 1: A genuinely asymmetric chain, verified by hand. Let
so . Take the basepoint . Set up the pieces. We have (domain of ). Since for all real (as ), the range of lies in , which is exactly the domain of (we need , i.e. ). So the composition is well-defined on all of . Check hypothesis (1): continuous at . By the Algebra of Continuous Functions, is continuous everywhere (product and sum of continuous functions) and is never , so its reciprocal is continuous everywhere, in particular at . Numerically, . Check hypothesis (2): continuous at . Write where is continuous everywhere (polynomial), and is continuous on — a standard fact provable directly from - (and itself an instance of continuity of elementary functions). At : , so is continuous at . By this very composition theorem applied one level down, is continuous at . Apply the theorem. Since is continuous at and is continuous at , the theorem gives that is continuous at . Numerical sanity check. . Perturb slightly: at , , and . The output moved by about while the input moved by — consistent with continuity (small input change, small output change), and consistent with the chain: moved by , well inside any small , and 's local behavior near (derivative ) amplifies that by a bounded factor.
Example 2: A case where a piece is discontinuous at the wrong point, but composition still works because the theorem's exact hypothesis is met. Let
Here is discontinuous at (jump from the constant value nearby to at the point) but we are evaluating at , so . Let's see what the theorem does and does not say. Check hypothesis (1): is continuous at (polynomial). Fine. Check hypothesis (2): We need continuous at . But is discontinuous at ! So hypothesis (2) fails, and the theorem simply does not apply here — it makes no claim about at . Indeed, let's check directly: . But for near , , is near but generally (e.g. ), so . Thus as : is discontinuous at , exactly because hypothesis (2) failed. This is not a counterexample to the theorem — it illustrates that the hypothesis is necessary and that checking it at the correct point , not at , is the crux of applying the theorem correctly. Now contrast with : , so hypothesis (2) becomes " continuous at " — and indeed is continuous at (it equals the constant on a whole neighborhood of , since for all ). So the theorem applies at and correctly predicts continuous at ; direct check: for all with , i.e. for all near other than , and , matching.
The theorem requires continuous at the specific point . If we instead only assume is continuous at itself (a category error when , but a natural point of confusion) or continuous merely at some point, composition can fail badly. Take again
Here is continuous everywhere, in particular at , and . Is continuous at ? No: has a jump at (value at , but for all arbitrarily close to ). So hypothesis (2) fails at the required point , even though one might carelessly note " is continuous at plenty of other points, e.g. at " — irrelevant, since . Consequence: . For , , so . But . So
and is discontinuous at , despite being continuous everywhere and being continuous at many points — just not at the one point that matters, . This shows the hypothesis " continuous at " cannot be weakened to " continuous at " or " continuous somewhere nearby "; it is continuity at the exact image point that the proof's Step 2 uses, and dropping this precision breaks the conclusion.
Scope, edge cases & common traps
| Situation | What the theorem says | Common error |
|---|---|---|
| continuous at , continuous at | continuous at | — (correct application) |
| continuous at , continuous at but not at (and ) | theorem does not apply; conclusion can fail | Checking 's continuity at the wrong point, instead of |
| continuous on all of , continuous on all of | continuous on all of | Forgetting to check , i.e. that the composition is even well-defined |
| both continuous everywhere except one shared "bad" point that composition might avoid or hit | Must check pointwise at for the specific in question | Assuming "mostly continuous" pieces compose to something "mostly continuous" without verifying the image point |
| discontinuous at but constant near | Theorem's hypotheses fail (need continuous at ); conclusion may still happen to hold by coincidence, but is not guaranteed by this theorem | Citing the theorem when one hypothesis silently fails |
The mathematician behind it
Origins · 1 minAugustin-Louis Cauchy and how this was discovered
Cauchy was among the first to insist on a workable, rigorous definition of continuity and limit, in his Cours d'analyse (1821), replacing informal appeals to "infinitely small quantities" with inequality-based reasoning that is the direct ancestor of the modern - formulation later sharpened by Weierstrass. The basic permanence properties of continuous functions — that sums, products, and compositions of continuous functions remain continuous — were established in this era as part of the broader project of putting calculus on a logically secure footing, replacing Euler-style formal manipulation of infinite series and "continuous" functions understood loosely as those given by a single analytic expression.
Do I need and to be continuous at the same point?
No — and this is the single most important subtlety. You need continuous at the input point , and continuous at the output point , which is generally a different real number from . For instance if and , you need continuous at , not at . Conflating these two basepoints is the most common way students misapply this theorem. Always compute first, then check 's continuity there.
Does the theorem require and to be continuous on their entire domains, or just at one point?
The core theorem is stated pointwise: continuity of at and of at suffice to conclude continuity of at . Nothing is assumed about behavior at other points. The "globalized" corollary — continuous on all of — follows immediately by applying the pointwise result at every , provided is continuous throughout and is continuous throughout (or a superset of it).
What if is not in the domain of ?
Then is not even defined at , and the question of its continuity there does not arise. The standing assumption (domain of ) in the definition of composition guarantees makes sense for every ; checking this containment is a prerequisite bookkeeping step before continuity is even a meaningful question.
Is the converse true: if is continuous at , must and individually be continuous at and respectively?
No, and this converse is false in general — it is not claimed by the theorem. A simple illustration: let for all (continuous) but let be wildly discontinuous everywhere except at , where it happens to be continuous. Then is the constant function , which is continuous, even though itself is discontinuous almost everywhere — but note is continuous at the one point that matters, , so this does not violate the theorem; it just shows the composition's continuity can survive even when misbehaves off the relevant point. In fact one can construct examples where is continuous at while itself is discontinuous at , by having 's discontinuity be "invisible" to (e.g. constant). So the converse direction is genuinely false and is not asserted here.
Why does the proof go "outside-in" — choosing for before for ?
Because the quantity we ultimately want to bound, , is controlled by 's continuity, which tells us how close needs to be to (within some ) to guarantee that output bound. Only after we know this required closeness can we ask 's continuity (at ) to produce a guaranteeing inputs within of land within of . The dependency is , which is why the tolerance for the outer function must be fixed before the tolerance for the inner one.
Does this theorem work the same way for one-sided continuity or continuity on an interval endpoint?
Yes, with the natural adaptation. If is a left endpoint of and is right-continuous at (using one-sided limits/-neighborhoods restricted to ), and is continuous (or appropriately one-sided continuous) at , the identical proof goes through verbatim, since the - argument never used two-sidedness — only that ranges over near . This is exactly how continuity of composed functions is verified at endpoints of domains such as .
How does this relate to the chain rule for derivatives?
The chain rule is a differentiable refinement of the same compositional idea: it requires differentiable at and differentiable at (matching basepoints, exactly as here) to conclude differentiable at with derivative . Since differentiability at a point implies continuity there, the chain rule's hypotheses are strictly stronger, and its conclusion (differentiability) is strictly stronger than mere continuity — but the "match the basepoints correctly" structure of the argument is identical to the composition-of-continuity theorem proved here.