[proofplan]
Assume, toward a contradiction, that a path [connected space](/page/Connected%20Space) admits a separation into two nonempty disjoint open subsets. Choose one point from each side and join them by a path. The image of this path is connected because the interval $[0,1]$ is connected and connectedness is preserved by continuous images; proving this image-level fact inline avoids any unresolved external citation. Intersecting the alleged separation with the path image then gives a separation of the image, contradicting the fact that the image contains both chosen endpoints.
[/proofplan]
[step:Rule out a separation by pulling it back along a path]
Suppose, toward a contradiction, that $X$ is not connected. Then there exist sets $U,V\in\tau$ such that $U\neq\varnothing$, $V\neq\varnothing$,
\begin{align*}
X=U\cup V,\qquad U\cap V=\varnothing.
\end{align*}
Choose $x\in U$ and $y\in V$. Since $X$ is path connected, there exists a continuous map
\begin{align*}
\gamma:[0,1]\to X
\end{align*}
such that $\gamma(0)=x$ and $\gamma(1)=y$, where $[0,1]$ has the [subspace topology](/page/Subspace%20Topology) inherited from $\mathbb{R}$.
[guided]
We argue by contradiction using the definition of connectedness. To say that $X$ is not connected means that $X$ has a separation: two nonempty disjoint open sets whose union is all of $X$. Thus we choose $U,V\in\tau$ with $U\neq\varnothing$, $V\neq\varnothing$,
\begin{align*}
X=U\cup V,\qquad U\cap V=\varnothing.
\end{align*}
Because both pieces are nonempty, we may choose one point from each side: let $x\in U$ and let $y\in V$. The hypothesis of [path connectedness](/page/Path%20Connectedness) is now used exactly once. It gives a continuous map
\begin{align*}
\gamma:[0,1]\to X
\end{align*}
with $\gamma(0)=x$ and $\gamma(1)=y$. The contradiction will come from the fact that the continuous path image cannot be split between the two separated open sets while containing one endpoint in each.
[/guided]
[/step]
[step:Show that the path image is connected]
Let $Y:=\gamma([0,1])\subset X$ be the image of the path.
[claim:The interval $[0,1]$ is connected]
[/claim]
[proof]
Suppose $[0,1]=A\cup B$, where $A$ and $B$ are disjoint nonempty open subsets of $[0,1]$ in the subspace topology. Choose $a\in A$ and $b\in B$. If $b<a$, interchange the names of $A$ and $B$, so assume $a<b$. Define
\begin{align*}
S:=\{t\in[a,b]:[a,t]\subset A\}.
\end{align*}
Since $a\in A$ and $A$ is open in $[0,1]$, there exists $\varepsilon>0$ such that $[0,1]\cap(a-\varepsilon,a+\varepsilon)\subset A$. Hence $S$ is nonempty. Since $S\subset[a,b]$, the number $c:=\sup S$ exists and satisfies $a\leq c\leq b$.
If $c\in B$, then because $B$ is open in $[0,1]$, there exists $\delta>0$ such that $[0,1]\cap(c-\delta,c+\delta)\subset B$. Since $c=\sup S$, there exists $s\in S$ with $c-\delta<s\leq c$. Then $s\in A\cap B$, contradicting $A\cap B=\varnothing$.
Thus $c\in A$. Since $A$ is open in $[0,1]$, there exists $\eta>0$ such that $[0,1]\cap(c-\eta,c+\eta)\subset A$. Because $b\in B$, we have $c<b$. Choose $r\in\mathbb{R}$ with $c<r<\min\{b,c+\eta\}$. From $c=\sup S$, choose $s\in S$ with $c-\eta<s\leq c$. Then $[a,s]\subset A$, and also $[s,r]\subset A$ by the choice of $\eta$. Hence $[a,r]\subset A$, so $r\in S$, contradicting $r>c=\sup S$.
Therefore no such separation of $[0,1]$ exists, and $[0,1]$ is connected.
[/proof]
Now suppose $Y=P\cup Q$, where $P$ and $Q$ are disjoint nonempty open subsets of $Y$ in the subspace topology. Since $\gamma:[0,1]\to Y$ is continuous when its codomain is restricted to $Y$, the sets $\gamma^{-1}(P)$ and $\gamma^{-1}(Q)$ are disjoint nonempty open subsets of $[0,1]$, and
\begin{align*}
[0,1]=\gamma^{-1}(P)\cup\gamma^{-1}(Q).
\end{align*}
This contradicts the connectedness of $[0,1]$. Hence $Y$ is connected.
[/step]
[step:Intersect the separation with the path image]
The sets $Y\cap U$ and $Y\cap V$ are open in $Y$ by the definition of the subspace topology. They are disjoint because $U\cap V=\varnothing$, and their union is $Y$ because $X=U\cup V$. They are both nonempty: $\gamma(0)=x\in Y\cap U$ and $\gamma(1)=y\in Y\cap V$.
Thus $Y=(Y\cap U)\cup(Y\cap V)$ is a separation of $Y$, contradicting the connectedness of $Y$ proved above. Therefore $X$ admits no separation, and hence $X$ is connected.
[/step]