Connected and Disconnected Metric Spaces
Definition: A metric space
is said to be Disconnected if there exists nonempty open sets
and
such that
and
. If
is not disconnected then we say that
Connected. Furthermore, if
then
is said to be disconnected/connected if the metric subspace
is disconnected/connected.
Intuitively, a set is disconnected if it can be separated into two pieces while a set is connected if it’s an entire piece.
For example, consider the metric space
where
is the Euclidean metric on
. Let
, i.e.,
is an open interval in
. We claim that
is connected.
Suppose not. Then there exists nonempty open subsets
and
such that
and
. Furthermore,
and
must be open intervals themselves, say
and
. We must have that
. So
or
and furthermore,
or
.
If
then this implies that
(since if
then
which implies that
). So if
. If
then
and so
so
. If
then
and
so
. If
then
. Either way we see that
.
We can use the same logic for the other cases which will completely show that
is connected.
Basic Theorems Regarding Connected and Disconnected Metric Spaces
A metric space
is said to be disconnected if there exists
,
where
and:

We say that
is connected if it is not disconnected.
Furthermore, we say that
is connected/disconnected if the metric subspace
is connected/disconnected.
We will now look at some important theorems regarding connected and disconnected metric spaces.
Theorem 1: A metric space
is disconnected if and only if there exists a proper nonempty subset
such that
is both open and closed.
Suppose that
is disconnected. Then there exists open
,
, where
and
.
- Since
is open in
we have that
is closed in
. But
is also open. Similarly, since
is open in
,
is closed in
. So in fact
and
are both nonempty proper subsets of
that are both open and closed.
Suppose that there exists a proper nonempty subset
such that
is both open and closed. Let
. Then
is also both open and closed. Furthermore, since
and
. Additionally,
, so
is disconnected. 
Theorem 2: If
is a connected unbounded metric space, then for every
and for all
,
is nonempty.
- Proof: Let
be a connected unbounded metric space and suppose that there exists an
and there exists an
such that:

- We will show that a contradiction arises. Let
and let
. Then
is open since it is simply an open ball centered at
. Furthermore,
is open since
is a closed ball centered
.
is nonempty since
and
is nonempty since
is unbounded (if it were empty then this would imply
is bounded). Clearly
and
. So
is a disconnected metric space. But this is a contradiction.
- Therefore the assumption that there exists an
and an
such that
was false.
- So for all
and for all
the set
is nonempty. 
Continuous Functions on Connected Sets of Metric Spaces
A metric space
is said to be disconnected if there exists nonempty open sets
and
such that
and:

If
is not disconnected then we say
is connected.
Furthermore, we said that a subset
is connected (or disconnected) if the metric subspace
is connected (or disconnected).
We will now look at a nice theorem which tells us that if
is continuous on a connected set then the image
is also connected in the codomain.
Theorem 1: Let
and
be metric spaces,
and
be continuous. If
is connected in
then
is connected in
.
- Proof: Let
be a connected set and suppose that
is not connected, i.e., disconnected. We will show that a contradiction arises.
- Suppose that
is disconnected. Then there exists nonempty open sets
such that
and:

- Since
is continuous we have that:

- Note that
and
are nonempty, otherwise,
or
would be empty which cannot happen. Furthermore, both of these sets are open from the continuity of
. We claim that
. Suppose not. Then there exists an
and so
which implies that
which is a contradiction.
- Therefore
and so
is a disconnected set. But this is a contradiction.
- Hence the assumption that
was disconnected is false. Therefore, if
is a connected set in
and
is continuous then
is connected in 
Licensing
Content obtained and/or adapted from: