Continuity on Intervals and Sets
What does it mean for a function to be "continuous on "? The limit definition of continuity requires points on both sides to make sense. At an endpoint like , there is no room to approach from the left. So the ordinary two-sided limit may not even be a sensible demand. Yet we routinely say is continuous on , endpoints included. Making this precise requires upgrading "continuity at a point" to "continuity relative to a set." It also requires handling endpoints through One-Sided Limits. This matters because almost every major theorem of one-variable analysis depends on it. This includes the Intermediate Value Theorem, the Extreme Value Theorem, integrability of continuous functions, and Uniform Continuity. Each is a statement about a function continuous on an interval, not merely continuous at isolated points. Getting the definition of "continuous on a set" right, especially at boundary points, is the hinge on which all of these results turn. A sloppy definition either excludes functions that obviously ought to count (like on ). Or it silently smuggles in false theorems. The big picture is that continuity is fundamentally a local, relative notion. It depends on which points are "nearby" within the set on which we're working. On an open interval, every point has room on both sides. So relative continuity reduces to ordinary two-sided continuity. On a closed interval , the endpoints only have neighbors on one side within the set. So continuity there is defined using one-sided limits. This same idea generalizes uniformly to any subset . It does so via a single unifying – definition relative to . This article gives the precise definition of continuity on a general set. It shows this definition specializes correctly to the open-interval and closed-interval cases. It proves the key structural theorem: continuity on a set is equivalent to continuity at each point of the set relative to that set. It also proves an algebraic closure theorem (sums, products, quotients, compositions). Along the way we build the necessary machinery. This includes endpoint behavior, worked examples with a jump discontinuity removed only relative to a subset, and a counterexample showing why the "relative" qualifier cannot be dropped. These tools are needed to state the three landmark theorems that follow.
- Continuity "at a point" only needs two-sided limits when that point has neighbors on both sides; at endpoints of we must fall back on one-sided limits.
- The general definition: is continuous on at if for every there is such that and force — everything is relativized to .
- On an open set/interval this reduces to ordinary continuity at each point; on it reduces to continuity on plus right-continuity at and left-continuity at .
- Continuity on a set is a pointwise, local condition checked one point at a time, not a single global — that stronger global version is Uniform Continuity.
- Sums, products, quotients (where defined), and compositions of continuous functions on a set are continuous on that set — proved directly from the – relative definition.
- Key idea: continuity on a set is continuity at every point of that set using only points of the set itself to test nearness, with one-sided limits automatically supplying the right notion at boundary points.
Where this lives today
Continuity on a set is the precise hypothesis behind essentially every existence theorem in single-variable analysis. The Intermediate Value Theorem requires exactly " continuous on " in the relative sense proven here — the endpoint values must genuinely be the right one-sided limits, or the theorem's proof (via the least-upper-bound of the set of points where stays negative) breaks down. The Extreme Value Theorem similarly requires continuity on a closed, bounded interval; the closedness is used precisely so that endpoint continuity, as defined here via one-sided limits, is part of the hypothesis, ruling out functions like on which blow up as the excluded endpoint is approached. Uniform Continuity takes this article's local, point-by-point definition and strengthens it to a single global , a distinction essential to proving that continuous functions on compact sets are Riemann integrable. In numerical analysis, root-finding algorithms such as bisection depend on continuity on a closed interval including verified endpoint behavior. In probability theory, cumulative distribution functions are typically only right-continuous, a one-sided continuity notion structurally identical to the endpoint definition given here. In complex analysis and topology, the relatively-open-set characterization proven above generalizes verbatim to continuous maps between arbitrary topological spaces, making it the bridge between elementary – analysis and general topology.
:::quiz[Which is the correct condition for to be continuous at the endpoint ?]
- , two-sided
- ✓
- must be differentiable at
:::quiz[Let and , on . Is continuous on ?]
- No, because is far from nearby values
- No, because is not an interval
- Yes, because is an isolated point of so continuity there is automatic ✓
- Yes, but only because happens to be an integer
:::quiz[Why does the counterexample with on , on NOT contradict the Intermediate Value Theorem?]
- It does contradict it; the theorem is simply false in this generality
- The IVT requires to be a single interval, and is not an interval ✓
- The IVT only applies to polynomials
- is not actually continuous on in this example
:::faq[Why can't we just use the ordinary two-sided limit definition at every point of , including the endpoints?] Because at , there are no points of the domain to the left of , so the two-sided limit is not defined at all — it would require values of at points less than , which simply don't exist. The – definition, honestly interpreted, only ever quantifies over actually in the domain, so at the "" restriction silently forces (aside from itself), which is precisely the definition of the right-hand limit. This is not an ad hoc patch; it's what the general relative definition produces automatically once you take the "" clause seriously, as proved in the Corollary above.
:::faq[If is continuous on , does that automatically make it continuous on once we define and suitably?] Only if the one-sided limits actually exist and you set the endpoint values equal to them. Continuity on says nothing by itself about whether exists; for example is continuous on but has no limit as , so no choice of makes the extension continuous on . When the one-sided limits do exist, defining and is exactly what's needed, by the Corollary proven above, to make the extended function continuous on the closed interval.
Ask the tutor: Why does the Extreme Value Theorem fail if the closed interval is replaced by an open one, even though the function is continuous on the whole open interval?
Let , let , and let . We say is continuous at relative to (or just continuous at when is understood) if for every there exists such that
We say is continuous on if is continuous at relative to for every . Two important special cases recover familiar language:
- If is a limit point of (i.e. every neighborhood of contains points of other than ), the definition above is equivalent to
interpreting the limit relative to . When and , this limit is exactly the right-hand limit ; when it is the left-hand limit .
- If is an isolated point of (some neighborhood of meets only at ), then is automatically continuous at relative to , since for small enough the only with is itself, and trivially.
For an open interval , every has a full two-sided neighborhood inside , so continuity on coincides with ordinary continuity at each point in the sense of Continuity at a Point. For a closed interval with : is continuous on if and only if is continuous at every in the ordinary two-sided sense, is right-continuous at (meaning ), and is left-continuous at (meaning ).
Intuition
Think of continuity at as a promise: make close enough to , and I will make close to . The subtlety is the phrase "close enough" — close enough among which candidate 's? If is only defined on , it is meaningless to demand the promise hold for outside ; there is no to control. So the promise is always tested using only. This is not a weakening of continuity for the sake of convenience — it is the only logically coherent way to state the definition when the domain is not all of . At an interior point of an interval, surrounds symmetrically, so "close enough within " is indistinguishable from "close enough in ": the relative and absolute notions agree. At an endpoint like in , the set only extends to the right of ; there is no left side to test, so the – condition automatically becomes a statement purely about the right-hand behavior — recovering exactly the one-sided limit condition . A second, easily overlooked feature: continuity on a set is a pointwise property checked separately at each point, possibly with a different at each and each . This is what makes it different from — and weaker than — the single, uniform demanded by Uniform Continuity, a distinction the next figure is designed to make vivid alongside the endpoint picture.
:::svg[Endpoint continuity of on tested at using only points of ]
Let and . Then is continuous on if and only if for every open set , the set
is relatively open in , meaning for some open set .
We prove both directions using the – definition directly; this is the standard topological reformulation of continuity, adapted to a relative domain, and it will be the tool we use repeatedly.
() Suppose is continuous on . Let be open, and let . We must produce an open with . If , take , which is open, and . So assume and fix . Then , and since is open there is with . By continuity of at relative to (applied with this ), there exists such that
Equivalently, . Define
As a union of open intervals, is open. We claim .
- (): Each lies in and in its own interval , so .
- (): If , then for some , and ; by the containment shown above, .
Hence , so is relatively open in .
() Suppose is relatively open in for every open . Fix and . Let , an open set containing . By hypothesis, for some open . Since , we have , so . Because is open, there is with . Now suppose and . Then and , so , meaning , i.e. . This is exactly the continuity condition at relative to , for the given . Since and were arbitrary, is continuous on .
∎:::corollary[Reduction to endpoints on ] Let with . Then is continuous on if and only if: (i) is continuous at every in the ordinary two-sided sense; (ii) ; and (iii) .
This is immediate from the Definition of continuity at a point relative to a set applied at each type of point of , and does not require the topological reformulation above (that theorem is not used here — this is a direct unwinding of the – definition, avoiding circularity).
Interior points. Let . Choose , so that . For , the condition " and " is equivalent to " and ," since every such automatically lies in . Hence, for such , continuity of at relative to is verbatim the ordinary two-sided continuity condition at . (Any valid from the ordinary definition can be shrunk below without breaking the implication, since shrinking only removes candidate 's; so the two conditions are logically equivalent.) This proves the equivalence of continuity on at with ordinary continuity at , for each interior .
Left endpoint . Here is a limit point of , and every with satisfies . So the condition ", " is equivalent to "" (for ). Thus the relative-continuity condition at ,
is precisely the statement (the case contributes trivially and imposes no extra condition). This proves the equivalence at .
Right endpoint . Symmetrically, every with satisfies , so the relative-continuity condition at is exactly . Since continuity on means continuity at every point of relative to , and we have shown this is equivalent, point by point, to (i), (ii), (iii) respectively, the corollary follows.
∎Let , let be continuous on , and let . Then: 1. and are continuous on . 2. is continuous on . 3. If for all , then is continuous on . 4. (Composition) If is continuous on , then is continuous on .
Fix and throughout; we produce a valid for the relative continuity condition at in each case. This is a direct – argument, the same technique used to prove the algebra of limits, transplanted to the relative setting — no circularity, since it uses only the definition, not any theorem we are trying to prove.
(1) Sum and scalar multiple. Since are continuous at relative to , choose so that , and so that . Let . If and , the triangle inequality gives
So is continuous at relative to ; since was arbitrary, is continuous on . For : if the function is constant, trivially continuous. If , given choose with ; then .
(2) Product. First note continuity of at (relative to ) implies is bounded near in : taking in the definition gives with , hence for such . Let . Write
Choose so that (possible since ; if then near in and the first term vanishes identically, so this case is handled trivially by choosing ). Choose so that . Let . Then for , :
(3) Quotient. By (2) it suffices to show is continuous on whenever is continuous on and never zero on (then ). Fix ; let . Since , let . By continuity of at , choose with , which forces by the reverse triangle inequality. Choose with . Let . For , :
(4) Composition. Let . Since is continuous at relative to , there is such that
Since is continuous at relative to , there is such that
Combining: if and , then and , so applying the first implication with gives . Thus is continuous at relative to . Since was arbitrary, is continuous on .
∎Worked examples
Example 1 — a genuinely one-sided endpoint check. Let
Show is continuous on , using the endpoint corollary. Interior points . For , is a quotient of continuous functions (sine composed with the continuous map , divided by ) on the set where the denominator . By the algebra-of-continuity theorem (parts 2, 3, 4, applied on the open set where ordinary and relative continuity coincide), is continuous at every such . Left endpoint . We must check . Substituting ,
using the standard one-sided (and in fact two-sided) limit . This matches , so is right-continuous at . Right endpoint . Since is not an endpoint requiring a separate one-sided argument beyond ordinary continuity — wait: is the right endpoint of , but is already given by the same closed-form expression at (no case split there), and that expression is continuous at as a quotient of continuous functions with nonzero denominator ; two-sided continuity at an endpoint always implies the required one-sided continuity, since the one-sided limit is a special case of the two-sided one. Concretely by continuity of the formula itself. Hence by the Corollary, is continuous on .
Example 2 — continuity on a set that is neither open nor closed, and a genuinely removable behavior only at one non-endpoint. Let , and define by
Show is continuous on . Points in . Fix . Choose if ; if , we treat it as a one-sided endpoint of on the left, since no points of lie left of . In either case, for near (within a small enough radius), lies in , not at the isolated point — because is at distance from any , we may always choose (or, at , ) to exclude from consideration entirely. On , is a product of the continuous identity function with itself (Theorem, part 2), hence continuous at each relative to ; at this uses the one-sided (right) limit , matching the endpoint case of the definition since is the left edge of . Explicitly at : given , take . If and , then since , (as ), forcing , and . The isolated point . Since is isolated in (indeed ), continuity there is automatic: given any , take ; then forces , so . Hence is continuous on all of — despite the enormous, discontinuous-looking jump from values near (approaching ) to the isolated value at . This illustrates that continuity on only ever compares at points that are actually close within ; since no point of is close to inside , no contradiction arises. If we had instead defined with the same formulas, would fail to be continuous at -adjacent points approaching from the right of within — but in our actual example, so this concern does not arise here.
The hypothesis that nearness is tested only using points of is not a technical nicety — omitting it destroys the theory. Consider
Using the correct, relative definition: is continuous on . Indeed, for , choose ; then with forces (since the gap to is at least once and ), so exactly, giving for any . Symmetrically for . So every point of passes the relative continuity test, at every , with an honest . Now suppose instead we (incorrectly) required the – condition to hold for all real with , i.e. we drop the restriction "" and instead implicitly extend by treating undefined values as violations, or equivalently ask whether , viewed as a function on all of (undefined on ), satisfies the ordinary two-sided continuity definition at . There, no works: , but is not even defined for when , so the ordinary definition cannot be satisfied (there is no value to compare to ), and one is forced either to declare discontinuous at , or to make an ill-posed comparison to undefined quantities. This shows: if you drop the "for " restriction (i.e. you insist on testing the promise against points that may not even lie in the domain), the very statement " is continuous at " becomes either meaningless (comparing to undefined values) or forces you to falsely reject perfectly good functions like this one, whose restriction to each piece is manifestly as continuous as a constant function can be. The relative qualifier is what makes " continuous on " a coherent, checkable, and true statement.
Scope, edge cases & common traps
| Situation | Correct treatment |
|---|---|
| interior to (full 2-sided neighborhood in ) | Ordinary two-sided continuity at |
| = left endpoint of an interval component of | Right-hand limit must equal |
| = right endpoint of an interval component of | Left-hand limit must equal |
| isolated point of | Automatically continuous at — no limit condition to check |
| not an interval (e.g. two disjoint intervals) | Check continuity on each piece; no comparison needed between pieces |
| Function continuous on but not closed | Extreme Value Theorem and Uniform Continuity guarantees can fail (see below) |
The mathematician behind it
Origins · 1 minKarl Weierstrass and how this was discovered
Weierstrass is the figure most responsible for the rigorous – formulation of limits and continuity used throughout this article. Trained originally in law and later working for years as a secondary-school teacher in remote Prussian towns, he developed his analytic rigor largely in isolation before his 1854 paper on Abelian functions brought him to prominence and, soon after, a professorship in Berlin. There he built the arithmetization of analysis: defining real numbers, limits, and continuity purely in terms of inequalities among numbers, banishing appeals to geometric intuition or infinitesimals as primitive undefined objects. His lectures — never published by him directly, but transcribed and circulated by students such as Cantor and Schwarz — fixed the modern definition of continuity at a point and, by extension, continuity on a set, exactly the local, relativized – formulation given here.
Is continuity on a set the same as being continuous "as a function on all of "?
No, and this distinction matters. A function defined only on has no meaning outside , so "continuous on all of " doesn't even parse unless you first extend to all reals. Continuity on is entirely intrinsic to : it only compares values of at points that are close to each other within . The counterexample with shows a function that is perfectly continuous on yet has no continuous extension to agreeing with both pieces, because the Intermediate Value Theorem would force a contradiction on any such extension.
Why does the theorem require checking BOTH left- and right-continuity separately at interior points, rather than combining them into one condition?
At an interior point , both one-sided limits exist as sub-cases of the full two-sided limit, and requiring the two-sided limit to equal is logically equivalent to requiring both one-sided limits to exist, be equal to each other, and equal . We don't need to check them "separately" at interior points — the proof of the Corollary shows the two-sided – condition is recovered exactly, because a full neighborhood of lies in . The one-sided treatment is only forced upon us at the endpoints , where a full two-sided neighborhood does not fit inside the domain.
Does continuity on a set imply the function is bounded, or attains a maximum, on that set?
Not in general — both can fail if the set is not closed and bounded. For instance is continuous on but unbounded as , since is excluded from the domain so there is no endpoint-continuity requirement forcing boundedness there. The Extreme Value Theorem recovers boundedness and attainment of extrema, but only under the extra hypothesis that the domain is a closed, bounded interval (or more generally a compact set) — continuity alone, on an arbitrary set, is not enough.
How does this relative definition generalize beyond ?
The – formulation given here, and especially the equivalent open-set/relatively-open-set characterization proved in the theorem above, transplants verbatim to any metric space, and even to general topological spaces (replacing -balls with open sets and "relatively open in " with the subspace topology). This is exactly why the topological reformulation was included: it is the version of continuity-on-a-set that survives unchanged when you leave for higher dimensions or abstract spaces, whereas the raw one-sided-limit language is special to the order structure of .
Is an isolated point of the domain really always a point of continuity, with no exceptions?
Yes, and this sometimes feels counterintuitive until you check the definition directly. If is isolated in , there is some radius such that the only point of within distance of is itself. Given any , choosing makes the hypothesis ", " force , so the conclusion holds trivially, regardless of how behaves elsewhere. There is genuinely no way for this to fail — it is a direct, unconditional consequence of the – definition, not a convention imposed by fiat.