Replace the two absolute values in the epsilon-delta definition by two distances and you have continuity for maps between any metric spaces. It is the same as continuity along sequences, and the same as 'preimages of open sets are open', which needs no distance at all and is where topology begins. Several variables bring new failures (limits that depend on the path), and homeomorphisms say when two spaces have the same shape.
Taught in 375/376Beyond the courseRudin, Principles of Mathematical Analysis, ch. 4 (Thm 4.2, 4.8, 4.14 to 4.22)Abbott, Understanding Analysis, Sec. 4.2 to 4.3 and 3.2Apostol Vol. 2, Sec. 8.4 and 8.5Munkres, Topology, Sec. 18
The definition of continuity in 1.3 used the real line twice: once for the input, as the distance ∣x−a∣, and once for the output, as ∣f(x)−f(a)∣. Both are distances. The proofs used only the four properties of distance listed in 4.1, so the definition makes sense for a map from any metric space to any other: a map from the plane to the line, from the space of functions to the line (the integral), from bit strings to numbers. This chapter writes down that definition, proves it is the same as continuity along sequences, and then proves the surprising third form: a map is continuous exactly when preimages of open sets are open. The third form mentions no number ε or δ and no distance, only open sets. That is the form topology (MATH 551) takes as the definition, and the reason 4.1 spent time on unions and finite intersections of open sets.
Quick checkIn the definition of continuity at a, who chooses δ and when?
The order of the quantifiers is the order of the game: for every ε there is a δ. Reversing it would say the same δ works for all ε, which only constant functions satisfy.Review: the definition of continuity
Quick checkIs (1,4)∪(6,7) an open subset of R?
Each interval is open, and any union of open sets is open (4.1). The endpoints 1,4,6,7 are not in the set, so there is nothing to check there. Open sets can have many pieces. (Connected sets cannot, which is 4.4.)Review: unions of open sets
Quick checkIn a metric space, what does xn→x mean?
The distance from xn to the limit tends to 0. The last option only says consecutive terms get close, which the sequence logn satisfies without converging at all (4.2).Review: convergence in a metric space
The picture: preimages of open intervals
A map f takes inputs to outputs. An open interval V on the output axis is a region with room around each of its points. The set of all inputs that land in V is the preimage of V, drawn in orange on the input axis. Three things to do:
Start with f(x)=x2 and slide the centre and radius of V. The preimage is always one or two open intervals, never including an endpoint. An endpoint would be sent to the edge of V, and V has no edge points.
Switch to the jump function and put V around 1 only. The preimage is [0,∞), which contains 0. But 0 has no room on its left. The jump has torn the line, and the preimage fails to be open.
Put V around −1 only. Now the preimage is (−∞,0), open. A discontinuous function can have some good preimages. Continuity means ALL open sets have open preimages, and one bad V is enough to fail.
Where this came from· Lipschitz, and a definition without numbers
In the 1800s Augustin-Louis Cauchy proved that the equation y′=f(x,y) with a starting value has a solution, and Rudolf Lipschitz later isolated the condition on f that makes the solution unique: the output changes by at most a fixed multiple of the change in y. That condition, now called a Lipschitz condition, is a quantitative form of continuity, and the multiplier is the contraction constant that 4.2 used to prove the existence theorem. Separately, Felix Hausdorff’s 1914 book defined spaces by open sets alone, with no distance. In a space like that the ε-δ definition is unavailable, and the only way to say that a map does not tear the space is that preimages of open sets are open. For metric spaces the two definitions agree, which is the first theorem below. The problem both solved was to say what continuous means without relying on the real line.
The idea, in words
Why· Three ways to say 'the map does not tear'
With numbers (ε-δ). Points that are close go to points that are close, with a recipe for how close. You can compute with this.
With sequences. If a sequence of inputs converges to a, the outputs converge to f(a). You can test with this: one bad sequence disproves continuity.
With open sets. If you fence off an open region in the output, the inputs that land in it form an open region. You can prove with this: it works cleanly with unions, intersections and composition, and needs no distance.
The theorem of this chapter says the three are the same property. The first is the one you reach for to find a δ. The second is the one that disproves continuity quickly. The third is the one that will carry over to spaces that have open sets and no distance.
Definitions and theorems
Definition B
Limit of a map between metric spaces
Let (X,dX) and (Y,dY) be metric spaces, A⊆X, f:A→Y, and let a be a limit point of A (a point of X, which may or may not be in A). Then L∈Y is the limit of f as x→a, written limx→af(x)=L, if
∀ε>0∃δ>0∀x∈A:0<dX(x,a)<δ⟹dY(f(x),L)<ε.
The condition 0<dX(x,a) excludes x=a, as in 1.3. Taking X=Y=R recovers that definition.
In one linelimx→af(x)=L if for every ε>0 there is δ>0 such that dY(f(x),L)<ε whenever 0<dX(x,a)<δ.
Why it existsIt is the limit of 1.3 with ∣x−a∣ and ∣f(x)−L∣ replaced by the distances of the two spaces, so it makes sense for maps from vectors, functions or bit strings.
Definition B
Continuous map between metric spaces
A map f:X→Y between metric spaces is continuous at a∈X if
∀ε>0∃δ>0∀x∈X:dX(x,a)<δ⟹dY(f(x),f(a))<ε.
It is continuous if it is continuous at every point of X. In words of balls: for every ball BY(f(a),ε) there is a ball BX(a,δ) that f sends inside it.
In one linef:X→Y is continuous at a if for every ε>0 there is δ>0 such that dY(f(x),f(a))<ε whenever dX(x,a)<δ; it is continuous if it is continuous at every point.
Why it existsIt says nearby inputs have nearby outputs, in whatever way each space measures nearness.
If a is a limit point of X, then f is continuous at a exactly when limx→af(x)=f(a), as in 1.3. If a is an isolated point (a ball B(a,δ) holds no other point of X), continuity at a is automatic: with that δ the only x allowed is a itself. In particular every map out of a discrete metric space is continuous.
For a map f:X→Y between metric spaces, the following are equivalent.
(a) f is continuous (ε-δ) at every point.
(b) For every a∈X and every sequence xn→a in X, f(xn)→f(a) in Y.
(c) For every open set W⊆Y, the preimage f−1(W) is open in X.
(d) For every closed set F⊆Y, the preimage f−1(F) is closed in X.
In one lineFor f:X→Y between metric spaces: f is continuous (with ε and δ) iff xn→a implies f(xn)→f(a) iff the preimage of every open set is open iff the preimage of every closed set is closed.
Why it is trueSequences and numbers are linked by taking δ=1/n; numbers and open sets by replacing a ball in the target by a ball in the source; open and closed by taking complements.
ProofRudin 4.8; Munkres 18.1
The idea: (a)⇒(b) and (b)⇒(a): the sequential criterion of 1.3, with distances. (a)⇒(c): a ball around f(a) inside W pulls back to a ball around a. (c)⇒(a): apply (c) to the ball B(f(a), ε), which is open. (c)⇔(d): complements.
Assume (a). Let xn→a and ε>0. Choose δ>0 with dY(f(x),f(a))<ε whenever dX(x,a)<δ.
(a) ⇒ (b). Continuity at a gives a δ for each ε.
Choose N with dX(xn,a)<δ for n>N. Then dY(f(xn),f(a))<ε for n>N, so f(xn)→f(a).
xn→a with tolerance δ.
Suppose f is not continuous at a. There is ε>0 such that for every δ>0 some x has dX(x,a)<δ and dY(f(x),f(a))≥ε.
(b) ⇒ (a), by contrapositive. Negate the definition of continuity at a: there is some ε>0 that no δ answers.
Choose xn with dX(xn,a)<n1 and dY(f(xn),f(a))≥ε. Then xn→a but f(xn)→f(a), so (b) fails.
Use δ=n1 for each n and pick the bad point xn.
Assume (a). Choose ε>0 with BY(f(a),ε)⊆W, then δ>0 from continuity at a.
(a) ⇒ (c). Take W open in Y and a point a∈f−1(W). Then f(a)∈W and W is open, so a ball around f(a) lies in W.
So BX(a,δ)⊆f−1(W). Every point of f−1(W) has a ball inside it: f−1(W) is open.
If dX(x,a)<δ then dY(f(x),f(a))<ε, so f(x)∈W.
Assume (c). The preimage f−1(BY(f(a),ε)) is open in X and contains a.
(c) ⇒ (a). Fix a and ε>0. The ball BY(f(a),ε) is open (4.1: open balls are open).
So there is δ>0 with BX(a,δ)⊆f−1(BY(f(a),ε)). That says dX(x,a)<δ implies dY(f(x),f(a))<ε: (a) holds.
Definition of open: some ball around a lies inside it.
So f−1(Y∖F)=X∖f−1(F).
(c) ⇔ (d). For any set F⊆Y, a point x is in f−1(Y∖F) iff f(x)∈/F iff x∈/f−1(F).
Hence (c) and (d) are equivalent. ■
A set is closed iff its complement is open. If (c) holds and F is closed, Y∖F is open, so f−1(Y∖F) is open, so its complement f−1(F) is closed. Conversely, the same with open and closed swapped.
In the picture: (a) is the window of inputs in the first visualizer, (c) is the orange set with its open ends. For the jump function with V around 1, the orange set is [0,∞), so (c) fails, and (b) fails too: the sequence xn=−n1→0 has f(xn)=−1, not tending to f(0)=1.
Proof workshopRebuild (c) implies (a): open preimages give epsilon-delta
Tap the lines in the order a proof would write them. Each line can only use what is already above it.
To show continuity at a we must answer an arbitrary tolerance.
Open balls are open sets (4.1).
You need to know which ε and which point a you are working with.
Hypothesis (c) applied to this open set. The point a is in it because f(a) is in the ball.
You must first know that the ball is open before applying (c) to it.
The definition of an open set, at the point a.
This uses that the preimage is open and contains a, so it comes after that line.
Unpack: a point x in the small ball is in the preimage, so its image is in the target ball.
The ball with radius δ must exist first.
Worked example
Show that if f:R→R is continuous and f(q)=0 for every rational q, then f(x)=0 for every real x.
Solution.
Take any real x. We must show f(x)=0. We know f only on the rationals, so we reach x through them.
Approach x by rationals. Choose rationals qn with ∣qn−x∣<n1. Then qn→x. Every interval contains a rational number (density of Q).
Use the sequence form of continuity. By form (b) of the three-faces theorem, f(qn)→f(x). Continuity at x sends convergent sequences to convergent sequences.
Read off the limit. Every f(qn)=0, so the sequence f(qn) is constantly 0, and its limit is 0. Limits are unique, so f(x)=0. A constant sequence converges to that constant, and a sequence has only one limit (4.2).
Answer.f is zero everywhere. The same argument shows that two continuous functions that agree on a dense set agree everywhere. ■
Quick checkLet f(x)=x2 as a map R→R. Which of these sets is NOT open?
Continuous maps pull open sets back to open sets. They need not push open sets forward to open sets: x2 sends (−1,1) to [0,1), which contains its left end 0 and has no room to the left of it. Do not confuse the preimage f−1(W) with the image f(U).
Theorem BRudin Thm 4.7 and 4.9, 4.10; Apostol Sec. 8.4 to 8.5; MATH 375 Lecture 19
Building continuous maps
(a) If f:X→Y and g:Y→Z are continuous, so is g∘f.
(b) If f,g:X→R are continuous and c∈R, then f+g, cf and fg are continuous, and f/g is continuous on the set where g=0.
(c) A map F=(F1,…,Fm):X→Rm is continuous iff each Fi:X→R is. The projection πi:Rn→R, πi(x)=xi, is continuous.
In one lineCompositions of continuous maps are continuous; sums, multiples, products and quotients (with non-zero denominator) of continuous real functions are continuous; a map into Rm is continuous iff each of its m coordinate functions is; coordinate projections are continuous.
Why it is trueComposition: preimages of open sets pull back twice. Algebra: pass through sequences and use the limit laws of 1.2. Coordinates: convergence in Rm is coordinatewise (4.2).
ProofRudin 4.7 to 4.10
The idea: (a) with open sets. (b) with sequences, since 1.2 proved the limit laws. (c) with sequences, since convergence in R^m is coordinatewise.
(a) (g∘f)−1(W)=f−1(g−1(W)).
Use form (c) of the previous theorem. For W open in Z, g−1(W) is open in Y because g is continuous.
Hence g∘f is continuous. Compare the ε-δ proof, which needs two nested choices of δ.
Then f−1 of that open set is open in X because f is continuous. So the preimage of every open W is open.
By the algebraic limit laws of 1.2, f(xn)+g(xn)→f(a)+g(a), cf(xn)→cf(a) and f(xn)g(xn)→f(a)g(a).
(b) Let xn→a in X. By form (b) of the previous theorem, f(xn)→f(a) and g(xn)→g(a).
The same for f(xn)/g(xn)→f(a)/g(a) when g(a)=0. By form (b) again, the sums, products and quotients are continuous.
The quotient law of 1.2 requires g(a)=0 and then g(xn)=0 eventually; on the set {g=0} we use that set as the space.
So F satisfies (b) of the previous theorem iff each Fi does.
(c) By the coordinatewise theorem of 4.2, F(xn)→F(a) in Rm iff Fi(xn)→Fi(a) for every i.
The projection πi is continuous. ■
∣πi(x)−πi(y)∣=∣xi−yi∣≤∥x−y∥∞≤∥x−y∥2 (the comparison theorem of 4.1), so δ=ε works.
Together these say: every polynomial in the coordinates is continuous on Rn (built from projections, sums and products), every rational function is continuous where its denominator is non-zero, and every composition of such with sin, exp, log and the other functions of 1.3 is continuous on the set where it is defined. In JEE you “knew” this. Here it is a theorem with a proof.
Worked example MATH 375 HW 11 (Apostol 8.5 #1 b, f, j)
Find the set where each function is continuous: (a) log(x2+y2). (b) arcsinx2+y2x. (c) arccosx/y.
Solution.
(a) Find the domain, then compose.x2+y2 is a polynomial, continuous everywhere, and positive except at the origin. log is continuous on (0,∞). By the composition rule, log(x2+y2) is continuous at every point where it is defined, the set R2∖{(0,0)}.
(b) The inner function.u(x,y)=x/x2+y2 is a quotient of continuous functions with non-zero denominator, so it is continuous on R2∖{(0,0)}. Its values satisfy ∣u∣≤1 because ∣x∣≤x2+y2. The domain of the whole function is where the inner function is defined, which is everywhere except the origin; arcsin needs its input in [−1,1], and that always holds.
(b) The outer function.arcsin is continuous on the CLOSED interval [−1,1], including the endpoints ±1. So the composite is continuous at every point except the origin, including the points (x,0) with x=0, where u=±1 and the value is ±2π. A tempting answer, “discontinuous along y=0”, is wrong: arcsin has no jump at ±1.
(c) The domain.x/y needs y=0 and x/y≥0, and arccos needs x/y≤1, that is x/y≤1. So the domain is {y=0,0≤x/y≤1}. We find where the function is defined before asking where it is continuous.
(c) Continuity on the domain.x/y is continuous for y=0; is continuous on [0,∞); arccos is continuous on [−1,1]. So the function is continuous at every point of its domain, including the boundary cases x=0 and x=y. Again the outer functions are continuous on closed intervals, so no extra points are lost.
Answer. (a) Continuous on R2∖{0}, its whole domain. (b) Continuous on R2∖{0}, its whole domain. (c) Continuous on its whole domain {y=0,0≤x/y≤1}. ■
Worked example MATH 375 HW 11 (Apostol 8.3 #1c, #2m)
Show that S={(x,y):(x2+y2−1)(4−x2−y2)>0} is open, and describe it. Show that each level set {(x,y):cos(x+y)=c} is closed.
Solution.
Write S as a preimage. Let F(x,y)=(x2+y2−1)(4−x2−y2), a polynomial, so continuous on R2. Then S=F−1((0,∞)). S is the set of inputs whose output lies in the open interval (0,∞).
Apply the theorem.(0,∞) is open in R, so S is open in R2 by form (c). This replaces a ball-by-ball argument at every point of S.
Describe S. A product is positive when both factors are positive or both negative. Both positive: x2+y2>1 and x2+y2<4, that is 1<r<2 with r the distance from the origin. Both negative: x2+y2<1 and x2+y2>4, impossible. So S is the open annulus between the circles of radius 1 and 2 about the origin. (The posted key sketched two overlapping discs of unequal size, which does not match this F.)
The boundary.∂S is the two circles r=1 and r=2, where F=0. Points where F=0 are in the closure of S but not in S.
Level sets.g(x,y)=cos(x+y) is continuous, and {c} is closed in R, so g−1({c}) is closed by form (d). Since cos(x+y) depends only on x+y, the level set is a family of parallel lines x+y=constant of slope −1, for example x+y=2π+mπ for c=0.
Answer.S is the open annulus 1<x2+y2<4, which is open, with boundary the two circles. Every level set of cos(x+y) is closed (a family of parallel lines). ■ The rule: a set defined by strict inequalities between continuous functions is open, and by non-strict inequalities or equations is closed.
Worked example MATH 375 Lecture 19; Apostol 8.3
Show that a product of open sets is open: if A1,A2⊆R are open, so is A1×A2⊆R2.
Solution.
Write the product with projections.A1×A2=π1−1(A1)∩π2−1(A2). A point (x,y) is in the product iff x∈A1 and y∈A2, which is the same as π1(x,y)∈A1 and π2(x,y)∈A2.
Each piece is open. The projections are continuous, and A1, A2 are open, so π1−1(A1) and π2−1(A2) are open (form (c)). These are strips: A1×R and R×A2.
A finite intersection of open sets is open. So A1×A2 is open. The theorem of 4.1.
Answer.A1×A2 is open. ■ The proof in Spagnolie’s lecture gets the same result by hand: take r1,r2 with Br1(a1)⊆A1 and Br2(a2)⊆A2, let r=min(r1,r2); a point of the disc Br(a) has ∣x−a1∣<r≤r1 and ∣y−a2∣<r≤r2, so it is in A1×A2. The minimum is the finite-intersection step of 4.1 again.
Lipschitz maps
Definition B
Lipschitz map
A map f:X→Y between metric spaces is Lipschitz if there is a constant L≥0 with dY(f(x),f(y))≤LdX(x,y) for all x,y∈X. The smallest such L is the Lipschitz constant of f. A Lipschitz map with L<1 is a contraction in the sense of 4.2.
In one linef:X→Y is Lipschitz with constant L if dY(f(x),f(y))≤LdX(x,y) for all x,y: the output distance is at most L times the input distance.
Why it existsIt is continuity with an explicit recipe, δ=ε/L, valid at every point at once.
Theorem Bstandard
Lipschitz implies uniformly continuous
If f:X→Y is Lipschitz with constant L, then f is uniformly continuous: for every ε>0, δ=ε/(L+1) satisfies dX(x,y)<δ⟹dY(f(x),f(y))<ε for all x,y.
In one lineA Lipschitz map is uniformly continuous, hence continuous.
Why it is trueIf distances are multiplied by at most L, the tolerance δ=ε/L works at every point of the space.
Proofstandard
The idea: Multiply the input distance by L; choose δ so the result is below ε. The +1 only avoids dividing by zero when L = 0.
Let ε>0 and δ=ε/(L+1).
Arbitrary tolerance; δ depends on ε and L but not on x or y.
If dX(x,y)<δ then dY(f(x),f(y))≤LdX(x,y)≤Lδ<ε. ■
The Lipschitz inequality, then δ(L)<ε since L/(L+1)<1.
Worked example links to 3.5
Norms, projections and distance-from-a-point are 1-Lipschitz; a matrix is Lipschitz with constant its operator norm. For A=[3405] find the constant and a δ for ε=0.1.
Solution.
A norm. By the triangle inequality ∥x∥≤∥x−y∥+∥y∥, so ∥x∥−∥y∥≤∥x−y∥; swapping x and y gives ∣∥x∥−∥y∥∣≤∥x−y∥. This reverse triangle inequality says the norm, as a map V→R, is Lipschitz with L=1.
The same for distance from a point. For fixed p, h(x)=d(x,p) has ∣h(x)−h(y)∣≤d(x,y). The reverse triangle inequality of 4.1: d(x,p)≤d(x,y)+d(y,p), and symmetric.
A projection.∣πi(x)−πi(y)∣=∣xi−yi∣≤∥x−y∥2. One coordinate is at most the 2-norm (4.1).
A matrix. For T(x)=Ax on R2 with the usual length, ∥Ax−Ay∥=∥A(x−y)∥≤∥A∥∥x−y∥. The defining property of the operator norm of 3.5, applied to the vector x−y and the linearity of A.
Compute ∥A∥.ATA=[25202025] has eigenvalues 45 and 5, so σ1=45=35≈6.708. The operator norm is the largest singular value, the square root of the largest eigenvalue of ATA.
Find δ.δ=ε/∥A∥=0.1/6.708≈0.0149. Then ∥x−y∥<δ gives ∥Ax−Ay∥<∥A∥δ=0.1, at every pair of points at once.
Answer.L=35 and δ≈0.0149 work for the whole plane. ■
Your answerWhat is the Lipschitz constant (operator norm) of T(x)=Ax for A=[3405] with the usual length? (Give a decimal.)
Form ATA, find its largest eigenvalue, take the square root.
ATA=[25202025] has eigenvalues 45 and 5. The largest stretch is σ1=45=35≈6.708.
Quick checkWhich of these maps R→R is NOT Lipschitz?
∣x2−y2∣=∣x−y∣∣x+y∣, and the factor ∣x+y∣ grows without bound on R, so no single L works. ∣x∣ and sinx have slope at most 1 in size. (x2 is Lipschitz on any bounded interval, for example with L=2R on [−R,R].)
Uniform continuity between metric spaces
Uniform continuity was defined in 1.3 for functions on the line. The same definition, with distances, makes sense for maps between metric spaces. We do not define a new term; we state the general version and its main facts.
Theorem BRudin Thm 4.19 and Ex. 4.13; Abbott Sec. 4.4; standard
Uniform continuity between metric spaces
Let f:X→Y be a map between metric spaces. It is uniformly continuous if
∀ε>0∃δ>0∀x,y∈X:dX(x,y)<δ⟹dY(f(x),f(y))<ε.
Then:
(a) Lipschitz implies uniformly continuous, and uniformly continuous implies continuous.
(b) If (xn) is Cauchy in X and f is uniformly continuous, then (f(xn)) is Cauchy in Y.
(c) If X is compact and f is continuous, then f is uniformly continuous (4.3).
In one lineA map f:X→Y is uniformly continuous when for every ε>0 one δ>0 works for all pairs of points. Lipschitz maps are uniformly continuous; uniformly continuous maps are continuous and send Cauchy sequences to Cauchy sequences; a continuous map on a compact space is uniformly continuous.
Why it is trueA single δ lets two points that are close in X have close images, and 'close to each other' is exactly what a Cauchy sequence says; continuity at one point gives no such statement about two moving points.
ProofRudin 4.19
The idea: (a) The first part is the previous theorem; the second takes y = a in the definition. (b) Feed the uniform δ to the Cauchy condition. (c) is proved in 4.3.
(a) Uniformly continuous implies continuous at every a, with the same δ. Lipschitz implies uniformly continuous by the previous theorem.
Put y=a in the definition: the δ that works for all pairs works in particular for the pairs (x,a).
There is N with dX(xm,xn)<δ for all m,n>N, because (xn) is Cauchy.
(b) Let ε>0 and take the δ from uniform continuity.
So dY(f(xm),f(xn))<ε for m,n>N: (f(xn)) is Cauchy.
Uniform continuity applied to the pair (xm,xn).
(c) is the theorem “Continuous on a compact set implies uniformly continuous”. ■
(c) Proved in 4.3 with the Lebesgue number.
Part (b) gives a quick way to see that a continuous map is not uniformly continuous. The function f(x)=x1 on (0,1] is continuous. The sequence xn=n1 is Cauchy in (0,1], but f(xn)=n is not Cauchy. So f is not uniformly continuous, matching the example in 1.3 by a different route.
Worked example
Show that f(x)=x is uniformly continuous on [0,∞) but not Lipschitz there.
Solution.
A key inequality. For x≥y≥0, (x−y)2≤(x−y)(x+y)=x−y. So ∣x−y∣≤∣x−y∣. The first step holds because 0≤x−y≤x+y. The product of the two brackets is the difference of squares.
Choose δ. Given ε>0, take δ=ε2. If ∣x−y∣<δ then ∣x−y∣<δ=ε. The same δ works for every pair, which is uniform continuity.
Suppose it were Lipschitz. Then ∣x−0∣≤L∣x−0∣ for some L>0 and all x≥0, that is x≤Lx, so 1≤Lx for x>0. Divide by x.
Contradiction. For 0<x<L21 we get Lx<1. So no constant L works near 0, where the graph is vertical.
Answer.x is uniformly continuous but not Lipschitz. So the arrow Lipschitz ⇒ uniformly continuous cannot be reversed. ■
Beyond the course: for understanding· Extending a uniformly continuous map to the closure (B)
Suppose D is a dense subset of a metric space X (every ball of X meets D), Y is complete, and f:D→Y is uniformly continuous. Then f extends to a unique continuous map F:X→Y, which is also uniformly continuous. Sketch: for x∈X pick dn∈D with dn→x; then (dn) is Cauchy, so (f(dn)) is Cauchy by (b), and converges in Y by completeness; call the limit F(x). Interleaving two sequences tending to x shows the limit does not depend on the choice. This is how ax for irrational x is defined from rational exponents, and how an integral of a function on [a,b] extends from step functions. If f is only continuous, not uniformly, the extension can fail: sinx1 on (0,1] cannot be extended continuously to 0.
Quick checkA student says: 'The map f:(0,1]→R, f(x)=x1, is continuous, and (0,1] is bounded, so f must be uniformly continuous.' Where is the error?
The theorem 'continuous on a compact set implies uniformly continuous' (4.3) needs a COMPACT domain, and (0,1] is bounded but not closed. The Cauchy-sequence test in part (b) shows uniform continuity fails here.
Several variables: where the new danger is
For F:Rn→Rm the definition is the same, and the new difficulty is that "x→a" can happen along infinitely many different paths. The definition of the limit requires the SAME value L for every approach, so a function can have a value along every line and still have no limit.
Worked example MATH 375 Lecture 19
Show that f(x,y)=x+yx−y has no limit at the origin.
Solution.
Approach along a line. Put y=mx and let x→0 with x=0. Then f(x,mx)=x(1+m)x(1−m)=1+m1−m (for m=−1). The factor x cancels, so along each line the value is constant, and the limit along that line is that constant.
The limit depends on the line.m=0 gives 1, m=1 gives 0, m=3 gives −21. Different lines give different limits.
Turn it into a sequence argument. The sequences (n1,0) and (n1,n1) both tend to the origin, but f along them is constantly 1 and constantly 0. By the sequential form of the limit, a limit L would need f(pn)→L for every sequence pn→(0,0); two sequences with different limits disprove it.
Answer.lim(x,y)→(0,0)x+yx−y does not exist. ■ (The function is not defined on the line y=−x, and the surface is torn along it.)
Your answerFor f(x,y)=x+yx−y, what value does f approach as (x,y)→(0,0) along the line y=3x?
Replace y by 3x and cancel the factor x.
With y=3x: x+3xx−3x=4x−2x=−21. The formula 1+m1−m with m=3 gives the same.
Python labApproach the origin along different paths
import numpy as npfs = { "(x-y)/(x+y)": lambda x, y: (x - y) / (x + y), "x*y^2/(x^2+y^4)": lambda x, y: x * y**2 / (x**2 + y**4), "x*y/(x^2+y^2)": lambda x, y: x * y / (x**2 + y**2),}paths = { "y = 0": lambda t: (t, 0.0 * t), "y = x": lambda t: (t, t), "y = 3x": lambda t: (t, 3 * t), "x = y^2": lambda t: (t**2, t), "x = -y^2": lambda t: (-t**2, t),}for name, f in fs.items(): print(name) for pname, p in paths.items(): vals = [] for t in (1e-1, 1e-3, 1e-5): x, y = p(t) with np.errstate(all="ignore"): vals.append(float(f(x, y))) print(" along", pname.ljust(9), [round(v, 4) for v in vals])
Try this.Run it. The first function has a different limit on each line through the origin. The second, f(x, y) = x*y2/(x2 + y4), goes to 0 along every straight line but not along the parabola x = y2, where the value is always 1/2. Try the path (t3, t) and (-t2, t) as well. Then try the third function x*y/(x2 + y2) and find a line along which it approaches 0.5.
Worked example MATH 375 Piazza, Nov 21 (@105)
Show that f(x,y)=x2+y4xy2 (with f(0,0)=0) is not continuous at the origin, although its limit along every straight line through the origin is 0.
Solution.
Along a line y=mx.f(x,mx)=x2+m4x4m2x3=1+m4x2m2x→0 as x→0. The numerator has one factor of x left, the denominator tends to 1. The vertical line x=0 gives f=0 directly.
Along the parabola x=y2.f(y2,y)=y4+y4y2⋅y2=21 for every y=0. The numerator and denominator are both of order y4 on this curve, so the ratio is constant.
Conclude. The sequence pn=(n21,n1)→(0,0) has f(pn)=21→0=f(0,0). By form (b) of the three-faces theorem, f is not continuous at 0. One sequence whose images stay away is enough. Checking all lines is not checking all paths.
Answer.f is not continuous at the origin. ■ (Piazza’s remark: an ε-δ argument is needed for rigour. The sequence argument above is one.)
Worked example MATH 375 Piazza @119 and HW 11 (Apostol 8.5)
A function can be continuous in each variable separately and still not be continuous: f(x,y)=x2+y2xy, f(0,0)=0.
Solution.
Separately continuous. Fix y0. If y0=0, x↦x2+y02xy0 is a quotient of polynomials with non-zero denominator, so continuous. If y0=0, x↦f(x,0)=0 is constant. The same holds with the roles of x and y swapped. Each one-variable slice is a continuous function of one variable.
Not jointly continuous. Along y=mx the value is 1+m2m, which is 21 for m=1. So f(n1,n1)=21→0=f(0,0). The sequence (n1,n1)→(0,0), and the outputs stay at 21.
Answer.f is continuous in each variable separately and discontinuous at (0,0). ■ Piazza @119 corrected a student’s “proof” that separate continuity implies joint continuity: it used the extreme value theorem on a function that was never shown to be continuous. Always check what the hypotheses of a theorem are before applying it.
Worked example MATH 375 HW 11 (Apostol 8.5 #5)
Let f(x,y)=xsiny1 for y=0, f(x,0)=0. Show f→0 at the origin, but that one of the two iterated limits does not exist.
Solution.
Squeeze.∣siny1∣≤1, so ∣f(x,y)∣≤∣x∣ for y=0, and f(x,0)=0≤∣x∣. So ∣f(x,y)−0∣≤∣x∣≤∥(x,y)∥2. Given ε, take δ=ε: if ∥(x,y)∥<δ then ∣f(x,y)∣<ε. (The posted key wrote −x≤f≤x, which is only correct for x≥0; the absolute value fixes it.)
First iterated limit.limy→0[limx→0f(x,y)]: for each fixed y=0 the inner limit is 0⋅siny1=0. So the outer limit is 0. Take the inner limit in x first, with y fixed.
Second iterated limit. For fixed x=0, limy→0xsiny1 does not exist, because siny1 oscillates between −1 and 1 infinitely often near 0. The inner limit is already undefined, so the iterated limit limx→0[limy→0f(x,y)] makes no sense.
Answer. The limit at the origin is 0, and one iterated limit exists while the other does not. A limit in two variables does not imply that an iterated limit exists, as this example shows. The converse also fails: for x2+y2xy (the previous example) both iterated limits are 0, yet there is no limit at the origin. ■
Quick checkA function f(x,y) has limit 0 at the origin along every straight line through the origin. What can you conclude?
A line is one family of paths. The definition requires the output to be close for EVERY nearby input, including those on curves like the parabola x=y2 that no line tracks. To prove a limit exists you need a bound like the squeeze above, not a list of paths.
Homeomorphisms
Definition B
Homeomorphism
A homeomorphism between metric spaces X and Y is a bijection f:X→Y such that f and its inverse f−1:Y→X are both continuous. If one exists, X and Y are homeomorphic.
In one lineA homeomorphism is a bijection f:X→Y such that both f and f−1 are continuous: a one-to-one correspondence that tears and glues nothing, in either direction.
Why it existsIt is the equivalence of topology: two spaces related by one have the same open sets, the same convergent sequences, the same compact and connected subsets, though possibly different distances.
By form (c) of the three-faces theorem, a bijection f is a homeomorphism exactly when U is open in X iff f(U) is open in Y (the preimage under f−1 of U is f(U)). So it matches up the open sets of the two spaces. An isometry (a bijection preserving distances) is a homeomorphism with L=1 both ways. More generally a bijection with both f and f−1 Lipschitz is a homeomorphism; the identity map between two equivalent norms is one.
Worked example
Show that (−1,1) and R are homeomorphic, and that [0,2π)→S1, t↦(cost,sint) is a continuous bijection but not a homeomorphism.
Solution.
A candidate.f(x)=1−∣x∣x from (−1,1) to R, with inverse g(y)=1+∣y∣y. f stretches the ends of the interval out to infinity.
They are inverse to each other. For x≥0: g(f(x))=1+x/(1−x)x/(1−x)=1/(1−x)x/(1−x)=x; the case x<0 is the same by symmetry. And f(g(y))=y similarly. So both are bijections.
Both are continuous.f is a quotient of continuous functions with denominator 1−∣x∣>0 on (−1,1), and g has denominator 1+∣y∣≥1. The building theorem: quotients and the continuity of ∣⋅∣.
So they are homeomorphic. An open interval and the whole line have the same topology, though one is bounded and the other not, and one is complete and the other not. Boundedness and completeness belong to the distance, not to the topology.
The circle map is a continuous bijection.t↦(cost,sint) is continuous on [0,2π) (shown in 4.4: Lipschitz with L=1) and takes each point of the circle exactly once. One angle in [0,2π) for each point.
Its inverse is not continuous. Take pn=(cos(−n1),sin(−n1))→(1,0). The angle of pn in [0,2π) is 2π−n1→2π, but the angle of (1,0) is 0. Sequential continuity of the inverse fails at (1,0): nearby points on the circle have very different angles when the circle is cut open at t=0.
Answer.(−1,1)≅R. The map [0,2π)→S1 is a continuous bijection whose inverse is not continuous, so not a homeomorphism. ■
Theorem BRudin Thm 4.14 and 4.22; Munkres Sec. 18 and 26
Properties preserved by homeomorphisms
Let h:X→Y be a homeomorphism. Then U is open in X iff h(U) is open in Y; xn→x iff h(xn)→h(x); K is compact iff h(K) is; C is connected iff h(C) is. Completeness and boundedness are NOT preserved.
In one lineA homeomorphism sends open sets to open sets, convergent sequences to convergent sequences, compact sets to compact sets and connected sets to connected sets, in both directions.
Why it is trueEach of these properties was shown to be preserved by continuous maps, and a homeomorphism is continuous both ways.
Proofstandard
The idea: Apply the three-faces theorem and the preservation theorems of 4.3 and 4.4 to h and to h inverse.
Open sets: U open implies h(U) open (continuity of h−1), and h(U) open implies U open (continuity of h).
h(U)=(h−1)−1(U) is the preimage of U under the continuous map h−1, and U=h−1(h(U)) is the preimage of h(U) under h.
Sequences: xn→x implies h(xn)→h(x), and conversely using h−1.
Form (b) of the three-faces theorem for h and for h−1.
The continuous image of a compact set is compact (4.3), and of a connected set is connected (4.4), applied to h and to h−1.
So completeness and boundedness are properties of the distance, not of the shape. ■
The example above: (−1,1) is not complete and R is; (−1,1) is bounded and R is not; f is a homeomorphism between them.
Proposition BRudin Thm 4.17; Munkres Thm 26.6
A continuous bijection from a compact space is a homeomorphism
If K is a compact metric space and f:K→Y is a continuous bijection onto a metric space Y, then f−1 is continuous.
In one lineIf K is compact and f:K→Y is a continuous bijection onto a metric space, then f−1 is continuous, so f is a homeomorphism.
Why it is trueA closed subset of K is compact, its image is compact hence closed, and 'sends closed sets to closed sets' is exactly 'the inverse pulls closed sets back to closed sets'.
ProofRudin 4.17
The idea: Show that f sends closed sets to closed sets; then (f inverse) pulls closed sets back to closed sets, which is form (d).
Let F⊆K be closed. Then F is compact.
A closed subset of a compact set is compact (4.3).
So f(F) is compact in Y.
The continuous image of a compact set is compact (4.3).
So f(F) is closed in Y.
Compact sets are closed (4.3).
So the preimage under f−1 of every closed set is closed: f−1 is continuous. ■
Since f is a bijection, (f−1)−1(F)=f(F).
This explains the circle example: [0,2π) is not compact, so the proposition does not apply, and its conclusion indeed fails. (The map [0,2π]→S1 has a compact domain, but it is not a bijection, because both ends go to (1,0). Gluing the two ends of the interval together is the idea of a quotient space, which MATH 551 studies.)
Worked example
Show that R and R2 are not homeomorphic, and that [0,1] and (0,1) are not homeomorphic.
Solution.
Suppose h:R→R2 is a homeomorphism. Let p=h(0). We look for a property that distinguishes them after one point is removed.
Restrict.h maps R∖{0} onto R2∖{p}, and this restriction is still continuous with a continuous inverse. Restricting a map to a subset, and its inverse to the image, keeps continuity with the same δ.
Compare connectedness.R∖{0} is not connected (it is not an interval). R2∖{p} is path-connected, hence connected (the punctured plane, 4.4; translating p to the origin does not change this). A homeomorphism preserves connectedness in both directions, but one space is connected and the other is not.
Contradiction. So R≅R2. This is a small case of the invariance of dimension; the general statement for Rn and Rm is much harder and is a MATH 551 theorem.
The interval.[0,1] is compact and (0,1) is not (4.3), and a homeomorphism preserves compactness. (0,1) is not closed, so not compact.
Answer. Neither pair is homeomorphic. ■
Quick checkIs the continuous bijection f:[0,2π)→S1, f(t)=(cost,sint), a homeomorphism?
A homeomorphism needs the inverse continuous too. Points of the circle slightly below (1,0) have angles near 2π, while (1,0) itself has angle 0. The compact-domain theorem does not apply because [0,2π) is not compact.
Equivalent norms again, and all norms on R^n
4.1 defined equivalent norms and proved that equivalent norms have the same open sets. Now we can say more and settle the question 4.1 left open.
Proposition Bstandard
Equivalent norms give the same continuous maps
If m∥x∥a≤∥x∥b≤M∥x∥a for all x∈V, then the identity map (V,∥⋅∥a)→(V,∥⋅∥b) is Lipschitz with constant M, its inverse is Lipschitz with constant 1/m, and so both are continuous. Hence a map f:X→V is continuous into (V,∥⋅∥a) iff it is continuous into (V,∥⋅∥b), and likewise for maps out of V.
In one lineIf two norms on V are equivalent, the identity map between the two normed spaces is a bi-Lipschitz homeomorphism, so a map into or out of V is continuous for one norm iff it is for the other.
Why it is trueThe defining inequalities m∥x∥a≤∥x∥b≤M∥x∥a say that the identity is Lipschitz with constant M one way and 1/m the other.
Proofstandard
The idea: The two inequalities are Lipschitz inequalities for the identity map. Composition of continuous maps does the rest.
∥x−y∥b≤M∥x−y∥a: the identity is M-Lipschitz from a to b.
Apply the right inequality to the vector x−y.
∥x−y∥a≤m1∥x−y∥b: its inverse is m1-Lipschitz.
Apply the left inequality to x−y.
So f continuous into a gives id∘f continuous into b, and conversely. ■
Lipschitz maps are continuous. A map f into (V,a) followed by the continuous identity is a map into (V,b); the composition of continuous maps is continuous. The reverse direction uses the inverse.
Theorem Bstandard
All norms on R^n are equivalent
Let ∥⋅∥ be any norm on Rn. Then it is equivalent to ∥⋅∥1, and so any two norms on Rn are equivalent. In particular they have the same open sets, convergent sequences, Cauchy sequences, and continuous maps.
In one lineFor any norm ∥⋅∥ on Rn there are constants 0<m≤M with m∥x∥1≤∥x∥≤M∥x∥1 for all x.
Why it is trueThe norm is a continuous function on the compact 'unit sphere' of the 1-norm, so it has a positive minimum and a finite maximum there; scaling extends the bounds to every vector.
Proofstandard
The idea: Upper bound by the triangle inequality on the standard basis. That makes the norm Lipschitz for the 1-norm, so continuous. The unit sphere of the 1-norm is compact (Heine–Borel), so the norm attains a minimum m there, which is positive because the norm of a non-zero vector is positive. Scale.
Let M=maxi∥ei∥. Then ∥x∥≤∑∣xi∣∥ei∥≤M∥x∥1.
Write x=∑xiei and apply the triangle inequality (N3) repeatedly and homogeneity (N2).
So ∣∥x∥−∥y∥∣≤∥x−y∥≤M∥x−y∥1: the function x↦∥x∥ is Lipschitz, hence continuous, on (Rn,∥⋅∥1).
Reverse triangle inequality for the norm, then the bound proved in the previous step applied to x−y.
The sphere S={x:∥x∥1=1} is compact.
It is closed (the 1-norm is continuous and the sphere is the preimage of the closed set {1}) and bounded (each ∣xi∣≤1). Heine–Borel applies to Rn with the 1-distance, by the equivalence of the 1-, 2- and max-norms in 4.1.
So there is x0∈S with ∥x0∥=m=minS∥x∥.
The extreme value theorem on a compact set (4.3), applied to the continuous function ∥⋅∥ on S; S is non-empty.
So m>0.
x0=O since ∥x0∥1=1, and a norm is positive on non-zero vectors (N1).
So m∥x∥1≤∥x∥≤M∥x∥1 for all x.
For x=O the vector x/∥x∥1 lies on S, so ∥x/∥x∥1∥≥m. Homogeneity (N2) gives ∥x∥≥m∥x∥1. For x=O both sides are 0.
Any two norms are equivalent to ∥⋅∥1, hence to each other. ■
Equivalence is symmetric and transitive: if a∼1 and b∼1 then a∼b, multiplying constants.
In the picture of 4.1 (diamond, disc and square) this says every other norm’s unit ball is also squeezed between two scaled copies of the diamond. A consequence: every linear map T:Rn→Rm is continuous whichever norms are used, since it is Lipschitz for the 2-norms (the operator norm) and norms are equivalent.
Beyond the course: for understanding· In infinite dimensions linear maps can be discontinuous (B)
Let C1[0,1] be the continuously differentiable functions with the sup norm ∥f∥∞, and Df=f′ the derivative, mapping into C[0,1] with the sup norm. D is linear. Take fn(x)=xn/n. Then ∥fn∥∞=n1→0, so fn→0, but Dfn=xn−1 has ∥Dfn∥∞=1, which does not tend to ∥D0∥=0. So D is not continuous at 0. In finite dimensions every linear map is continuous (the theorem above); in infinite dimensions the choice of norm decides, and differentiation is the standard example of an unbounded operator. This is part of why analysis on function spaces needs care.
Where it is used
Used inside maths· Inside maths: the doorway to topology, and to derivatives in several variables
Form (c) of the three-faces theorem is the definition of continuity in topology: a topological space is a set with a collection of “open” sets satisfying the rules proved in 4.1 (the empty set and the whole space, arbitrary unions, finite intersections), and a map is continuous when preimages of open sets are open. Everything in this chapter that was proved from form (c) alone, compositions, preservation of compact and connected sets, homeomorphisms, carries over. What does not: Cauchy sequences, completeness, boundedness, uniform continuity, which use the distance. That is the dividing line between analysis (MATH 521) and topology (MATH 551). In Unit 5 the derivative of F:Rn→Rm at a point a is defined as the linear map T with ∥F(a+h)−F(a)−Th∥/∥h∥→0; that needs the limit of a map between metric spaces, defined here, and an interior point, from 4.1, so that a+h makes sense in every direction.
Used in the real world· Robustness of neural networks: Lipschitz constants as certificates
An image classifier is a map f:Rn→Rk from pixels to class scores. If f is Lipschitz with constant L for the usual length, then changing the input by a vector of length ε changes the score vector by length at most Lε. The score of class i minus the score of class j is (ei−ej)⋅f(x), and ∥ei−ej∥2=2, so by Cauchy–Schwarz this difference changes by at most 2Lε. Hence if the winning class beats every other by a margin μ, the prediction cannot change for any input within distance μ/(2L). This is a certificate: no attack of that size can succeed.
A network x↦W2ReLU(W1x) is a composition. A matrix multiplication is Lipschitz with constant its operator norm (the largest singular value, 3.5). ReLU applied to each entry is 1-Lipschitz, since ∣max(a,0)−max(b,0)∣≤∣a−b∣. Compositions multiply Lipschitz constants, so L≤∥W2∥∥W1∥. For the two-layer network in the lab below, ∥W1∥≈1.513 and ∥W2∥≈1.208, so L≤1.828. At the input (1,−0.5) the margin is 1.705, so the certified radius is 2⋅1.8281.705≈0.659. The lab then searches for the true distance to the decision boundary and finds about 0.9. The certificate is correct and conservative: the product of norms overestimates how much a real network can stretch a particular input. Computing the exact Lipschitz constant of a ReLU network is NP-hard even for two layers (Virmaux and Scaman, 2018), which is why a product of layer norms is the standard cheap bound.
Your answerA network has layer operator norms 2.0 and 1.5, so L≤3. At an input, the winning class beats the runner-up by a margin of 3. What is the certified radius μ/(2L)? (Give a decimal.)
Multiply the layer norms to get L, then divide the margin by 2L.
L=2.0×1.5=3 and μ=3, so the radius is 2⋅33=21≈0.7071. Any change to the input of length less than 0.7071 leaves the prediction unchanged.
Python labCertify a tiny network, then look for the true boundary
import numpy as npW1 = np.array([[1.2, -0.7], [0.4, 0.9], [-0.5, 0.3]])W2 = np.array([[0.8, -0.6, 0.2], [-0.3, 0.5, 0.9]])f = lambda x: W2 @ np.maximum(W1 @ x, 0)L = np.linalg.norm(W1, 2) * np.linalg.norm(W2, 2) # product of operator normsx0 = np.array([1.0, -0.5])out = f(x0)margin = abs(out[0] - out[1])radius = margin / (np.sqrt(2) * L)print("L <=", round(L, 3), " margin =", round(margin, 3), " certified radius =", round(radius, 3))top = np.sign(out[0] - out[1])best = np.inffor a in np.linspace(0, 2 * np.pi, 720, endpoint=False): d = np.array([np.cos(a), np.sin(a)]) for r in np.linspace(0.005, 4, 800): o = f(x0 + r * d) if np.sign(o[0] - o[1]) != top: best = min(best, r) breakprint("true distance to the nearest class change is about", round(best, 3))
Try this.Run it. The certified radius is guaranteed and the true distance to a class change is larger. Change x0 to [0.5, 1.5] or [2.0, -1.0] and compare the gap between the certified and the true distance. Then scale W1 by 3 (W1 = 3 * W1): L multiplies by 3, the margin also grows, but the certified radius stays about the same because both scale together. Why does multiplying the weights by 3 not help robustness at all?
Used in the real world· Topology in data analysis (a light touch): counting pieces at every scale
Given a cloud of data points in Rn, one can ask how many separate clusters it has. The answer depends on the scale ε at which you look. Replace each point by an open ball of radius ε/2; two balls overlap exactly when the points are closer than ε to each other. The union of balls has some number of connected pieces (4.4). Plot that number against ε: for the points 0,1,2.5,10,11 on a line, at ε=0.5 there are 5 pieces, at ε=1.4 there are 3 ({0,1}, {2.5}, {10,11}), at ε=1.6 there are 2 (the point 2.5 joins 1), and at ε=8 there is 1. The scales at which the count changes record the gaps in the data, and a long stretch of ε with the same count signals a real cluster structure. This count of components over all scales is the zero-dimensional part of persistent homology, a method used on shape data, protein structures and neural activity. It is a stability statement too: moving every point by less than δ changes the scales at which components merge by at most 2δ, which is a Lipschitz property of the whole procedure.
Your answerFor the points 0,1,2.5,10,11 on a line, two points are joined when they are closer than ε=1.4 to each other. How many connected pieces are there?
List the gaps between neighbouring points and decide which are less than 1.4.
The gaps between consecutive points are 1, 1.5, 7.5 and 1. At ε=1.4 only the gaps of 1 are bridged, which gives the pieces {0,1}, {2.5} and {10,11}. Once ε exceeds 1.5 the gap 1.5 is also bridged.
Traps
Watch out· Limits along every line do not give a limit
The function xy2/(x2+y4) tends to 0 along every straight line through the origin and has value 21 along the parabola x=y2. To show a two-variable limit exists, bound ∣f(x,y)−L∣ by something that tends to 0 as ∥(x,y)∥→0 (the squeeze), or convert to polar form. To show it does not exist, exhibit two paths or sequences with different limits.
Watch out· Separately continuous is not jointly continuous
xy/(x2+y2) is continuous in x for each fixed y and in y for each fixed x, and is discontinuous at the origin. Continuity of F:R2→R is a statement about nearby points in the plane, not only nearby points on the two coordinate lines. A proof that uses only the two one-variable slices has proved nothing about F.
Watch out· Continuous maps pull open sets back; they do not push them forward
f(x)=x2 sends (−1,1) to [0,1), and a constant map sends every open set to a point. The theorem is about preimages: f−1(open) is open. A map for which images of open sets are open is called an open map, a stronger and different property.
Watch out· A continuous bijection need not have a continuous inverse
[0,2π)→S1 is the standard example. To prove a map is a homeomorphism, show that both directions are continuous, or that the domain is compact and the target is a metric space (the compact-domain proposition above).
Watch out· Continuity depends only on the open sets; uniform continuity and completeness depend on the distance
The identity map from ((0,∞),∣x−y∣) to ((0,∞),∣x1−y1∣) is a homeomorphism (the open sets agree), but it is not uniformly continuous: the sequence n1 is Cauchy in the first space, and its image n is not Cauchy in the second (∣m1−n1∣ becomes ∣m−n∣ after the map). So a property that is invariant under homeomorphism, such as compactness or connectedness, is different from one that is not, such as Cauchy sequences, completeness and uniform continuity.
Watch out· Do not forget the domain: arcsin and arccos are continuous on closed intervals
When finding where arcsin(u(x,y)) is continuous, first find where u is defined and continuous, and note ∣u∣≤1 there. Then arcsin is continuous on [−1,1], ends included. A frequent mistake (it appeared in a posted solution key) is to drop the boundary points where ∣u∣=1, which are perfectly good points of continuity.
Problems
check
Is f(x)=⌊x⌋ (the greatest integer at most x) continuous as a map R→R? As a map Z→R (with ∣x−y∣ on Z)? Where does it fail on R?
Solution
On R it is discontinuous at every integer: at n, the sequence n−k1→n has f=n−1→n. As a map out of Z it is continuous (it is the inclusion Z→R, since ⌊n⌋=n): every point of Z is isolated, since B(n,21)={n}, and continuity at an isolated point is automatic.
check
For f(x)=x2, describe f−1((1,4)) and f−1([1,4]). Which is open, which closed?
Solution
f−1((1,4))=(−2,−1)∪(1,2), open. f−1([1,4])=[−2,−1]∪[1,2], closed. This is the pattern: open preimage of an open set, closed preimage of a closed set.
check
Use a sequence to show that f(x,y)=x2+y2xy (with f(0,0)=0) is not continuous at the origin.
Solution
The points (n1,n1)→(0,0), but f(n1,n1)=2/n21/n2=21→0=f(0,0). By the sequential form of continuity, f is not continuous at the origin.
check
Which of ∣x∣, x2, ∣x∣ and sinx are Lipschitz on R?
Solution
∣x∣ (constant 1) and sinx (constant 1, since ∣cos∣≤1 and the mean value theorem). Not x2 (the slope 2x is unbounded) and not ∣x∣ (near 0, ∣h−0∣=h is not at most Lh for small h).
useMATH 375 HW 11 (Apostol 8.5 #1j) with correction
Find the set where f(x,y)=arccosx/y is defined and show it is continuous on all of that set.
Solution
Defined iff y=0 and 0≤x/y≤1. On this set, x/y is continuous, is continuous on [0,∞) and arccos is continuous on [−1,1], so the composition is continuous on the whole domain. This includes the points x=0 (value 2π) and x=y=0 (value 0). The posted key kept only the strict inequalities.
useMATH 375 HW 11 (Apostol 8.3 #2 style)
Sketch S={(x,y):xy>1}, show that it is open, and find its boundary and its closure.
Solution
S=F−1((1,∞)) for the continuous F(x,y)=xy, so S is open. It is the region above the branch of the hyperbola xy=1 in the first quadrant and below the branch in the third quadrant (two pieces: x,y>0 with y>1/x, and x,y<0 with y<1/x). The boundary is the hyperbola {xy=1} (two branches), and the closure is {xy≥1}.
use
Show that lim(x,y)→(0,0)x2+y2x2−y2 does not exist.
Solution
Along y=mx the value is 1+m21−m2, which is 1 for m=0 and 0 for m=1. Two paths, two limits, so no limit.
use
Does x2+y2x2y (value 0 at the origin) have limit 0 at the origin? Prove it.
Solution
Yes. ∣x2y∣≤(x2+y2)∣y∣ because x2≤x2+y2, so x2+y2x2y≤∣y∣≤∥(x,y)∥. Given ε, δ=ε works. So the function is continuous at the origin.
prove
Prove that a map f:X→Y is continuous iff f(A)⊆f(A) for every A⊆X.
Solution
Plan. Use sequences and the description of the closure by sequences (4.2).
(⇒) If x∈A there are an∈A with an→x (4.2). By continuity f(an)→f(x), so f(x) is a limit of points of f(A), hence in f(A).
(⇐) Let F⊆Y be closed, and A=f−1(F). Then f(A)⊆F, so f(A)⊆F (F is closed). By hypothesis f(A)⊆f(A)⊆F, so A⊆f−1(F)=A. So A is closed. By form (d), f is continuous. ■
prove
Prove that if f,g:X→R are continuous, then max(f,g) is continuous.
Solution
Plan. Write the maximum with absolute values.
max(f,g)=21(f+g+∣f−g∣). The map f−g is continuous (building theorem), ∣⋅∣:R→R is 1-Lipschitz hence continuous, so ∣f−g∣ is a composition of continuous maps, hence continuous; the sum and the multiple by 21 are continuous. ■
prove
Prove that if f:X→Y and g:Y→Z are uniformly continuous, then g∘f is uniformly continuous.
Solution
Plan. Work backwards from the tolerance in Z: first the δ of g, then the δ of f for that tolerance.
Let ε>0. Uniform continuity of g gives η>0 with dZ(g(u),g(v))<ε whenever dY(u,v)<η, for all u,v∈Y. Uniform continuity of f, with tolerance η, gives δ>0 with dY(f(x),f(x′))<η whenever dX(x,x′)<δ, for all x,x′∈X. If dX(x,x′)<δ, then dY(f(x),f(x′))<η, so dZ(g(f(x)),g(f(x′)))<ε. The number δ depends only on ε, not on the points. ■
prove
Prove that [0,1) and (0,1) are not homeomorphic.
Solution
Plan. Remove a point and compare connectedness.
Suppose h:[0,1)→(0,1) is a homeomorphism and put p=h(0). Then h restricts to a homeomorphism from [0,1)∖{0}=(0,1) onto (0,1)∖{p}. The first is an interval, hence connected. The second is (0,p)∪(p,1), which is not an interval, hence not connected. Connectedness is preserved by homeomorphisms, a contradiction. ■
prove
Prove that a linear map T:V→W between normed spaces is continuous iff it is bounded: ∥Tx∥≤C∥x∥ for some constant C and all x.
Solution
Plan. Bounded gives Lipschitz. For the converse use continuity at O with ε=1, and scale.
If ∥Tx∥≤C∥x∥, then ∥Tx−Ty∥=∥T(x−y)∥≤C∥x−y∥: Lipschitz, so continuous. Conversely, suppose T is continuous at O. Take ε=1: there is δ>0 with ∥Tz∥<1 whenever ∥z∥<δ. For x=O put z=2∥x∥δx, so ∥z∥=2δ<δ. Then ∥Tz∥=2∥x∥δ∥Tx∥<1, so ∥Tx∥<δ2∥x∥. Take C=δ2. ■
stretch
Prove the extension theorem in the box above: a uniformly continuous f:D→Y on a dense subset D⊆X, with Y complete, extends to a continuous F:X→Y.
Solution
Plan. Define F(x) as the limit of f(dn) along any sequence dn→x in D, and check it is well defined.
Let x∈X. By density, pick dn∈D with dn→x. The sequence (dn) is Cauchy, so (f(dn)) is Cauchy (part (b) of the uniform continuity theorem), and converges in Y since Y is complete. If dn′→x is another sequence, the interleaved sequence d1,d1′,d2,d2′,… also tends to x, so its image is Cauchy and converges, so the limits of f(dn) and f(dn′) agree. Define F(x) to be this limit. For x∈D, the constant sequence gives F(x)=f(x). For uniform continuity of F: given ε, take δ for 3ε from f. If dX(x,x′)<3δ, choose d,d′∈D with dX(d,x), dX(d′,x′)<3δ and dY(f(d),F(x)), dY(f(d′),F(x′))<3ε (possible by the definition of F with sequences). Then dX(d,d′)<δ, so dY(F(x),F(x′))<3ε+3ε+3ε=ε. Uniqueness: a continuous extension is determined on the dense set. ■
stretch
Prove that every norm on Rn gives a complete metric space.
Solution
Plan. Equivalence of norms moves Cauchy sequences and limits between the given norm and the 1-norm, where completeness is known (4.2).
Let ∥⋅∥ be a norm, with m∥x∥1≤∥x∥≤M∥x∥1. Let (xk) be Cauchy for ∥⋅∥. Then ∥xk−xl∥1≤m1∥xk−xl∥, so (xk) is Cauchy for the 1-norm. Rn is complete for the 1-distance (4.2), so ∥xk−x∥1→0 for some x. Then ∥xk−x∥≤M∥xk−x∥1→0, so xk→x in the given norm. ■
Summary
A map f:X→Y between metric spaces is continuous when the ε-δ condition of 1.3 holds with the distances dX and dY. The limit of a map between metric spaces is defined the same way with 0<dX(x,a).
Three equivalent forms.ε-δ at every point; xn→a implies f(xn)→f(a); the preimage of every open set is open (and equivalently of every closed set is closed). The last needs no distance, which is where topology begins.
Continuous maps are closed under composition, sums, products, quotients and combination into coordinates; projections and norms are continuous. This proves continuity for polynomials, rational functions and elementary compositions on their domains.
A Lipschitz map (d(f(x),f(y))≤Ld(x,y)) is uniformly continuous; a matrix is Lipschitz with constant its operator norm. Uniformly continuous maps send Cauchy sequences to Cauchy sequences, and continuous maps on compact spaces are uniformly continuous.
In several variables a limit must be the same along every path. Different lines giving different limits, or a parabola giving a different limit from the lines, disproves it. Separate continuity does not give joint continuity.
A homeomorphism is a bijection continuous in both directions. It preserves open sets, sequences, compactness and connectedness, not completeness or boundedness. A continuous bijection from a compact space is automatically a homeomorphism. R and R2 are not homeomorphic.
All norms on Rn are equivalent, proved with compactness of the unit sphere, so they give the same open sets and the same continuous maps. In infinite dimensions this fails, and linear maps can be discontinuous.
A product of layer Lipschitz constants bounds a neural network’s sensitivity and gives a certified robustness radius.
MATH 375: Lecture 19 and Apostol 8.4 to 8.5 define limits and continuity for $F : \mathbb R^n \to \mathbb R^m$ with the lengths in both spaces, show that continuity is componentwise, that sums, products and compositions are continuous, and give the path-dependent limit $(x - y)/(x + y)$. This chapter proves the same statements for any metric space, so the 375 proofs are special cases.
MATH 521: 521 proves the equivalence of the three forms of continuity in its first weeks on metric spaces, then uses the open-set form to prove that compactness and connectedness are preserved. Everything in sections 1 to 3 here is that lecture.
MATH 551: A topological space is a set with a collection of 'open' sets obeying the rules proved in 4.1, and a map is continuous when preimages of open sets are open. The theorem of this chapter says that for metric spaces this agrees with the definition you already know. Homeomorphisms are the isomorphisms of topology.
CS 532 / AI: A neural network is a composition of maps, and its Lipschitz constant is bounded by the product of the constants of its layers. A small Lipschitz constant is a certificate that small input changes cannot flip the output.