Consider function $f: \mathbb{R}^2 \rightarrow \mathbb{R}$. Suppose $\forall y \in \mathbb{R}$, the function $f(\cdot,y)$ is continuous and there is exists a positive number $K$ such that
$$|f(x,y') - f(x,y'')| \leq K |y' - y''|, \forall x,y',y'' \in \mathbb{R}$$
Show that $f$ is continuous on $\mathbb{R}^2$.
I have no idea to solve this problem, so I need help. Thanks all!
Let $(a, b) \in \mathbb{R}^2$, and let $\varepsilon>0$ be given. Since $f(\cdot,b)$ is continuous, we may find $\delta_1>0$ so that \begin{equation}\left|\, f(x,b)-f(a,b) \right|<\frac{\varepsilon}{2} \text{ whenever } |x-a|<\delta_1. \end{equation} Since $K>0$ is a common Lipschitz constant for the family of functions $\mathscr{F}=\{\,f(x, \cdot) \}_{x \in \mathbb{R}}$, we know that \begin{equation}\left|\, f(x,y)-f(x,b) \right|<\frac{\varepsilon}{2} \text{ for all } x \in \mathbb{R} \text{ whenever } K|y-b|<\frac{\varepsilon}{2}. \end{equation} So we select $\delta_2=\min\left\{\frac{\varepsilon}{2},\frac{\varepsilon}{2K}\right\}$. Note that for $(x,y),(a,b)\in \mathbb{R}^2$ we have $|x-a|+|y-b|\leq \sqrt{2}\sqrt{(x-a)^2+(y-b)^2}$. Setting $\delta=\frac{1}{\sqrt{2}}\min\{\delta_1, \delta_2\}$ it now follows that \begin{aligned}\left|\, f(x,y)-f(a,b) \right| &\leq \left|\, f(x,y)-f(x,b) \right| + \left|\, f(x,b)-f(a,b) \right|\\&<\frac{\varepsilon}{2}+\frac{\varepsilon}{2}=\varepsilon \, \text{ whenever }\, \sqrt{(x-a)^2+(y-b)^2}<\delta. \end{aligned}