TITLE: Showing that $\sup_{(x,y)}f(x,y)=\sup_x\sup_yf(x,y)=\sup_y\sup_xf(x,y)$
QUESTION [6 upvotes]: Can anyone help me prove this:

Let $X$ and $Y$ be nonempty sets and $f:X\times Y\to\Bbb R$ such that $f(X\times Y)$ is bounded. Prove the following statement:

$\sup_{(x,y)}f(x,y)=\sup_x\sup_yf(x,y)=\sup_y\sup_xf(x,y)\;.$


thank you

REPLY [3 votes]: Hint: Use the fact that $a = b$ is equivalent to $a \le b$ and $b \le a$, togeher with the inequality
$$f(x, y) \le \sup \limits_y f(x, y) \le \sup \limits_x \sup \limits_y f(x, y).$$