Give an example that $\overline{A \cap B} \neq \overline{A} \cap \overline{B}$ [duplicate]

Possible Duplicate:
Is the closure of $X \cap Y$ equal to $\bar{X} \cap \bar{Y}$?

I'm sorry to ask another question so soon after my last one, but my exam Introduction to Functional Analysis is near and I'm curious about this exercise :)

Exercise:

Give an example of a Metric Space $(X,\rho)$ and two sets $A, B \subset X$ such that $\overline{A \cap B} \neq \overline{A} \cap \overline{B}$.

So (the closure of the intersection of $A$ with $B$) should not equal (the intersection of the closure of $A$ with the closure of $B$).

My first idea was to test in the $\mathbb{R}^n$, but if I'm correct the inequality doesn't hold in those spaces.

Next idea was to look to the set (or space) of all polynomials on $[a,b]$, since I know that the closure (or completion, not sure what the difference is) of this space is the space of continuous functions on $[a,b]$. But the exercise states that I have to pick two sets out of my chosen Metric Space (i.e. the polynomials), not sure what to pick.

Could someone provide a hint, should I for instance look to a Sequence Space or a Function Space? Or something with a discrete Metric?

-

marked as duplicate by Zev ChonolesOct 31 '11 at 0:37

I am almost certain that this question was asked before. As Zev shows, it is easier to come up with a counterexample than the link to the duplicate :-) –  Asaf Karagila Oct 31 '11 at 0:34
@Asaf: I found at least one copy of it, there may be more :) –  Zev Chonoles Oct 31 '11 at 0:38
@Zev: I was just finding that question which you marked as a duplicate. Nice for beating me up by 18 seconds. :-) –  Asaf Karagila Oct 31 '11 at 0:40
My apologies, I should have searched a little better. By the way, am I the only one who sees a pun in the [closed]-tag (and the square brackets)...? Thanks @ZevChonoles for both the answer and the redirecting. –  Ailurus Oct 31 '11 at 0:44
@Ailurus: It's no problem, happens all the time :) And good catch on the double pun! –  Zev Chonoles Oct 31 '11 at 0:45

Consider $X=\mathbb{R}$ with its usual metric, and let $A=(0,1)$, and $B=(1,2)$. Then $A\cap B=\varnothing$, hence $\overline{A\cap B}=\overline{\varnothing}=\varnothing$, but $\overline{A}=[0,1]$ and $\overline{B}=[1,2]$, hence $\overline{A}\cap\overline{B}=\{1\}$. Thus $$\overline{A \cap B} =\varnothing\neq \{1\}=\overline{A} \cap \overline{B}.$$
@Ailurus Two facts: 1. The intersection of two closed sets is closed. 2. The closure of a closed set is itself. From these facts, one can deduce, for closed sets $X$ and $Y$, $\overline{X \cap Y} = X \cap Y = \overline{X} \cap \overline{Y}$. Thus, starting with two closed sets will never produce a counterexample. –  Austin Mohr Oct 31 '11 at 1:34