# Is $[0,1]\cup [2,3]$ connected?

So I'm having some confusion with the definition of connectedness. I understand connectedness intuitively but the definition seems shady. A topological space $X$ is said to be disconnected if $X$ is the union of two or more nonempty disjoint open sets. $X$ is connected otherwise. So since $X=[0,1] \cup [2,3]$ is the union of two disjoint closed sets (not open) in the real numbers. So $X$ wouldn't be connected by this definition, since it is not the disjoint union of OPEN sets. But it is not path connected so... I feel like it shouldn't be connected. Thanks for the help and sorry if I'm overlooking something.

• They are not disjoint, $2$ belongs to both – Mathematician 42 Feb 1 '18 at 17:27
• Yes it is,there union is [1,3] compact interval – Math1995 Feb 1 '18 at 17:28
• Sorry... I meant [0,1] union [2,3] – Brandon Feb 1 '18 at 17:33

The subspace topology on $Y \subseteq X$ is defined so that a set $S \subseteq Y$ is open iff there is an open set $U \subseteq X$ such that $S = U \cap Y$.
A set $Y \subseteq X$ is disconnected iff it is the union of two disjoint sets which are open in the subspace topology on $Y$.
You're missing the "which are open in the subspace topology" in your reasoning. In the subspace topology on $[0,1] \cup [3,4]$, the sets $[0,1]$ and $[3,4]$ are open because they are $(-1, 2) \cap ([0,1] \cup [3,4])$ and $(2, 5) \cap ([0,1] \cup [3,4])$, for instance.