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.

-

Expanding on the nice examples above… If $X$ is a topological space and if $A$ and $B$ are non empty subsets of $X$ with empty intersection, such that $A\cup B\supset C$ for some connected open subset $C$ of $X$. Assume also that both $A$ and $B$ intersects C. Then clearly $A$ and $B$ cannot be open, since that would imply that $C$ is not connected.

-
 You need $A \cup B = C$ for what you say to be true. – Brandon Carter Mar 2 '12 at 20:52 Sorry my bad..I forgot to mention that both A and B should intersect C. – user22705 Mar 2 '12 at 21:08