A space is connected when it cannot be split into two separate open pieces. The connected subsets of the line are exactly the intervals, a continuous map sends connected sets to connected sets, and that one fact is the intermediate value theorem. Path-connected is stronger, and the topologist's sine curve shows the gap.
Beyond the courseRudin, Principles of Mathematical Analysis, Thm 2.45 to 2.47, 4.22 and 4.23Abbott, Understanding Analysis, Sec. 3.4 and 4.5Munkres, Topology, Sec. 23 to 25Apostol Vol. 2, Sec. 8.2 and 10.10
In 1.3 the intermediate value theorem said that a continuous function cannot jump over a value. Its proof used the supremum of the points where the function was still negative. That proof was about the interval [a,b] and about the real numbers, and it left a question open. Is it a fact about functions, or about the interval? Bolzano’s 1817 proof already used no geometry, but it did use the order of the real line, and a function on a circle, a sphere or a disc has no order on its inputs to use. This chapter finds the property of [a,b] that the proof used: it is in one piece. We make “one piece” exact with open sets, prove that the connected subsets of the line are the intervals, and show that continuous maps preserve it. The intermediate value theorem then becomes a corollary that holds for functions on any connected metric space.
Each interval is closed, and a union of finitely many closed sets is closed (the corollary in 4.1, by De Morgan from finite intersections of open sets). The gap does not matter. A set can be closed and in two pieces, which is the point of this chapter.Review: unions of closed sets
Quick checkf is continuous on [0,1] with f(0)=−2 and f(1)=5. Which values must f take?
That is the intermediate value theorem of 1.3, applied to f(x)−y for each y between −2 and 5. This chapter proves it again from a different idea.Review: the intermediate value theorem
Quick checkTake the metric space A=[0,1]∪[2,3] with the distance ∣x−y∣. Is [0,1] an open set of this space A?
Inside the space A, the ball B(1,21) is the set of points of A within 21 of 1, which is (21,1]. It lies in [0,1]. A ball only holds points of the space itself, so the answer depends on which space you are in. Also, closed does not exclude open (4.1).Review: open balls
The picture: can you cut it in two?
Take a subset A of the line. A cut at the number z splits A into the part to the left of z and the part to the right. Three things to do in the picture:
Pick [0,1] and [2,3] and drag the cut into the gap. The cut hits no point of A, and both pieces are non-empty. Each piece is A meets an open ray, so each is open in A. The set has been separated.
Pick [0,3] and drag the cut anywhere. Either the cut sits on a point of A (nothing is cut), or one side is empty. No cut ever works. This is the property that will be called connected.
Pick [0,1) and (1,2]. The point 1 is missing from the set, and that missing point is a place where the cut lands. A missing point is enough to separate.
Where this came from· From 'a continuum' to 'no separation'
In 1883 Georg Cantor wanted to say what it means for a set of points to be a continuum, one unbroken piece. His definition used distances: any two points of the set can be joined by a finite chain of points of the set whose consecutive links are shorter than any tolerance you name. Arthur Schoenflies (1904) saw that distance is not needed and defined the notion purely with point sets. The form used today, that a set is connected when it is not the union of two separated non-empty sets, appeared independently with Nels Lennes, Frigyes Riesz and Felix Hausdorff in the first years of the twentieth century, and is often called the Lennes–Hausdorff definition. The problem they solved was to say “in one piece” without drawing a picture. Bernard Bolzano’s 1817 proof of the intermediate value theorem is the earliest result of this kind. It was proved long before anyone had a definition of the property it depends on.
The idea, in words
Why· One piece means: no way to build a fence
Suppose a set A is in two pieces, like [0,1]∪[2,3]. Then you can build a fence in the gap. Each side of the fence is an open set of A: no point of the left side touches the right side, so every point of the left side has room around it that stays on the left. A set in one piece has no fence. Any attempt to put the points into a “left side” and a “right side” leaves a point on the fence line with room on neither side.
A continuous function cannot tear a set. If f sent an interval onto two separate pieces of the line, the fence between the pieces would pull back to a fence in the interval, and there is none. That is the whole proof of the intermediate value theorem, and it never mentions the order or the sup of the inputs. It only uses that the domain has no fence.
Definitions and theorems
Separations and connected sets
First we need open sets inside a subset. Take a subset A of a metric space X. With the same distance d, A is itself a metric space, and 4.1 applies to it: BA(x,r)={y∈A:d(x,y)<r}, and a set U⊆A is open in A if each of its points has a ball BA(x,r)⊆U. The example in the “Before you start” box shows why this matters: [0,1] is open in [0,1]∪[2,3].
Lemma Bstandard; Rudin Thm 2.30
Open sets inside a subset
Let A⊆X and U⊆A. Then U is open in A if and only if there is an open set W of X with U=A∩W.
In one lineU is open in A if and only if U=A∩W for some open set W of X.
Why it is trueA ball of A is a ball of X with the points outside A removed.
Proofstandard
The idea: A ball of the subspace A is the intersection of A with a ball of X. Forward: gather the balls of X into one open set W. Backward: shrink the ball of X around a point of A ∩ W so that it sits inside W.
(⇒) Let U be open in A. For each x∈U choose rx>0 with A∩B(x,rx)⊆U.
By definition, BA(x,r)=A∩B(x,r). The ball of X with its points outside A removed.
Put W=⋃x∈UB(x,rx). It is open in X.
A union of open balls is open (4.1: balls are open, unions of open sets are open).
So A∩W=U.
Each x∈U lies in its own ball, so U⊆A∩W. Conversely a point of A∩W is in A∩B(x,rx)⊆U for some x.
(⇐) Let U=A∩W with W open, and x∈U. Choose r>0 with B(x,r)⊆W.
W is open, so the point x∈A∩W has a ball B(x,r)⊆W.
Then BA(x,r)=A∩B(x,r)⊆A∩W=U, so U is open in A. ■
Intersect both sides of B(x,r)⊆W with A.
Definition B
Separation
A separation of a metric space A is a pair of sets U,V with A=U∪V, U∩V=∅, U=∅, V=∅, and both U and V open in A. For a subset A of a bigger space X, “open in A” is as in the previous lemma.
In one lineA separation of a set A is a way of writing A=U∪V with U and V disjoint, non-empty, and both open in A.
Why it existsIt is the exact form of 'a fence through the gap': two pieces, each with room to move inside itself, with nothing shared.
Definition B
Connected set
A metric space A is connected if it has no separation. A subset of a metric space is connected if it is connected as a metric space with the inherited distance. A set that is not connected is disconnected.
In one lineA set (a metric space) is connected if it has no separation: it cannot be written as two disjoint non-empty open pieces.
Why it existsIt is the property of 'being in one piece' that continuity preserves and that the intermediate value theorem needs.
Two quick consequences. The empty set and any one-point set are connected, because a separation needs two non-empty disjoint pieces. And because V=A∖U is the complement of U, a separation A=U∪V makes U open and also closed in A (its complement V is open). That gives a second description.
Proposition Bstandard
Connected means no proper clopen subset
A metric space A is connected if and only if its only subsets that are both open and closed (called clopen) are ∅ and A.
In one lineA space A is connected if and only if the only subsets that are both open and closed in A are ∅ and A.
Why it is trueA subset that is both open and closed, and neither empty nor everything, together with its complement is a separation; conversely, a separation gives such a subset.
Proofstandard
The idea: Both directions are the observation that a pair of complementary open sets is the same data as one clopen set.
(Not connected ⇐ a proper clopen set) U and V=A∖U are disjoint, non-empty and open in A, with union A: a separation.
Suppose A has a clopen subset U with U=∅ and U=A. Its complement V=A∖U is open (since U is closed) and non-empty (since U=A).
(Not connected ⇒ a proper clopen set) Given a separation A=U∪V, U is clopen and proper. ■
V is open, and U=A∖V is its complement, so U is closed. U is open by definition of a separation. U is non-empty, and U=A because V=∅ and V is disjoint from U.
In 4.1 we noticed that ∅ and R are the only clopen subsets of R and left it unproved. By this proposition that statement is the same as ”R is connected”, which the next section proves.
Quick checkIs a set with exactly one point connected?
A separation needs two disjoint non-empty sets whose union is the set, and one point cannot supply two. The point being clopen is not an obstruction: the whole space is always clopen, and connected means no OTHER clopen subsets.
The next lemma is used twice below. It says a connected set cannot straddle a separation of a bigger set.
Lemma Bstandard
A connected subset lies on one side of a separation
Let Z be a metric space with a separation Z=P∪Q, and let C⊆Z be connected. Then C⊆P or C⊆Q.
In one lineIf Z=P∪Q is a separation and C⊆Z is connected, then C⊆P or C⊆Q.
Why it is trueOtherwise C∩P and C∩Q would be a separation of C.
Proofstandard
The idea: If C meets both P and Q, the pieces C ∩ P and C ∩ Q separate C.
Suppose C meets both P and Q. Then C∩P and C∩Q are open in C.
P and Q are open in Z. By the lemma on open sets inside a subset (with Z as the big space and C as the subset), C∩P and C∩Q are open in C.
So C=(C∩P)∪(C∩Q) is a separation of C, contradicting that C is connected. So C misses one of them, and lies in the other. ■
They are non-empty by assumption, disjoint because P∩Q=∅, and their union is C∩(P∪Q)=C.
The connected subsets of the line
Definition B
Interval
A set I⊆R is an interval if for all x,y∈I and every z with x<z<y, we have z∈I.
In one lineA set I⊆R such that whenever x<z<y and x,y∈I, also z∈I: it has no holes.
Why it existsIt is the exact statement of 'no gaps', and it covers [a,b], (a,b), half-open ones, rays, R, single points and the empty set in one definition.
This definition includes [0,1], (0,1), [0,1), [2,∞), (−∞,3), R, a single point, and ∅. It excludes [0,1]∪[2,3] (take x=1, y=2, z=1.5) and Q (take x=1, y=2, z=2).
Theorem BRudin Thm 2.47; Abbott Sec. 3.4
Connected subsets of the line are the intervals
A subset A⊆R is connected if and only if it is an interval.
In one lineA subset of R is connected if and only if it is an interval.
Why it is trueA hole at z gives a cut through z. In the other direction, a separation of an interval would give a last point of the left piece, which contradicts the openness of both pieces.
ProofRudin 2.47; Abbott Sec. 3.4
The idea: Not an interval: cut at the missing point. Interval: if it were separated, take the supremum of the left piece between a left point and a right point, and show the supremum can belong to neither piece. This is the proof of the intermediate value theorem in 1.3.
(⇒) Suppose A is not an interval. Pick x<z<y with x,y∈A and z∈/A.
We prove the contrapositive of (⇒): not an interval means not connected. Use the definition of interval, negated: there are x,y∈A and a z with x<z<y and z∈/A.
Let U=A∩(−∞,z) and V=A∩(z,∞).
Open rays are open sets of R, so these two are open in A by the lemma on open sets inside a subset. This is the cut in the picture.
They are non-empty, disjoint, and U∪V=A. So A has a separation and is not connected.
x∈U and y∈V. A point of A is below z, above z, or equal to z, and z∈/A.
Pick a∈U and b∈V. By swapping the names U and V we may assume a<b (they are different, since U∩V=∅).
(⇐) Suppose I is an interval with a separation I=U∪V. We will reach a contradiction. Choose a point in each piece.
Then [a,b]⊆I, so each point of [a,b] is in U or in V.
I is an interval and a,b∈I, so every point between them is in I.
Let S=U∩[a,b] and c=supS. Then a≤c≤b, so c∈I.
S is non-empty (a∈S) and bounded above by b, so the completeness axiom of 1.1 gives its supremum. This is the same set as in the proof of the intermediate value theorem of 1.3.Where the idea comes from: we want the last point of the left piece before the right piece begins. A last point is a supremum.
Case c∈U. Choose r>0 with (c−r,c+r)∩I⊆U. Put x=min(c+2r,b). Then c<x≤b, x∈[a,b]⊆I and x is in the ball, so x∈U∩[a,b]=S. But x>c=supS, a contradiction.
c∈U cannot be b since b∈V and U∩V=∅, so c<b. U is open in I, so some ball (c−r,c+r)∩I lies in U.
Case c∈V. Choose 0<r≤c−a with (c−r,c+r)∩I⊆V. Then (c−r,c]⊆[a,c]⊆I, so (c−r,c]⊆V, and (c−r,c] contains no point of U.
c∈V cannot be a since a∈U, so c>a. V is open in I, so some ball (c−r,c+r)∩I lies in V. Shrink r to at most c−a so the ball stays inside [a,∞).
So c−r is an upper bound of S smaller than c, contradicting that c is the least upper bound.
Every point of S is at most c (as c is an upper bound) and, by the previous line, not in (c−r,c]. So all points of S are at most c−r.
Both cases fail, so no separation exists. I is connected. ■
c∈[a,b]⊆I=U∪V, so one of the two cases holds, and each is impossible.
In the picture: the first half is the cut in the visualizer, dragged into a gap. The second half is the visualizer for [0,3], where no cut works: the supremum c is the place the cut would have to go, and it has no side to belong to.
Proof workshopRebuild the proof that an interval is connected
Tap the lines in the order a proof would write them. Each line can only use what is already above it.
A contradiction proof: assume a separation exists, and take one point from each piece. Swap the names so a is the smaller.
Every number between two points of an interval is in the interval.
You need the two points a and b first.
S is non-empty and bounded above by b, so the completeness axiom gives the supremum.
The supremum is taken inside [a,b], so the line saying [a,b]⊆I must come first.
A ball around c inside U reaches to the right of c, and c<b since b∈V.
This case analysis is about c, so c must be defined first.
A ball around c inside V contains no point of U, so no point of S is within r of c.
Like the previous case, this one speaks about the number c, which must already be defined.
The point c lies in I, hence in U or in V, and each possibility led to a contradiction.
The conclusion needs both cases to have been ruled out.
Quick checkWhich of these subsets of R is connected?
(−∞,3) is an interval. The second set has the point 1 missing: cut at z=1. The third has irrational numbers missing in every gap: for any rationals x<y in it, cut at an irrational z between them.
Worked example
Is A={x∈R:x2>5}∪{x:x2<3} connected? Into how many pieces does it break?
Solution.
Write A as intervals.x2<3 means −3<x<3, and x2>5 means x<−5 or x>5. So A=(−∞,−5)∪(−3,3)∪(5,∞). Solving each inequality gives intervals, and a connected subset of R is an interval.
Find a hole. Take x=0 and y=3. Both lie in A, and z=2 lies between them. But 22=4 is neither below 3 nor above 5, so 2∈/A. That is the failure of the interval property, so A is not an interval.
Separate.U=A∩(−∞,2)=(−∞,−5)∪(−3,3) and V=A∩(2,∞)=(5,∞). The cut at z=2, as in the theorem.
Count the pieces. Each of the three intervals is itself an interval, hence connected, and there are gaps between them, at [−5,−3] and [3,5]. So A breaks into three connected pieces.
Answer.A is not connected. It has three connected pieces. ■
Your answerHow many separate connected pieces (maximal intervals) does {x∈R:x2>5}∪{x:x2<3} have?
Solve each inequality for x and draw the pieces on a number line.
The set is (−∞,−5)∪(−3,3)∪(5,∞). Between consecutive pieces there are gaps (−5≤x≤−3 and 3≤x≤5) where 3≤x2≤5, and a gap is a place for a cut.
Worked example
Show that Q is disconnected, and that its only connected subsets have at most one point.
Solution.
Suppose a connected subset C⊆Q has two points. Say x<y in C. We prove the contrapositive of “at most one point”: two points give a contradiction.
Use the theorem.C is a connected subset of R, so it is an interval, and so every real number between x and y is in C. The theorem applies to every connected subset of the line, rational or not.
Find an irrational number between them. Between any two rationals there is an irrational number (add n2 for large n). That number is in C⊆Q, a contradiction. Irrational numbers are not rational, so they cannot lie in C.
Answer. Every connected subset of Q has at most one point; in particular Q is disconnected. ■ A space like this, with no connected piece bigger than a point, is called totally disconnected.
Continuous maps and connectedness
A continuous map f:X→Y between metric spaces is one for which, at every point a of X and for every ε>0, there is a δ>0 with dY(f(x),f(a))<ε whenever dX(x,a)<δ. That is the definition of 1.3 with the two distances written dX and dY. Chapter 4.5 gives it its name and studies it; here we need exactly one property, and we prove it from this definition.
Lemma BRudin Thm 4.8
Continuous maps pull open sets back to open sets
Let f:X→Y be continuous (in the ε-δ sense above) and let W⊆Y be open. Then f−1(W) is open in X.
In one lineIf f:X→Y is continuous and W is open in Y, then f−1(W)={x:f(x)∈W} is open in X.
Why it is trueAround f(a) the open set W contains a ball. Continuity gives a ball around a that is sent into it.
ProofRudin 4.8
The idea: Take a point a in the preimage. Its image has a ball inside W; continuity turns that ball's radius into a δ-ball around a that maps inside it.
Let a∈f−1(W), so f(a)∈W.
To show the preimage is open we give every point of it a ball. So start with an arbitrary point.
Choose ε>0 with BY(f(a),ε)⊆W.
W is open in Y, so the point f(a) of W has a ball inside W.
Choose δ>0 with dY(f(x),f(a))<ε whenever dX(x,a)<δ.
Continuity of f at a, with this ε.
So BX(a,δ)⊆f−1(W). Since a was arbitrary, f−1(W) is open. ■
If x∈BX(a,δ) then f(x)∈BY(f(a),ε)⊆W, which says x∈f−1(W).
In the picture of 1.3 (ε-δ visualizer) W is a horizontal band around f(a) and B(a,δ) is the window of inputs whose graph stays in the band. The lemma says: the set of all inputs whose output lands in the band is a union of such windows.
Theorem BRudin Thm 4.22
The continuous image of a connected set is connected
If X is a connected metric space and f:X→Y is continuous, then the image f(X) is connected.
In one lineIf X is connected and f:X→Y is continuous, then f(X) is connected.
Why it is trueA separation of the image would pull back, through the lemma, to a separation of X.
ProofRudin 4.22
The idea: Contradiction: a separation of f(X) pulls back to a separation of X, because preimages of open sets are open, preimages of disjoint sets are disjoint, and the pieces are non-empty since every point of f(X) has a preimage.
Suppose P,Q are disjoint, non-empty, open in f(X), with P∪Q=f(X).
Assume the opposite of what we want: the image has a separation f(X)=P∪Q.
The sets f−1(P) and f−1(Q) are open in X.
View f as a map into the metric space f(X); it is still continuous, since the distances are unchanged. Then apply the lemma to the open sets P and Q of f(X).
They are disjoint, they cover X, and each is non-empty.
A point mapped into both P and Q would be in P∩Q=∅. Every point of X is sent into f(X)=P∪Q. Every point of P is a value of f, so its preimage is non-empty.
This is a separation of X, a contradiction. So f(X) is connected. ■
That is the definition of a separation of X, which is connected.
Proof workshopPick the reason for each line: the continuous image of a connected set
Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.
Suppose f(X)=P∪Q with P,Q disjoint, non-empty and open in f(X).
Then f−1(P) and f−1(Q) are open in X.
They are disjoint.
Their union is X.
Each is non-empty.
So X has a separation, contradicting that X is connected.
Quick checkf:[0,1]→R is continuous and every value f(x) is a rational number. What follows?
The image f([0,1]) is connected (continuous image of an interval), so it is an interval, and an interval inside Q has at most one point. Density of the rationals is the reason an interval would be full of irrational numbers, not a reason for freedom.
Corollary BAbbott Sec. 4.5; Rudin Thm 4.23
Intermediate value theorem from connectedness
Let X be connected, f:X→R continuous, p,q∈X, and y a real number between f(p) and f(q). Then there is c∈X with f(c)=y. In particular, for X=[a,b] this is the intermediate value theorem of 1.3.
In one lineIf X is a connected metric space and f:X→R is continuous, then f takes every value between any two of its values.
Why it is trueThe image of a connected set is an interval, and an interval that contains two numbers contains everything between them.
ProofAbbott Sec. 4.5
The idea: The image f(X) is connected, so it is an interval, so it contains everything between f(p) and f(q).
f(X) is a connected subset of R.
The continuous image of a connected set is connected.
So f(X) is an interval.
A connected subset of R is an interval (the theorem above).
f(p),f(q)∈f(X) and y is between them, so y∈f(X), which means y=f(c) for some c∈X. ■
The definition of interval: it contains every number strictly between two of its members. If y=f(p) or y=f(q) it is a value already.
This is the same argument as 1.3’s, repackaged: the supremum is now inside the proof that intervals are connected, and the theorem about functions needs no more. The gain is that X can be any connected metric space: a circle, a disc, a sphere.
Worked example
At every moment there are two opposite points on the equator with the same temperature.
Solution.
Set up. Let T(θ) be the temperature at the point of the equator at angle θ, so T is continuous and T(θ+2π)=T(θ). Temperature varies continuously along a path.
Compare opposite points. Let g(θ)=T(θ)−T(θ+π) for 0≤θ≤π. We want a zero of g. g(θ)=0 says the point at angle θ and the opposite point (angle θ+π) have equal temperature.
Look at the ends.g(0)=T(0)−T(π) and g(π)=T(π)−T(2π)=T(π)−T(0)=−g(0). The end values are negatives of each other, so they have opposite signs (or both are zero).
Apply the theorem.g is continuous on the connected set [0,π] and takes a value g(0) and its negative, so it takes the value 0 between them: g(θ∗)=0 for some θ∗∈[0,π]. The corollary above, with the value y=0.
Answer. There is θ∗ with T(θ∗)=T(θ∗+π). ■ The same argument works for any continuous quantity on a circle, such as pressure on a latitude line.
Your answerSuppose T(θ)=2cosθ+sin2θ on the equator. For which θ∈[0,π] is T(θ)=T(θ+π)? (Give θ in radians.)
Compute g(θ)=T(θ)−T(θ+π) and use cos(θ+π)=−cosθ.
T(θ+π)=−2cosθ+sin(2θ+2π)=−2cosθ+sin2θ, so g(θ)=T(θ)−T(θ+π)=4cosθ. It is 0 exactly at θ=2π in [0,π]. The theorem promises a root; here it can be found by algebra.
Worked example classic
A monk climbs a mountain path from 8:00 to 16:00 on Monday, and descends the same path from 8:00 to 16:00 on Tuesday. Show he is at the same spot at the same time of day on both days.
Solution.
Measure position along the path. Let u(t) be his distance from the bottom, as a fraction 0 to 1 of the path, at time t on Monday, and w(t) the same on Tuesday. Both are continuous on [8,16]. He cannot teleport, so position is continuous in time.
Form the difference.h(t)=u(t)−w(t) on [8,16]. We want h(t∗)=0. A zero is a time of day when both days found him at the same place on the path.
Check the signs. On Monday he starts at the bottom and on Tuesday at the top: u(8)=0, w(8)=1, so h(8)=−1. At 16:00 he is at the top on Monday and at the bottom on Tuesday: h(16)=1−0=1. The two days have opposite directions, so the difference changes sign.
Apply the theorem.h is continuous on the connected set [8,16] with h(8)=−1<0<1=h(16), so h(t∗)=0 for some t∗. The corollary. Nothing about his speed, rests or direction changes is needed.
Answer. There is a time t∗ when he is at the same point on both days. ■ Imagine two monks, one climbing and one descending on the same day: they must meet.
Your answerSuppose on Monday he climbs at constant speed, u(t)=(t−8)/8, and on Tuesday he descends so that w(t)=1−s2 where s=(t−8)/8. At what time t (in hours, as a decimal) are the two positions equal?
Set u(t)=w(t), which gives a quadratic in s. Take the root in [0,1].
Equal positions: s=1−s2, so s2+s−1=0 and s=25−1≈0.618. Then t=8+8s=8+4(5−1)≈12.944. The theorem promised a time exists, and here we can find it.
Paths
Definition B
Path
A path in a metric space X is a continuous map γ:[0,1]→X (continuity as in the paragraph above, with [0,1] carrying the distance ∣s−t∣). It goes fromγ(0)toγ(1).
In one lineA path in a space X is a continuous map γ from the interval [0,1] into X: a journey that starts at γ(0) and ends at γ(1) without jumping.
Why it existsIt makes 'you can walk from p to q without leaving the set' into a mathematical object.
Definition B
Path-connected
A metric space X is path-connected if for all p,q∈X there is a path γ in X from p to q.
In one lineA space is path-connected if any two of its points are joined by a path inside it.
Why it existsIt is connectedness you can check by exhibiting an explicit journey, rather than by ruling out all possible fences.
The simplest path is a straight line. In a normed space (4.1), the segment from p to q is γ(t)=(1−t)p+tq. It is continuous because ∥γ(t)−γ(s)∥=∣t−s∣∥q−p∥, so δ=ε/∥q−p∥ works (or any δ if p=q). A set S in a normed space is convex if the segment between any two of its points stays in S, and a convex set is path-connected, because the segment between two of its points is a path that stays in the set.
Paths can be reversed: if γ goes from p to q, then t↦γ(1−t) goes from q to p and is continuous. Paths can also be glued. If α is a path from p to m and β a path from m to q, then γ(t)=α(2t) for t≤21 and γ(t)=β(2t−1) for t≥21 is a path from p to q: both formulas give m at t=21, so there is no jump, and continuity at t=21 is checked by taking the smaller of the two δ values.
Theorem BMunkres Sec. 24
Path-connected implies connected
If X is path-connected, then X is connected.
In one lineA path-connected space is connected.
Why it is trueA path from one side of a separation to the other would be a connected set (the image of [0,1]) that sits on both sides.
ProofRudin 4.22 with 2.47
The idea: Suppose X is separated. Join a point of one piece to a point of the other by a path. The path's image is connected, so by the lemma it lies on one side, but it touches both.
Pick p∈U and q∈V (both pieces are non-empty).
Contradiction: assume X=U∪V is a separation.
Let γ be a path in X from p to q.
X is path-connected.
C=γ([0,1]) is a connected subset of X.
[0,1] is an interval, hence connected, and γ is continuous, so its image is connected.
So C⊆U or C⊆V.
A connected subset lies on one side of a separation.
But C contains p∈U and q∈V, a contradiction. So X is connected. ■
p=γ(0)∈C and p∈U but p∈/V; q=γ(1)∈C and q∈V but q∈/U.
Worked example
Show that R2∖{(0,0)} is path-connected, hence connected, while R∖{0} is not connected.
Solution.
Two points of the punctured plane. Let p,q=(0,0). If the segment from p to q misses the origin, it is the path. A segment is a path in a normed space.
The bad case. If the segment passes through the origin, then q=−cp for some c>0 (the points are on opposite sides of the origin on one line). Pick any m not on that line, for example m=(−p2,p1) (the vector p turned by 90∘). The origin is on the line through p and q, and m is chosen off that line.
Go around. The segment from p to m misses the origin, since the origin would be on the line through p and m only if m were a multiple of p, and it is not. Likewise the segment from m to q. Glue the two. Two segments joined at m give a path avoiding the origin.
Conclude. So R2∖{(0,0)} is path-connected, so connected. Path-connected implies connected.
The line is different.R∖{0} is not an interval (−1<0<1 and 0 is missing), so it is not connected: U=(−∞,0), V=(0,∞). In one dimension there is no way around the missing point.
Answer. The punctured plane is connected; the punctured line is not. ■ This is the observation that R and R2 are different shapes, made precise in 4.5.
Your answerA path from (1,0) to (−1,0) in the punctured plane goes by way of the point (0,1) along two straight segments. What is its total length?
Use the distance formula for each segment, then add.
Each segment, from (1,0) to (0,1) and from (0,1) to (−1,0), has length 1+1=2. The direct segment would pass through the origin, which is removed.
Worked example
Show that the circle S1={(x,y):x2+y2=1} is path-connected.
Solution.
Write the points by angles. Any two points are p=(cosα,sinα) and q=(cosβ,sinβ). Every point of the unit circle has an angle.
Define a path.γ(t)=(cos((1−t)α+tβ),sin((1−t)α+tβ)). Then γ(0)=p, γ(1)=q, and γ(t) is on the circle. We move the angle at constant speed from α to β.
Continuity. Writing ϕ(t) for the angle, ∥γ(t)−γ(s)∥22=2−2cos(ϕ(t)−ϕ(s))=4sin22ϕ(t)−ϕ(s), so the distance is 2∣sin2ϕ(t)−ϕ(s)∣≤∣ϕ(t)−ϕ(s)∣=∣β−α∣∣t−s∣. The inequality ∣sinu∣≤∣u∣ turns this into a bound by ∣t−s∣, so δ=ε/(∣β−α∣+1) works.
Answer. The circle is path-connected, hence connected. ■
Quick checkWhich statement is a theorem?
The first is proved above. The converse is false: the topologist's sine curve below is connected but not path-connected. The third is false as well: a path-connected set is connected, so a disconnected set is never path-connected.
Open connected sets of Rn are path-connected
Connected and path-connected differ for strange sets. For the open sets we use (balls, regions where a function is defined), they agree.
Theorem Bstandard; Apostol Sec. 10.10
Open connected sets in R^n are path-connected
Let U⊆Rn be open and connected (with the usual distance). Then U is path-connected.
In one lineIf U⊆Rn is open and connected, then any two points of U can be joined by a path in U.
Why it is trueThe set of points reachable from a base point is open (a small ball is all reachable by segments) and so is the set of unreachable points, so connectedness forces everything to be reachable.
Proofstandard
The idea: Fix p. Let P be the set of points of U that can be reached from p by a path in U. Show that P and its complement in U are both open. Connectedness leaves only P = U.
Fix p∈U and let P={x∈U:some path in U goes from p to x}. Then p∈P, so P=∅.
Constant path at p.
For each q∈U choose r>0 with B(q,r)⊆U. Then every x∈B(q,r) is joined to q by the segment from q to x, which lies in B(q,r)⊆U.
U is open: every point q∈U has B(q,r)⊆U. A ball is convex: for x∈B(q,r) and 0≤t≤1, ∥q+t(x−q)−q∥=t∥x−q∥<r.
If q∈P, every x∈B(q,r) is also in P. So P is open.
Glue a path from p to q with the segment from q to x.
If q∈U∖P, no x∈B(q,r) is in P. So B(q,r)⊆U∖P and U∖P is open.
If x∈B(q,r) were in P, glue the path from p to x with the segment from x back to q (a segment run backwards is a segment). Then q∈P.
So U∖P=∅ and P=U. Every point of U is joined to p by a path. Any two points x,y are joined by going through p: reverse the path from p to x, then follow the path from p to y. ■
U is connected and P=∅ is open and has an open complement in U: if U∖P were non-empty, P and U∖P would be a separation of U.
Connected but not path-connected
Beyond the course: for understanding· The topologist's sine curve (B)
Let G={(x,sinx1):0<x≤1} be the graph of sinx1, and L={(0,y):−1≤y≤1} the vertical segment it oscillates toward. The topologist’s sine curve is S=G∪L with the usual distance of the plane. It is connected but not path-connected: you cannot walk from the segment onto the wiggles.
Lemma BMunkres Thm 23.4
Closure of a connected set is connected
If A is connected and A⊆B⊆A, then B is connected.
In one lineIf A is connected and A⊆B⊆A, then B is connected.
Why it is trueA separation of B would put all of A on one side, but every point of the other side is a limit of points of A.
ProofMunkres 23.4
The idea: Suppose B has a separation P, Q. The connected set A lies in one of them, say P. A point of Q is in the closure of A, so a ball around it meets A, but the ball can be taken to lie in Q.
Suppose B=P∪Q is a separation. Then A⊆P or A⊆Q; say A⊆P.
The lemma above: a connected subset of B lies on one side of a separation of B.
Then b∈B⊆A. Choose r with B(b,r)∩B⊆Q.
Q is non-empty. Take b∈Q. Q is open in B, so there is r>0 with BB(b,r)⊆Q, a ball of the subspace.
So a∈B(b,r)∩B⊆Q and a∈A⊆P. Then a∈P∩Q=∅, a contradiction. ■
b∈A, so the ball B(b,r) contains a point a∈A. Also a∈A⊆B.
Proposition Bstandard; Munkres Sec. 24
The topologist's sine curve
(a) S is connected. (b) S is not path-connected.
In one lineS=G∪L is connected, but there is no path in S from (0,0) to (1,sin1).
Why it is trueG is connected and every point of L is a limit of points of G. A path that leaves L would have to oscillate between +1 and −1 infinitely often right after leaving, which no continuous second coordinate can do.
ProofMunkres Sec. 24
The idea: (a) G is the continuous image of the interval (0, 1], so connected; L lies in the closure of G; apply the lemma. (b) Take the last time a path is on L and look at what the path does right after it.
(a) G is the image of (0,1] under this continuous map, so G is connected.
t↦(t,sint1) is continuous on (0,1]: the distance in the plane is at most ∣t−s∣+∣sint1−sins1∣, since a2+b2≤∣a∣+∣b∣, and sint1 is continuous for t>0. (0,1] is an interval, so connected.
Every point (0,y) of L is the limit of the points (xn,y)∈G, so L⊆G.
For −1≤y≤1 choose θ∈[−2π,2π] with sinθ=y and put xn=1/(θ+2πn) for n large enough that θ+2πn>1. Then xn→0 and sinxn1=y.
By the lemma on closures, S is connected.
G⊆S by definition, and S=G∪L⊆G because G⊆G and L⊆G. So the lemma applies with A=G and B=S.
Let Z={t:γ1(t)=0}. It contains 0, not 1, and it is closed (a limit of times in Z is in Z by continuity of γ1). Let t∗=supZ. Then t∗∈Z and t∗<1.
(b) By contradiction. Suppose γ=(γ1,γ2):[0,1]→S is a path from (0,0) to (1,sin1). Each coordinate is continuous, since ∣γi(t)−γi(s)∣ is at most the distance between γ(t) and γ(s).
For t∈(t∗,1], γ1(t)>0 and γ2(t)=sinγ1(t)1.
After t∗ the path is off L, so on the graph G: γ2(t)=sin(1/γ1(t)) with γ1(t)>0.
Choose η>0 with t∗+η≤1 so that ∣γ2(t)−γ2(t∗)∣<1 for all t∈[t∗,t∗+η]. Let m=γ1(t∗+η)>0.
Continuity of γ2 at t∗ with ε=1.
Choose k so large that v=1/(2π+2πk) and v′=1/(23π+2πk) are both at most m. There are times t,t′∈(t∗,t∗+η] with γ1(t)=v and γ1(t′)=v′.
The intermediate value theorem for γ1 on [t∗,t∗+η], where it goes from 0 to m: it takes every value in (0,m].
Then γ2(t)=1 and γ2(t′)=−1. Both are within 1 of γ2(t∗), but 1 and −1 are 2 apart, so no number is within 1 of both. Contradiction. ■
sin(2π+2πk)=1 and sin(23π+2πk)=−1.
In words: right after a path leaves the vertical segment it must keep oscillating between the top and the bottom, and a continuous function cannot do that on a shrinking window. The set is in one piece (no fence) but there is no road.
Examples and non-examples
Worked example
Is A={(x,y):xy=0} connected?
Solution.
Describe A.A is the plane without the two axes: the four open quadrants. xy=0 means x=0 and y=0.
Try the cut. Let U={(x,y)∈A:x>0} and V={(x,y)∈A:x<0}. The line x=0 is removed from A, so it acts as the gap.
Check the pieces.U=A∩{x>0} and V=A∩{x<0} are intersections of A with open half-planes, so they are open in A. Both are non-empty ((1,1)∈U, (−1,1)∈V), disjoint, and their union is A. The lemma on open sets inside a subset: the half-plane x>0 is open in R2, because the ball of radius x around (x,y) stays in it.
Answer.A is not connected: it has a separation, and in fact four connected pieces. ■
Worked example
Show that a continuous function f:R→R that takes only integer values is constant.
Solution.
Image is connected.R is an interval, so connected; f is continuous, so f(R) is connected. Continuous image of a connected set.
Image is an interval inside Z. A connected subset of R is an interval, and f(R)⊆Z. If it contained two integers m<n, it would contain m+21, which is not an integer.
So one point.f(R) has at most one point, and f is constant. The image is non-empty and has at most one element.
Answer.f is constant. ■ The same argument shows a continuous function from a connected space to {0,1} is constant, which is how topologists phrase “connected” as a property of functions.
Worked example
Show that the union of the two coordinate axes, X={(x,y):xy=0}, is path-connected, hence connected.
Solution.
Each axis is a line. The x-axis {(x,0)} and the y-axis {(0,y)} are convex, so any two points on the same axis are joined by the segment, which stays on that axis. A segment between two points of a line lies in the line.
Points on different axes. Take p=(a,0) and q=(0,b). Go from p along the x-axis to the origin, then from the origin along the y-axis to q. The origin lies on both axes, so it is a meeting point of the two segments.
Glue. The two segments end and start at O, so gluing gives a path from p to q inside X. The gluing rule from the paragraph above.
Conclude. Any two points of X are joined by a path in X, so X is path-connected, and path-connected sets are connected. The theorem above.
Answer.X is path-connected, hence connected. The same idea proves a general fact: two connected sets that share a point have a connected union (a problem below). ■
Worked example classic
Show that every continuous f:[0,1]→[0,1] has a fixed point: a number c with f(c)=c.
Solution.
Turn the goal into a zero. Put g(x)=f(x)−x. We want g(c)=0. f(c)=c exactly when g(c)=0, and the intermediate value theorem finds zeros.
Look at the ends.g(0)=f(0)−0≥0 because f(0)≥0. g(1)=f(1)−1≤0 because f(1)≤1. f takes values in [0,1], so it cannot be below 0 at the left end or above 1 at the right end.
Apply the theorem.g is continuous on the connected set [0,1], and 0 lies between g(1) and g(0). So g(c)=0 for some c. The corollary with y=0. If g(0)=0 or g(1)=0 we already have the fixed point.
Answer.f(c)=c for some c∈[0,1]. ■ The recipe “subtract to make a function that must change sign” is the same one used for the equator and the monk.
Worked example
Let X be a connected metric space and x=y two points of it. Show that for every r with 0<r<d(x,y) there is a point z∈X with d(x,z)=r.
Solution.
Make a real function. Let h(z)=d(x,z), a map X→R. We want to hit the value r and the theorem is about real-valued functions.
It is continuous. By the reverse triangle inequality, ∣h(z)−h(z′)∣≤d(z,z′), so δ=ε works. The reverse triangle inequality is from 4.1.
Look at two values.h(x)=0 and h(y)=d(x,y), and r lies strictly between them. That is the hypothesis 0<r<d(x,y).
Apply the theorem.X is connected, so there is z with h(z)=r. The corollary, on the connected domain X.
Answer. Such a z exists. So h takes every value in [0,d(x,y)], and a connected metric space with two points is uncountable (a problem below). ■
Where it is used
Used inside maths· Inside maths: zero gradient on a connected open set means constant (a preview of Unit 5)
In 1.4 a function with zero derivative on an interval is constant. In several variables the analogue needs the right kind of domain. Let U⊆Rn be open and connected, and f:U→R differentiable with ∇f=0 at every point. Then f is constant. The proof uses only two facts from Unit 5: the chain rule, so that g(t)=f(q+t(x−q)) has g′(t)=∇f(q+t(x−q))⋅(x−q), and the 1.4 result that a function with zero derivative is constant.
Theorem Bstandard; the chain rule is in Apostol Sec. 8.20
Zero gradient on a connected open set means constant
Let U⊆Rn be open and connected, and f:U→R differentiable with ∇f=O on U. Then f is constant.
In one lineIf U⊆Rn is open and connected and f is differentiable on U with ∇f=O everywhere, then f is constant on U.
Why it is trueThe set where f equals its value at one point is closed (continuity) and open (a segment inside a small ball, with zero derivative along it), so it is all of U by connectedness.
Proofstandard
The idea: Let S be the set of points where f takes the value c = f(p). Show S is open using the segments in a ball (derivative zero along a segment), and closed because f is continuous. A nonempty clopen subset of a connected set is everything.
Let c=f(p) and S={x∈U:f(x)=c}.
Fix a point p∈U. S contains p, so S=∅.
U∖S=f−1(R∖{c}) is open in U, so S is closed in U.
f is differentiable, so continuous (1.4 in one variable; the same in several variables, Unit 5). R∖{c} is open, so the preimage under f is open in U by the lemma on preimages.
Let q∈S and x∈B(q,r)⊆U. Put g(t)=f(q+t(x−q)) for t∈[0,1].
U is open: choose r with B(q,r)⊆U. For x∈B(q,r) the segment from q to x stays in the ball (balls are convex).
g′(t)=∇f(q+t(x−q))⋅(x−q)=0 for all t.
Chain rule, then ∇f=O.
So g(1)=g(0), that is, f(x)=f(q)=c. Hence B(q,r)⊆S and S is open.
A function with zero derivative on an interval is constant (1.4).
By the proposition on clopen sets, S=U. ■
S is non-empty, open and closed in the connected set U.
The connectedness cannot be dropped: on U=(0,1)∪(2,3) let f=0 on (0,1) and f=1 on (2,3). Then f′=0 everywhere on U but f is not constant.
Used in the real world· Image segmentation: counting the pieces of a picture
A scanned page is stored as a grid of black and white pixels. To read it, an OCR program first cuts it into connected components, one for each blob of touching black pixels: the letter “i” has two components (the stem and the dot), “O” has one. Two pixels count as connected when you can walk from one to the other through black pixels that touch, which is path-connectedness in a space with only finitely many points. The count depends on what “touching” means. For the grid below, where 1 is black, 4-neighbour touching (sharing an edge) gives five components, and 8-neighbour touching (sharing an edge or a corner) gives three, because the pixel in the middle touches two blobs diagonally.
1 1 0 0 10 1 0 1 10 0 1 0 01 0 0 0 01 1 0 1 1
Your answerIn the grid above, how many connected components do the black pixels form when two pixels count as touching if they share an edge or a corner (8 neighbours)?
Draw the grid. Which black pixels touch the middle one at row 2, column 2?
The two blobs at the top (rows 0 and 1) are joined through the middle pixel at row 2, column 2, which touches the pixels at row 1, columns 1 and 3 diagonally. Together with that pixel they make one component. The pixels at the bottom left are a second, and the two at the bottom right a third. With edge-only touching the middle pixel is isolated and the top blobs stay apart, giving 5.
Used in the real world· Neural networks: a decision boundary lies between any two images
Let s(x) be the difference between the score a classifier gives to “cat” and to “dog” for an image x with pixel values in [0,1]. For a network built from continuous layers (matrix multiplications, ReLU, and so on) s is continuous. The set of images is a cube in Rn, which is convex, so path-connected. Take a cat image a with s(a)>0 and a dog image b with s(b)<0. The function t↦s((1−t)a+tb) is continuous on [0,1] and changes sign, so by the intermediate value theorem there is an image on the straight segment with s=0: a decision boundary point exists. Binary search on t, which is bisection, finds it. Attacks on classifiers that see only the predicted label use this: they repeatedly halve the segment between a correct and a wrong image to land next to the boundary. The existence of the boundary point is the theorem of this chapter. The search works because each halving keeps a sign change.
Python labFind the equal-temperature pair by bisection
import numpy as nprng = np.random.default_rng(1)K = 5a, b = rng.normal(size=K), rng.normal(size=K)def T(theta): t = sum(a[k]*np.cos((k+1)*theta) + b[k]*np.sin((k+1)*theta) for k in range(K)) # t = 1.0 if (theta % (2*np.pi)) < np.pi else 0.0 # a temperature with a jump return tdef g(theta): return T(theta) - T(theta + np.pi)lo, hi = 0.0, np.piprint("g(0) =", round(g(lo), 4), " g(pi) =", round(g(hi), 4), " (opposite signs)")for _ in range(40): mid = (lo + hi) / 2 if g(lo) * g(mid) <= 0: hi = mid else: lo = midth = (lo + hi) / 2print("theta* =", th)print("T(theta*) =", T(th))print("T(theta*+pi) =", T(th + np.pi))
Try this.First, run it as is and check the last two printed numbers agree. Then change the seed from 1 to 2 and K from 5 to 1: for K = 1 the function T is one sine wave, g is twice T, and the pair is where T is 0. Finally, swap in the broken temperature on the last line of the function T (remove the comment mark in front of it) so that T jumps from 1 to 0. Bisection still converges to a number, but T(theta) and T(theta + pi) now differ by 1. Why does the argument fail? Because a function with a jump is not continuous, and the corollary needs continuity.
Traps
Watch out· Connected is not the same as path-connected
Path-connected implies connected; the converse fails for the topologist’s sine curve. For an open set of Rn the two agree. When a problem says “connected”, you may use the theorem about intervals or the clopen test; “path-connected” lets you exhibit a road, which is usually the easier proof of connectedness when it works.
Watch out· Open in the subset is not open in the whole space
[0,1] is open in the space [0,1]∪[2,3] and not open in R. In the definition of separation, “open in A” means open in the space A itself, which is why the pieces of [0,1]∪[2,3] can be closed intervals. The lemma on open sets inside a subset translates: the pieces are A∩W for open W of the bigger space.
Watch out· Connected needs one piece, not that the pieces touch
[0,1]∪(1,2] is the interval [0,2], connected, though written in two parts: the pieces touch at 1. But [0,1)∪(1,2] is not connected, because the common endpoint 1 is missing. Two sets that touch, with the touching point in one of them, join into a connected set (see Problem on unions). Two sets with a missing point between them do not.
Watch out· The intermediate value theorem needs connected inputs
A continuous function on [0,1]∪[2,3] with f=−1 on [0,1] and f=1 on [2,3] never takes the value 0. The theorem holds for f on a connected domain. The hypotheses “continuous” and “takes both signs” are not enough.
Watch out· Do not stretch the intermediate value theorem past connectedness
A connected set gives you every value between two values, and nothing more. It does not give you a road. The box below shows a problem (two climbers) where knowing a set is connected is not enough and a path is needed.
Beyond the course: for understanding· The two climbers (B): where connected is not enough
Two climbers start at the two feet of a mountain range, drawn as a continuous profile f:[0,1]→R with f(0)=f(1)=0 and f>0 in between. Can they move, one from each end, so that at every moment they are at the same height, and meet at the end? Whittaker (1966) gave the problem that name, and Homma (1952) had solved a version of it. For a range with finitely many peaks and valleys they always can, and Whittaker gave a range with infinitely many oscillations where they cannot. The set of pairs of positions (s,t) with f(s)=f(t) is a closed set of the square. A route for the climbers is a PATH in that set from (0,1) to a point of the diagonal. Knowing the set is connected, which an intermediate value argument can give, is not enough: you need a road, and that is the difference this chapter has drawn between connected and path-connected. For one peak (rising then falling), the climbers match heights using the inverse of the rising part and the inverse of the falling part, and meet at the summit.
Problems
check
Which of these subsets of R are connected? (a) (0,1)∪{2}. (b) [0,1]∪[1,5]. (c) R∖{π}. (d) {x:x2≤4}.
Solution
(a) Not connected: x=21, y=2, z=1.5. (b) Connected: it is [0,5]. (c) Not connected: π is missing. (d) Connected: it is [−2,2].
check
If f:[0,1]→R is continuous with f(0)=3 and f(1)=−2, must f take the value 0? The value 17?
Solution
Yes for 0, because 0 is between −2 and 3. Not necessarily for 17: f(x)=3−5x is continuous with these end values and never reaches 17.
check
Write what ”X is not connected” says, using the words “open” and “disjoint”.
Solution
X is the union of two disjoint, non-empty, open subsets of X.
check
Is the unit circle {(x,y):x2+y2=1} connected? Is the circle with the point (1,0) removed connected?
Solution
The circle is path-connected (example above), hence connected. Removing (1,0) leaves the points (cosθ,sinθ) with 0<θ<2π, the image of the interval (0,2π) under a continuous map, so it is connected.
use
Show that cosx=x has a solution in [0,1].
Solution
Let g(x)=cosx−x, continuous on the connected set [0,1]. g(0)=1>0 and g(1)=cos1−1<0 (since cos1<1). By the corollary, g(c)=0 for some c∈(0,1).
use
Let f:[0,1]→R be continuous with f(0)=f(1). Show there is c∈[0,21] with f(c)=f(c+21).
Solution
Let g(c)=f(c+21)−f(c) on [0,21]. Then g(0)=f(21)−f(0) and g(21)=f(1)−f(21)=f(0)−f(21)=−g(0). So g takes a value and its negative, hence 0 in between.
use
Is A={(x,y)∈R2:x2+y2=1} connected? Is it path-connected?
Solution
Not connected. U={x2+y2<1} and V={x2+y2>1} are open in the plane (each point has a ball around it inside: radius 1−∥p∥ for U and ∥p∥−1 for V), non-empty, disjoint, and U∪V=A. A set that is not connected is not path-connected.
use
A function f on a connected open set U⊆R2 has ∂x∂f=0 and ∂y∂f=0 and is differentiable. Is f constant if U is the open annulus 1<∥p∥<2? If U is the union of two disjoint discs?
Solution
The annulus is open. It is connected because it is the image of the rectangle (1,2)×[0,2π], which is convex and so connected, under the continuous map (r,θ)↦(rcosθ,rsinθ). So f is constant by the theorem on zero gradient. For two disjoint discs, no: f can take a different constant value on each disc.
prove
Prove: if A and B are connected subsets of a metric space and A∩B=∅, then A∪B is connected.
Solution
Plan. Suppose A∪B=P∪Q is a separation. Both A and B lie on one side, and they share a point, so they lie on the same side.
By the lemma on connected sets and separations, A⊆P or A⊆Q, and B⊆P or B⊆Q. Let z∈A∩B. If z∈P, then A⊆P (as A lies on one side and contains a point of P) and B⊆P. Then A∪B⊆P, so Q=∅, a contradiction. If z∈Q the same argument shows P=∅. So there is no separation. ■
prove
Prove: if f:X→Y is continuous and X is path-connected, then f(X) is path-connected.
Solution
Plan. Compose paths with f.
Let y1=f(x1) and y2=f(x2) be points of f(X). Take a path γ in X from x1 to x2. Then f∘γ:[0,1]→f(X) is continuous: given ε and t, continuity of f at γ(t) gives η with d(f(x),f(γ(t)))<ε whenever d(x,γ(t))<η, and continuity of γ at t gives δ with d(γ(s),γ(t))<η whenever ∣s−t∣<δ. It goes from y1 to y2. ■
prove
Prove that a convex subset of Rn is path-connected, and so connected. Deduce that every open ball is connected, and that the punctured line R∖{0} is not convex.
Solution
Plan. A convex set contains the segment between any two of its points, and the segment is a path.
If S is convex and p,q∈S, then γ(t)=(1−t)p+tq∈S for all t. It is continuous because ∥γ(t)−γ(s)∥=∣t−s∣∥q−p∥. So S is path-connected, hence connected. An open ball is convex: for x,y∈B(c,r), ∥(1−t)x+ty−c∥≤(1−t)∥x−c∥+t∥y−c∥<r. For R∖{0}: the segment from −1 to 1 contains 0. ■
prove
Prove: every connected subset of Q has at most one point, using only the theorem on connected subsets of the line.
Solution
Plan. Two points of the subset would force an interval inside Q.
Suppose C⊆Q is connected with x<y in C. Then C is a connected subset of R, so an interval, so (x,y)⊆C⊆Q. But (x,y) contains the irrational number x+n2 for n so large that n2<y−x. That number is not in Q, a contradiction. ■
proveMATH 375 style (Apostol 8.3)
Show that {(x,y):y>x2} is open and connected. Is it path-connected?
Solution
Plan. It is a convex open set.
Open: the function F(x,y)=y−x2 is continuous, and the set is F−1((0,∞)), open by the lemma on preimages (4.5 shows how to see this for functions of two variables). Convex: if y1>x12 and y2>x22 then for 0≤t≤1, (1−t)y1+ty2>(1−t)x12+tx22≥((1−t)x1+tx2)2, because x↦x2 is convex: (1−t)x12+tx22−((1−t)x1+tx2)2=t(1−t)(x1−x2)2≥0. So the segment stays in the set, which is path-connected, hence connected. ■
stretch
Prove that a continuous injective function f:[0,1]→R is strictly monotone.
Solution
Plan. Move two pairs of points toward each other and watch that the difference of values never reaches 0.
Since f is injective, f(0)=f(1). Say f(0)<f(1) (otherwise replace f by −f). Let x<y in [0,1]. For t∈[0,1] put p(t)=tx and q(t)=(1−t)+ty. Then q(t)−p(t)=(1−t)+t(y−x)>0, so p(t)=q(t), and φ(t)=f(q(t))−f(p(t)) is never 0 by injectivity. It is continuous (compositions of continuous maps), on the connected set [0,1]. φ(0)=f(1)−f(0)>0. If φ(1)=f(y)−f(x) were negative, the intermediate value theorem would give a zero of φ. So f(y)>f(x). Hence f is strictly increasing. ■
stretch
Prove that a connected metric space with at least two points is uncountable.
Solution
Plan. The distance from one fixed point is a continuous function with an interval for its image.
Let x=y in X, and h(z)=d(x,z). By the reverse triangle inequality (4.1 problems), ∣h(z)−h(z′)∣≤d(z,z′), so h is continuous (δ=ε). The image h(X) is connected, so an interval, and contains h(x)=0 and h(y)=d(x,y)>0, hence contains [0,d(x,y)]. This interval is uncountable, and h maps X onto a set containing it, so X is uncountable (a countable set has a countable image). ■
Summary
A separation of a set is a splitting into two disjoint, non-empty pieces, each open in the set itself. A set is connected if it has none, equivalently if its only clopen subsets are the empty set and the whole set.
The connected subsets of the line are exactly the intervals. The proof is the supremum argument of 1.3: a separation of an interval would need a last point of the left piece, which belongs to neither piece.
A continuous map sends connected sets to connected sets, because it pulls open sets back to open sets. The intermediate value theorem is the special case where the image lies in R.
Path-connected (any two points joined by a continuous path) implies connected. Convex sets and balls are path-connected, the punctured plane is path-connected, and the punctured line is not connected.
For open sets of Rn, connected and path-connected are the same. In general they differ: the topologist’s sine curve is connected, with no path onto its wiggles (B).
Zero gradient on a connected open set means constant; connectedness is what carries the information between different pieces, and it fails for two separate discs.
Counting connected components is how images are segmented, and the existence of a decision boundary between two classes follows from the intermediate value theorem.
MATH 375: Apostol 8.3 asks for sets in $\mathbb R^n$ that are open, and 375 never asks whether they are in one piece. The statement 'a function with zero gradient on an open set is constant' needs the open set to be connected. 375 states the version for balls and boxes; this chapter proves what 'one piece' must mean.
MATH 521: 521 proves that the connected subsets of $\mathbb R$ are the intervals and deduces the intermediate value theorem from it. Everything in the first three sections of this chapter is that lecture.
MATH 551: Topology defines connected, path-connected and the components of a space using only open sets, exactly as here. The separation of the topologist's sine curve is the standard example that the two notions differ.
CS 240 / graphs: A graph is connected when you can walk from any vertex to any other. That is path-connected for a discrete space. 'Connected components' of a graph, and of the pixels of an image, count the pieces.