[proofplan]
We prove the more general statement: every connected component of an open subset $V$ of a locally connected space $X$ is open. Given a point $x$ in a component $C$ of $V$, local connectedness provides a connected open neighbourhood $W$ of $x$ inside $V$. Since $W$ is connected and meets $C$, it lies entirely within $C$. This makes $C$ a neighbourhood of each of its points, hence open. The final statement — that the components of $X$ itself are clopen — follows because components are always closed and we have just shown they are open when the ambient space is locally connected.
[/proofplan]
[step:Show that each component of an open subset $V$ is open]
Let $V$ be an open subset of a locally connected space $X$, and let $C$ be a connected component of $V$. We show $C$ is open in $X$ (and hence open in $V$).
Fix $x \in C$. Since $V$ is open in $X$ and $X$ is locally connected, there exists a connected open set $W \subset X$ with $x \in W \subset V$. (This follows directly from the definition of local connectedness: every point has a neighbourhood basis of connected open sets, and we intersect with $V$ — but in fact, since $V$ is open and $W$ can be chosen inside any open neighbourhood of $x$, we may choose $W \subset V$ from the start.)
The set $W$ is connected and contains $x \in C$. Since $C$ is a connected component of $V$, it is a maximal connected subset of $V$. Because $W \subset V$ is connected and $W \cap C \neq \varnothing$ (as $x \in W \cap C$), the union $W \cup C$ is connected (by [Union of Overlapping Connected Sets](/theorems/298)). The maximality of $C$ then forces $W \cup C = C$, i.e. $W \subset C$.
Therefore $x \in W \subset C$ with $W$ open in $X$. Since $x \in C$ was arbitrary, $C$ is open in $X$.
[guided]
The heart of this proof is the interplay between local connectedness and the maximality of connected components.
A connected component $C$ of a space $Y$ is, by [definition](/theorems/302), the maximal connected subset containing a given point. Components always exist (as the union of all connected subsets containing the point), and by the [Properties of Connected Components](/theorems/302), they are always closed. However, components need not be open in general — consider the rationals $\mathbb{Q}$ with the subspace topology from $\mathbb{R}$, where every component is a singleton $\{q\}$, which is not open.
The hypothesis of local connectedness is what forces components to be open. Here is why. Fix $x \in C$, where $C$ is a component of the open set $V \subset X$. Since $X$ is locally connected, $x$ has a neighbourhood basis of connected open sets. Since $V$ is open, we can find a connected open $W$ with $x \in W \subset V$.
Now $W$ is a connected subset of $V$ that intersects $C$ (at $x$). By the [Union of Overlapping Connected Sets](/theorems/298) theorem, $W \cup C$ is connected. But $C$ is a maximal connected subset of $V$, so any connected subset of $V$ that contains $C$ must equal $C$. Since $W \cup C$ is connected and contains $C$, we conclude $W \cup C = C$, i.e. $W \subset C$.
This gives $x \in W \subset C$ with $W$ open, so $C$ contains an open neighbourhood of each of its points. By the definition of the topology, $C$ is open.
Note that local connectedness is essential: the argument requires finding a *connected* open neighbourhood inside $V$, not merely an open neighbourhood. Without connectedness of $W$, we cannot invoke the union theorem to absorb $W$ into $C$.
[/guided]
[/step]
[step:Conclude that the components of $X$ are clopen]
Applying the result above with $V = X$ (which is open in $X$), each connected component of $X$ is open. By the [Properties of Connected Components](/theorems/302), every connected component of any topological space is closed. Therefore the connected components of a locally connected space are both open and closed.
[guided]
The "in particular" clause of the theorem follows by specialising to $V = X$, which is open in any topology. The components of $X$ are then open by the argument above. They are also closed, because connected components are always closed in any topological space — this is part (5) of the [Properties of Connected Components](/theorems/302): the closure of a connected set is connected (by [Closure of a Connected Set is Connected](/theorems/297)), and since a component is maximally connected, it must equal its own closure.
A set that is both open and closed is called clopen. In a locally connected space, the components are clopen, which means they form a partition of $X$ into clopen sets. This has a useful converse flavour: a topological space is connected if and only if its only clopen subsets are $\varnothing$ and $X$, and in a locally connected space, the clopen subsets are precisely the unions of connected components.
[/guided]
[/step]