I had a question regarding locally and globally Lipschitz functions.

Suppose there exist some real $\delta > 0$ and $M > 0$ such that $f : \mathbb{R} \to \mathbb{R}$ satisfies $|f(x) - f(y)| \leq M|x - y|$ for all $x, y \in \mathbb{R}$ satisfying $|x - y| < \delta$. That is, suppose $f$ is locally Lipschitz, and the same Lipschitz constant works for all small enough neighborhoods of $\mathbb{R}$. Then is the function globally Lipschitz too? If not, what is a counterexample?

I know that if the function is everywhere differentiable, the above condition implies its derivative is bounded, and thus it must be globally Lipschitz, so a counterexample must not be differentiable. Also, the image of a counterexample would have to be unbounded in $\mathbb{R}$, since if for all $M' \geq M$ we have $|f(x) - f(y)| > M'|x - y|$ for some $x, y \in \mathbb{R}$, we know this is only possible if $|x - y| \geq \delta$ by the condition above, so we find $|f(x) - f(y)| > M'\delta$ for all $M' \geq M$ and some $x, y \in \mathbb{R}$, and it follows from here that the image must be unbounded since $M'\delta \to \infty$ as $M' \to \infty$. I also know that if the domain was a bounded subset of $\mathbb{R}$ then we could just recursively take bigger Lipschitz constants to connect the neighborhoods and cover the whole domain with a single Lipschitz constant, but I don't see how this would apply to an unbounded domain like all of $\mathbb{R}$.

Is there more to this condition/argument that I am missing?


Edit: Also, as a follow-up question, if instead $\delta$ depended on $y$ (or equivalently $x$) then would this even imply uniform continuity, or would it just be imply local continuity?

  • $\begingroup$ For a general metric space, I think it would be ok to show it on countable covers, but otherwise I think you need the choice axiom. But since $\mathbb{R}$ is a countable union of compact spaces it can be shown $\endgroup$ Nov 9, 2023 at 0:17
  • 3
    $\begingroup$ For any $x<y$, find $x=t_0<t_1<\ldots<t_n=y$ so that $|t_{i}-t_{i-1}|<\delta$. Then apply the local Lipschitz continuity to each $[t_{i-1},t_i]$ and then combine them together. $\endgroup$ Nov 9, 2023 at 0:18
  • $\begingroup$ You could try to show that it is true for the restriction of $f$ to $[-n,n]$ for example, then you would have the result since $M$ is constant $\endgroup$ Nov 9, 2023 at 0:18
  • $\begingroup$ @julio_es_sui_glace For general metric spaces it's false, see for instance $X=\Bbb N$ with Euclidean distance, $\delta=\frac12$, $M=1$ and $f(x)=x^2$. $\endgroup$ Nov 9, 2023 at 0:26
  • 1
    $\begingroup$ Ah, I think I get it. The metric on $\mathbb{R}$ is so nice that if you choose $x < z < y$ WLOG then because $|x - y| = |x - z| + |y - z|$ exactly my Lipschitz constant doesn't blow up. Is that the idea? $\endgroup$ Nov 9, 2023 at 1:20

1 Answer 1


Commenters have already answered in the affirmative, but let me give a rigorous answer to your follow-up as well.

If $\delta$ depends on $x$, we still obtain a global Lipschitz condition. That is, as long as each $x$ has a $\delta_x$ for which $|f(x)-f(y)|\leq M|x-y|$ whenever $|x-y|<\delta_x$, then $f$ is globally $M$-Lipschitz.

To see this, let $x,y\in \mathbb R$, and define $S:=\{z\in[x,y]\mid |f(x)-f(z)|\leq M|x-z|\}$.

Let $z=\sup(S)$, with $z\in S$ since $S$ is closed by continuity of $f$.*

If $y\neq z$, then choosing $z'\in (z,y)$ with $|z'-z|<\delta_z$, we have

\begin{align*} |f(x) - f(z')| &\leq |f(x)-f(z)| + |f(z)-f(z')|\\ &\leq M|x-z|+M|z-z'|=M|x-z'|, \end{align*} so that $z'\in S$, contradicting that $z'>z=\sup(S)$.

Therefore $y=z\in S$, so the Lipschitz condition is satisfied.


Though the question was stated for $\mathbb R$, the proof immediately extends to the setting where $f\colon X\to Y$ is a map between metric spaces, and $X$ is a geodesic metric space (every two points can be joined by an isometric image of an interval). In particular, it holds whenever the domain is any convex subset of a normed vector space.


To see $S$ is closed, note that it is the inverse image of the closed set $(-\infty,0]$ under the continuous map $z\mapsto |f(x)-f(z)|-M|x-z|$, defined on $[x,y]$. If you haven't had point-set topology, you can also just observe that if $|f(x)-f(z_i)|\leq M|x-z_i|$ for a sequence $z_i\to z$, then from sequential definition of continuity, $$|f(x)-f(z)|=\lim_{i\to\infty} |f(x)-f(z_i)|\leq\lim_{i\to \infty} M|x-z_i|=M|x-z|.$$

  • $\begingroup$ I think there might be a typo in the definition of $S$ considering the condition does not involve $z$. I am assuming it instead should be the set of all $z \in [x, y]$ such that $|f(x) - f(z)| > M|z - x|$ for some $x \in [x, y]$ or something like that? $\endgroup$ Nov 9, 2023 at 7:02
  • $\begingroup$ Also, I'm not quite sure what relatively open means here or how it ties into the proof (sorry I haven't properly taken any topology), but I think I get the point of the proof is that if you have $M$-Lipschitz continuity on an open interval $I$ and $M$-Lipschitz continuity at the boundary points of $I$ (where $M$ is the same) then you can extend the open interval arbitrarily to cover the whole domain space, and the point of the infimum and contradiction argument is to formally show that you can cover the whole space, correct? $\endgroup$ Nov 9, 2023 at 7:03
  • 1
    $\begingroup$ @MathNeophyte $S$ is the inverse image of $(0,\infty)$ under the map $z\mapsto |f(x)-f(z)|-M|x-z|$. As the inverse image of an open set under a continuous map, it is open. (This is actually the most general definition of continuity, which you will learn when you take topology - it is equivalent to the usual $\epsilon$-$\delta$ definition). You could also argue $z:=\inf(S)\notin S$ using limits and the limit definition of continuity, if you want, by expressing $z$ as a limit of points $z_i<z$ satisfying $|f(x)-f(z_i)|\leq M|x-z_i|$. $\endgroup$
    – M W
    Nov 10, 2023 at 1:18
  • 1
    $\begingroup$ As for the pointwise vs local issue, I was thinking that since for any $z$ you can show $|f(x) - f(y)| \leq M|x - y|$ for all $x, y \in (z - \delta_z, z + \delta_z)$ where $x < z < y$ you could turn it into a local property easily but the issue is actually when $x$ and $y$ are on the same side of $z$ so you're right it's thornier than I thought. $\endgroup$ Nov 10, 2023 at 12:36
  • 1
    $\begingroup$ @MathNeophyte Thanks for your earlier suggested edit. In the end, I decided to reorganize just a bit (I think its a little easier to see if you define $S$ the opposite way as a closed set and take $z$ as a sup, rather than inf) and since I like to keep the main argument on the brief side to the extent possible, I put a clarification in a concluding remark to address any confusion about how we know $S$ is closed. $\endgroup$
    – M W
    Nov 10, 2023 at 20:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .