A function limit asks what outputs approach as inputs approach a point, whether or not the function is defined there. At an accumulation point of its domain, continuity additionally requires the value at the point to agree with that limiting behaviour. The relative definition below also covers isolated domain points.
Definition 2.1.1
(Function limit and continuity)
Let . Suppose is an accumulation point of : there are points of arbitrarily close to other than . We write if for every there is such that and imply .
For , continuity relative to means: for every there is such that and imply . At an accumulation point this is equivalent to the preceding limit being . At an isolated point, choose so that the only domain point within that distance is ; the output difference is then zero. Thus every function is continuous at each isolated point of its domain. At an endpoint of a nondegenerate interval the definition uses the corresponding one-sided limit.
When the domain contains points arbitrarily close to on both sides, the two-sided limit exists exactly when the left- and right-hand limits both exist and agree. Polynomial functions are continuous everywhere, rational functions where the denominator is nonzero, and sums, products, quotients with nonzero denominator, and compositions of continuous functions are continuous where defined. In radian measure the standard limit is ; it supports the derivative of sine later. Limits at and describe the two directions separately; neither infinity is a real input.
Theorem 2.1.2
(Intermediate and extreme values)
Let be real. If is continuous on , it attains a maximum and a minimum there. If lies between and , then for some . Closedness, boundedness and continuity matter for the extrema assertion; continuity on an open interval alone need not give extrema.
Proof
(Supremum proof of the intermediate value theorem)
If , or equals an endpoint value, take that endpoint. Assume now and , and let . This nonempty bounded set has . If , then because ; continuity gives a point sufficiently near with . This contradicts being an upper bound of . If , then because ; continuity makes all values in a sufficiently small relative neighborhood of greater than . The supremum property supplies a point of in that neighborhood, a contradiction. Therefore . If , apply the same argument to and .
Counterexample mode
Each hypothesis of the extreme value theorem is needed
The extreme value assertion above needs a closed interval, a bounded interval and continuity, and dropping any one of them can destroy it.
- Closedness. On , is continuous and bounded, and . Every value is positive, so no minimum is attained.
- Boundedness. On , is continuous, but for every the value is larger, so no maximum is attained.
- Continuity. On , let for and . Then , but at every point, so no maximum is attained.
The compactness proof later in this note shows where each example escapes. It chooses points with values approaching the supremum (or infimum) and extracts a subsequence converging to a point of the domain, at which continuity passes the limit to . In the first example the minimising points converge to , which is outside ; in the second the maximising points have no bounded subsequence; in the third the maximising points converge to , but is not the limit of .
Worked example 2.1.3
(Removing an apparent singularity)
For , . Therefore the limit as is even though the original quotient is undefined at . Defining the missing value as makes the extended function continuous there. Cancelling the factor does not make the original quotient defined at .
Worked example 2.1.4
(A root exists, but is it unique?)
For , and . Continuity and the intermediate value theorem give a root in . For , , since . Thus strict increase and uniqueness already follow by algebra. Moreover for every real , so the mean value theorem later shows is strictly increasing and the root is unique. The intermediate value theorem alone shows existence, not uniqueness.
Concept lensAlgorithmic
Bisection turns existence into an approximation
The intermediate value theorem asserts that a root exists; repeated halving locates it. If is continuous on with , evaluate at the midpoint . If , stop; otherwise keep the half on which the signs at the two ends still differ. Each step preserves the sign condition, so by the theorem each new interval still contains a root, and after steps the interval has length .
For on , the values are , , and . The intervals are therefore , , and , so the unique root found in the example above lies in ; it is approximately . Ten steps give an interval of length . The nested intervals also give a second proof of the theorem: their left endpoints increase and their right endpoints decrease to a common limit , and continuity forces . Like the supremum proof, this argument uses the completeness of .
Limits at a boundary and comparison
For , approach only from the left; approaches from the right. If the domain approaches from both sides, the two-sided limit exists exactly when both one-sided limits exist and agree. For example equals for negative and for positive , so its two-sided limit at zero does not exist. No choice for its value at zero can make it continuous there.
The squeeze theorem for functions says that if near , excluding if necessary, and both outer functions tend to , then . For instance for , proving . Thus the oscillation of an inner expression can coexist with a well-defined limit of the whole product.
Worked example 2.1.5
(Rationalisation)
For , where the square root is defined. Therefore the limit as is . Multiplication by the conjugate is valid for nearby ; it does not authorise dividing by zero at the limiting point.
Choosing a method
Substitute directly when continuity applies. For an indeterminate quotient, factor or rationalise before substitution; for oscillation use a squeeze estimate. Check left and right limits for piecewise functions. Use the intermediate value theorem for existence, then a separate monotonicity argument if uniqueness is requested.
Exercises
- Prove using the definition.
- Find so that for and is continuous at .
- Show that has a root in .
Full solutions
- Given , choose . Then gives .
- For the quotient equals , whose limit at is . Continuity holds exactly when .
- The polynomial is continuous on , with values and . Since zero lies strictly between them, the intermediate value theorem supplies a root in .
Connection
Limits define derivatives and later explain why sums approximate integrals. Continuity supplies the hypotheses for the existence theorems underlying optimisation and integration.
Proofs supporting the methods used in this note
Finite real limit laws and geometric sequences: proofs develops this prerequisite with its hypotheses, proof and examples.
Subsequences develops this prerequisite with its hypotheses, proof and examples.
Real closed sets: the sequence criterion and the open complement
Work on the real line in the usual classical set-theoretic setting, with countable witness selections available. A set is open when every in has some with contained in . We use the Archimedean consequence that tends to zero. For every subset of the real line, the following conditions are equivalent:
- Every sequence of points of that converges in the real line has its limit in .
- The complement of is open.
Proof of 2 implies 1. Suppose belongs to and tends to . If were outside , openness would give with disjoint from . Convergence gives a threshold after which , contradicting in . Therefore belongs to .
Proof of 1 implies 2. Fix outside . If no positive-radius interval around avoided , then for every positive integer there would be a point in with . Choose these witnesses as a sequence. Given , choose with . For , , so tends to . Condition 1 would force into , a contradiction. Hence some interval around avoids . This holds for every point of the complement, proving it open. The witness-sequence step uses the stated classical setting; this proof is not offered as a theorem about choice-free foundations. If is empty there is no sequence in , and its complement is the whole open line. If is the whole line, its empty complement is open vacuously. Both edge cases also satisfy the equivalence.
Compactness on the real line
A set is compact if every family of open sets whose union contains has a finite subfamily still covering . A set is closed if it contains all limits of convergent sequences of its points, equivalently if its complement is open. Sequential compactness means every sequence in has a subsequence converging to a member of .
The empty set is compact, closed and bounded, and sequentially compact vacuously. In proofs using a selected point or an infinite sequence, treat that case separately. We may assume the real completeness property and its nested-interval and Bolzano–Weierstrass consequences from the earlier sequence units.
Theorem: Heine–Borel in the real line
For , the following are equivalent: compactness by open covers; closedness and boundedness; sequential compactness.
Compact implies closed and bounded. The intervals , , cover , hence . A finite subcover gives a bound. To show closedness, take . For each , the interval avoids . A finite subfamily covers . Let be the minimum of their positive half-distances to . Every point in the chosen interval centered at has distance from strictly greater than . Thus misses , showing its complement open. If is empty this is immediate.
Closed and bounded implies compact. Enclose nonempty in a closed bounded interval . Suppose an open cover of has no finite subcover. Bisect . At least one closed half meets in a set not finitely coverable; otherwise two finite collections would cover . Choose such a half and repeat. We obtain nested closed intervals with lengths tending to zero, and not finitely coverable. Each intersection is nonempty; choose . The nested-interval property gives a unique common point , and because both lie in . Closedness gives . Some member of the cover contains , and openness gives a ball around inside . For large , the whole interval lies in that ball, so alone covers , a contradiction.
Closed and bounded implies sequentially compact. Every sequence in is bounded, so Bolzano–Weierstrass supplies a convergent subsequence. Closedness retains its limit in .
Sequentially compact implies closed and bounded. If unbounded, choose with ; no subsequence can converge to a finite real number, a contradiction. If is a limit of points in , choose with . A subsequence converges to a point of by sequential compactness, but it also converges to ; uniqueness of real limits gives . Thus is closed. This completes all implications.
Continuous images and extrema on the real line
Let be compact and let be continuous relative to . Then is compact. If , is bounded and attains a maximum and a minimum. In particular this applies to a continuous function on a nonempty closed bounded interval.
Proof. For any sequence , select with . The just-proved real-line compactness theorem supplies a subsequence . Relative continuity gives . Thus the image is sequentially compact and hence compact by the real-line equivalence above; if is empty the image is empty and the claim is immediate. For nonempty , its image is nonempty, closed and bounded. Let , which exists by real completeness. For each choose with . Then , and image closedness gives , so the maximum is attained. Apply the same argument to for the minimum. These arguments use no derivative test.
Sector area and radians
Use these elementary geometric facts: the unit circle has circumference and enclosed area , with the same in both formulas; planar area is invariant under rotations, finitely additive for regions with disjoint interiors, and monotone under inclusion.
Let be measured in radians and put . On the unit circle, is the arc length, so is the fraction of the full circumference subtended by the angle. Divide the circle into equal-angle sectors. Rotations carry each sector onto the next, so all have equal area. Their interiors are disjoint and together they fill the disk; finite additivity gives area for each. Thus a sector with rational fraction of a turn has area .
For arbitrary in this range, choose rational numbers with . Taking all sectors from the same initial ray, the corresponding sectors are nested by inclusion, so area monotonicity and the rational case give
Taking yields . This establishes the sector-area formula used in the geometric comparison.
The fundamental trigonometric limit
All limits in this section use radians. For , compare the areas of the inner triangle, unit-circle sector, and outer tangent triangle:
The sector area is specifically because is in radians. Divide through and use positive cosine to obtain
For , the area comparison above also gives and . Using ,
Thus as . Since cosine is even, the same limit holds from the left.
As , cosine tends to one, so the squeeze principle gives . The quotient is an even function of , giving the same left limit. The squeeze principle itself follows from the finite-limit definition: if lower and upper functions are both within any prescribed tolerance of , every number between them is too.
Two consequences are
For the first, divide by . For the second, use to get one half times . In particular .
Optional appendix: finite-dimensional compactness
The one-dimensional theorems used in this course are proved above. This appendix gives the higher-dimensional generalization, a sphere example and three exercises (P01–P03) with full solutions; it is a route toward multivariable analysis, not an additional hypothesis for the interval theorems.
Fix an integer and the Euclidean norm on . A set is bounded if it lies in some finite-radius ball, closed if its complement is open, and compact if every cover by open subsets of has a finite subcover. We use real completeness, including the nested closed interval property.
Heine–Borel in finite-dimensional Euclidean space
Theorem. A set is compact if and only if it is closed and bounded. The empty set satisfies all three properties.
Compact implies bounded. The open balls , an integer, cover . A finite subcover puts inside the largest of these balls.
Compact implies closed. Suppose and . The balls , , cover . Choose a finite subcover with centers and set . If lies in the ball centered at , the triangle inequality gives . Hence misses , so the complement is open.
Closed and bounded implies compact. Let nonempty be closed and bounded. Enclose it in a closed cube with . Suppose an open cover of has no finite subcover. Divide each coordinate interval into two closed halves. The resulting closed subcubes cover . At least one subcube has intersection with that is not finitely coverable by the given family; otherwise the finite union of the finite subcovers would cover . Select such a subcube and repeat. This produces nested closed cubes with side length and not finitely coverable, hence nonempty.
For each coordinate, the nested interval property gives a common coordinate value. Together these give . Every pair of points in has distance at most , so the intersection contains only . Choose . Then . A closed set contains such a limit: if were in its open complement, a ball around would eventually contain outside , a contradiction. Thus .
One member of the cover contains , and openness gives for some . For sufficiently large , every point of is within of , so alone covers . This contradicts the selection of . Therefore every open cover has a finite subcover. The number is finite; replacing it by infinitely many subpieces would invalidate this argument.
Continuous images and extreme values
Theorem. If is compact and is continuous relative to , then is compact. In particular, a continuous on nonempty compact is bounded and attains its maximum and minimum.
Here relative continuity uses Euclidean norms: for every and there is such that and imply . To justify the open preimages used next, if choose an output ball about inside . Continuity supplies an input ball whose intersection with maps into . The union of these input balls over all is an open set with .
Proof. An open cover of pulls back to relatively open sets , with open in . These cover , so finitely many suffice. Their corresponding cover , proving compactness. For scalar , the image is nonempty, closed and bounded by the theorem already proved in dimension one. Let . For each , the definition of supremum supplies with . Then , and closedness places in the image. Thus the maximum is attained. Applying the same argument to gives the minimum. This proves existence, not a formula for the maximizing input.
Worked example: the sphere needed for the real spectral theorem. The sphere is nonempty because it contains , and it is bounded. The reverse triangle inequality proves norm continuity, so is closed as the inverse image of the closed set . Heine–Borel makes it compact. For a real matrix , the polynomial is continuous, so its restriction to the sphere attains both extrema. Symmetry of is not needed for this existence claim; it is needed in the subsequent spectral argument and the gradient formula .
Appendix exercises
P01. Explain why the compactness assertion fails for the open unit ball even though that ball is bounded.
P02. Which step of the cube proof fails if is not closed? Give an example.
P03. For on the unit circle, find the extreme values of and every point where equality holds. Distinguish the existence theorem from the calculation.
Appendix solutions
P01. The open unit ball is not closed: lies in it for and converges to outside it. A compact set would be closed by the proved necessity, so the ball is not compact. Boundedness alone is insufficient.
P02. The limit of may be outside , at a point , so no member of the cover need contain . Explicitly take , the cover for integers , and the nested closed intervals for integers . These open intervals cover , but any finite collection has a positive smallest left endpoint and therefore fails to cover . The intervals have common point zero, which is outside ; consequently no member of the cover contains . This is exactly where the closed-set proof can fail.
P03. Writing with gives . The minimum is two, attained exactly at , and the maximum is five, attained exactly at . Compactness and continuity guarantee that extrema exist; the displayed identity determines their values and all equality cases.