Let XX be a topological space. A separation of XX is a pair of disjoint non-empty open sets whose union is X.X.

Let XX be a topological space. The space XX is disconnected if and only if it has a separation. The space XX is connected if and only if it is not disconnected. Equivalently, XX is connected if and only if the only subsets of XX that are both open and closed are ∅\varnothing and X.X.

Let XX be a topological space and A⊆X.A\subseteq X. The set AA is connected if and only if it is connected as a subspace of X.X. Connected sets have the following properties:

  • a subset of R\mathbb{R} is connected if and only if it is an interval;
  • the rational numbers are disconnected, since {x∈Q:x<2}\left\{x\in\mathbb{Q}:x<\sqrt{2}\right\} and {x∈Q:x>2}\left\{x\in\mathbb{Q}:x>\sqrt{2}\right\} separate them;
  • a set with the discrete topology is connected only if it has at most one point;
  • the closure of a connected set is connected, as is any set between a connected set and its closure;
  • the union of connected sets with a common point is connected;
  • the product of finitely many connected spaces is connected;
  • the continuous image of a connected set is connected: if f:X→Yf:X\rightarrow Y is continuous and A⊆XA\subseteq X is connected then f(A)f(A) is connected.

Since the connected subsets of R\mathbb{R} are the intervals, a continuous real-valued function on a connected space takes every value between any two of its values, which extends the intermediate value theorem. Connectedness is a topological property, so an interval is not homeomorphic to a circle, which stays connected when a point is removed.

Let XX be a topological space and x∈X.x\in X. The connected component of xx is the union of all connected subsets of XX containing x.x. The connected component of xx is the largest connected set containing x.x. Connected components have the following properties:

  • the connected components partition XX into closed sets;
  • XX is connected if and only if it has exactly one connected component;
  • the connected components of Q\mathbb{Q} are its single points.

Let XX be a topological space and x,y∈X.x,y\in X. A path in XX from xx to yy is a continuous function γ:[0,1]→X\gamma:\left[0,1\right]\rightarrow X with γ(0)=x\gamma(0)=x and γ(1)=y.\gamma(1)=y.

Let XX be a topological space. The space XX is path-connected if and only if any two of its points are joined by a path.

Let XX be a topological space and x∈X.x\in X. The path component of xx is the set of points of XX that are joined to xx by a path.

Let x‾,y‾∈Rn.\underline{x},\underline{y}\in\mathbb{R}^n. The line segment between x‾\underline{x} and y‾\underline{y} is the set {(1−t)x‾+t y‾:t∈[0,1]}.\left\{\left(1-t\right)\underline{x}+t\,\underline{y}:t\in\left[0,1\right]\right\}. Path-connected sets have the following properties:

  • a subset of Rn\mathbb{R}^n that contains the line segment between any two of its points is path-connected by those segments, so balls, intervals and Rn\mathbb{R}^n are path-connected;
  • spheres and Rn\mathbb{R}^n with a point removed are path-connected when n≥2;n\geq 2;
  • the continuous image of a path-connected set is path-connected;
  • a path-connected space is connected, since the image of each path is connected and the paths from a fixed point share that point.

The converse of the last property is false. The topologist’s sine curve is the closure in R2\mathbb{R}^2 of the graph of x↦sin⁡1xx\mapsto\sin\frac{1}{x} on (0,1].\left(0,1\right]. The topologist’s sine curve is connected, but no path joins the graph to the segment {0}×[−1,1]\left\{0\right\}\times\left[-1,1\right] in its closure. An open connected subset of Rn\mathbb{R}^n is path-connected, and any two of its points are joined by a path made of finitely many line segments, so connectedness and path-connectedness agree for the open sets on which vector fields are defined.