Condition on Connectedness by Clopen Sets

Theorem
Let $T$ be a topological space.

Then $T$ is connected iff the only clopen sets of $T$ are $T$ and $\varnothing$.

Proof
By definition of connectedness, $T$ is connected iff it admits no partition.


 * Let $T$ be not connected.

Then by definition $T$ admits a partition, $A \mid B$ say.

Then both $A$ and $B$ are clopen sets of $T$, neither of which is either $T$ or $\varnothing$.


 * Now suppose $\exists A \subseteq T$ which is clopen.

Then $T - A$ is also clopen and so $A \mid T - A$ partitions $T$.

Hence by definition, $T$ is not connected.

The result follows by definition of connectedness.