# $f(x,y)$ bounded as function of $x$ for fixed $y$ and vice versa is a bounded function

This is a question that I have been asking myself:

If $f(x,y):\mathbb{R}^2\to\mathbb{R}$ is a function such that:

(1) $f(x,y)$ is bounded as function of $x$ for fixed $y$

(2) $f(x,y)$ is bounded as function of $y$ for fixed $x$

Then $f(x,y)$ is a bounded function of $(x,y)$, i.e. $f(x,y)\leq M$ for all $(x,y)$?

My thoughts are:

Condition (1) implies that for each $y$, $f(x,y)\leq N_y$ for all $x$.

Condition (2) implies that for each $x$, $f(x,y)\leq N_x$ for all $y$.

I can't think of any counterexamples off-hand.

I know the analogous statement for continuity is not true: continuity in each variable separately is strictly weaker than continuity.

Thanks for any help!

A counterexample: $$f(x,y) = \begin{cases} x, & x=y \\ 0, & \text{otherwise} \end{cases}$$
$$f(x,y)=\frac{x}{e^{(x-y)^2}}$$