# compact open set?

unfortunately I am completely stuck on the follwing question:

Given a non compact metric space M that contains a non empty open compact subset, then M is not connected.

What examples are there?

How can I prove it?

Thank you very much in advance!

• what would be an example? I am trying to find something in the real numbers, but I do not manage to construct a set that is both open and compact. – Hans Apr 14 '14 at 17:57

Hint: In the case where $M$ is metric, every compact set is closed. $M$ is connected iff every open and closed subset is either $M$ or $\emptyset$.