# unions of sets with a trivial intersection

Let $X$ be a topological space. Let $A$ and $B$ be sets in $X$ such that the intersection of $A$ and $B$ is empty. Suppose the union of $A$ and $B$ is open. Does it follow that both $A$ and $B$ are open?

-
You can consider a general set $A$ and its complement. –  David Mitra Mar 2 '12 at 19:59

No. For example, let $X$ be $\mathbb{R}$ with the usual topology, $A$ be $(0,1]$, and $B$ be $(1,2)$.
Not even in the reals. Let $A$ be the rationals and $B$ the irrationals. There are many other examples.
In general, $A$ and $B$ can be more or less arbitrarily badly (or well) behaved.