Let $A$ be a subset of $\Bbb{R}^2$ with the property that every continuous function $f:A\to\Bbb{R}$ has a maximum in $A$. I have to prove that $A$ is compact.
Is $A$ were a subset of $\Bbb{R}$ then we could take a function that is monotone over the components of $A$ and show that each of the components is closed and bounded hence proving $A$ to be compact. But couldn't generalize this idea to a subset of $\Bbb{R}^2$ that easily.