in $\mathbb{R}$, with the usual topology, is the set $A = \mathbb{[a,b]}$ connected? what about $B = [a,b] \cup [c,d]$ where $a < b < c < d$, i would say $A$ is connected while $B$ is not.
However i cannot understand how to apply the definition to prove/disprove they're connected.
Munkres says
Let $X$ be a topological space. A separation of $X$ is a pair $U,V$ of disjoint nonempty open subsets of $X$ whose union is in $X$. The space $X$ is said to be connected if there not exist a separation of $X$.
So to prove that $A$ is connected i have to prove that there's no separation (i would try by contradiction), while to prove $B$ is not connected i would try to find such pair of open subsets... however i'm a bit confused on how to apply the definition since my sets are actual union of closed set.