Let (X,d) be a metric space. We say that X is disconnected if there exist two disjoint, non-empty, open sets U,V⊆X such that X=U∪V.
If X is not disconnected, then we say that X is connected.
Example 1.
Any interval in R is connected (with respect to the restricted absolute value metric).
Q⊆R is disconnected (with respect to the restricted absolute value metric).
Example 2.
(warmup to 2.4.6)
Let (X,d) be a metric space and assume A,B are connected sets in X such that A∩B=∅. Show that A∪B is connected.
Solution.
Assume that A∪B=U∪V, where U,V are disjoint, non-empty, open sets in A∪B. By the properties of sub-metric spaces, there exist open sets UX,VX⊆X in X such that U=(A∪B)∩UX and V=(A∪B)∩VX.
Claim:A⊆U or A⊆V.
Suppose otherwise, and that A∩U=∅ and A∩V=∅. Notice that
A∩U=A∩(A∪B)∩UX=A∩UX,
i.e., A∩U is open in A and by symmetry, A∩V is open in A also. But A∪B=U∪V, so
A=A∩(A∪B)=A∩(U∪V)=(A∩U)∪(A∩V).(since A∪B=U∪V)
But A∩U and A∩V are disjoint, non-empty, and open sets in A, which implies that A is disconnected, a contradiction.
Thus, A⊆U or A⊆V. Without loss of generality, we may assume that A⊆U. In the other case, we can just replace U with V in the following argument.
Because A∩B=∅, this means that B∩U=∅. Since B is connected, this means that B⊆U as well by using the same argument in the claim, which means that A∪B⊆U, so V=∅, a contradiction. Thus, no such U and V existed to begin with, i.e., A∪B is connected.
Example 3.
Let (X,d) be a connected metric space and let f:(X,dX)→(Y,dY) be a function such that the set
E={x∈X∣f(x)=y}
is non-empty, open, and closed. Show that f is constant.
Solution.
Assume otherwise, and that f is not constant. Then Ec=∅: since E=∅, there exists x∈X such that f(x)=y, but f is not constant, so there exists x′∈X such that f(x′)=y, i.e., x′∈Ec.
Since E was closed, we know that Ec is open, and by definition,
X=E∪Ec.
But E,Ec are disjoint (by definition), non-empty, and open, which implies that X is disconnected, a contradiction.
Path-Connectedness
Definition
Let (X,d) be a metric space. Then X is path-connected if for any two points x,y∈X, there exists a continuous function γ:[0,1]→X such that γ(0)=x and γ(1)=y.
Remark.
In your homework, you will prove that path-connected ⟹ connected. However, the converse is not true in general, i.e., there are connected metric spaces which are not path-connected.
Sometimes, it's easier to show that a metric space is path-connected than it is to show that it's connected directly.
Example 4.
Show that
E={f∈C([0,1])∣f(0)=0}
is a connected subset of C([0,1]) with the sup-metric.
Solution.
We'll show that E is path-connected. Let f,g∈E, and define the line segment (or homotopy) between them via γ:[0,1]→E,
γt(x)=(1−t)f(x)+tg(x).
For any t∈[0,1], the function γt(x) is continuous since it's a linear combination of the continuous functions f and g, and
γt(0)=(1−t)f(0)+tg(0)=0,
so γ is well-defined (i.e., it actually gives me functions in E).
If f=g, then γ is constant in t, so it's automatically continuous. If f=g, then let ε>0.
Cf,g exists and is finite because ∣f−g∣ is a continuous function on the compact set [0,1]. Moreover, Cf,g=0 since we assumed that f=g. Thus, we can pick δ=Cf,gε. Then if ∣t−s∣<δ, we get
so γ is continuous in t. In other words, γ is a valid path between f and g, so E is path-connected, hence connected.
Connectedness and Continuity
Proposition
If f:(X,dX)→(Y,dY) is continuous and E⊆X is connected, then f(E)⊆Y is connected.
Like with compact sets, we say "the continuous image of a connected set is connected."
This can be a useful way to show that some sets are connected directly.
Example 5.
Let f:R→R be a continuous function. Show that its graph
Γ={(x,f(x))∣x∈R}
is a connected subset of R2.
Solution.
We can define F:R→Γ by F(x)=(x,f(x)). By construction, Γ=F(R), and since R is connected, if we show that F is continuous, we automatically know that Γ is connected.
Let ε>0 and fix x0∈R. Recall that
dℓ2(F(x),F(x0))=(x−x0)2+(f(x)−f(x0))2.
Since f is continuous, there exists δ>0 such that if ∣x−y∣<δ, then ∣f(x)−f(y)∣<2ε. Thus, if ∣x−y∣<min{δ,2ε}, then