Let $f$ be a continuous function on $A$ which is a compact subset of $\mathbb{R}^2$. Due to Weierstrass theorem, I know that there exists $(a,b) \in A$ such that $f(a,b) = \max_{(x,y)\in A} f(x,y).$ This implies that the set $U = \arg \max_{(x,y)\in A} f(x,y)$ is non-empty. My question is the following: is it always possible to "choose" an element of U when U is non-singleton ?
I thought considering some lexicographical order on U, but I don't see how to prove that a maximal element always exists.