Proof:

Assume $ X$ is path connected but not connected. Then there is a non constant continuous function $ g : X \longrightarrow \mathbb{Z}$ say $ f(x) = m$ and $ f(y) = n$ for a pair of distinct integers $ m$ and $ n$. But there is also a continuous function $ f : [0. 1] \longrightarrow X$ such that $ g(0) = x$ and $ g(1) = y$. The composite function $ f\circ g : [0, 1] \longrightarrow \mathbb{Z}$ is non constant which is a contradiction.

nisha 2012-03-20