Let $A\subset \Bbb R^2 $ with the property that every continuous function on $A$ has a maximum in $A$ .Prove that $A$ is compact.
My try:
We have to show that $A$ is closed and bounded.
In order to prove this result we should have some ready continuous functions in our hand. The projection maps can be used.
Define $\pi_x:A\to \Bbb R ;\pi_x(x,y)=x$ and $\pi_y:A\to \Bbb R ;\pi_y(x,y)=y$
They attain their bounds on $A$ so there exists $(a,b)\in A$ such that $\sup_{\{(x,y)\in A\}}\pi _x(x,y)=a $ and $(a,b)\in A$ such that $\sup_{\{(x,y)\in A\}}\pi _y(x,y)=b$
I can't proceed further.Please help
You can prove that $A$ is bounded by contradiction. Assume that $A$ is not bounded, and look at the function $f(x,y)=x^2+y^2$. Does this function have a maximum?
Similarly, you can prove that $A$ is closed. Assume that it is not. That means there exists a point $(x_0, y_0)$ which is in the closure of $A$, but not in $A$. Now, look at the function $f(x,y)=\frac{1}{(x-x_0)^2 + (y-y_0)^2}$