# Lipschitz continuity

In mathematical analysis, Lipschitz continuity, named after German mathematician Rudolf Lipschitz, is a strong form of uniform continuity for functions. Intuitively, a Lipschitz continuous function is limited in how fast it can change: there exists a real number such that, for every pair of points on the graph of this function, the absolute value of the slope of the line connecting them is not greater than this real number; the smallest such bound is called the Lipschitz constant of the function (and is related to the modulus of uniform continuity). For instance, every function that is defined on an interval and has a bounded first derivative is Lipschitz continuous.
In the theory of differential equations, Lipschitz continuity is the central condition of the Picard–Lindelöf theorem which guarantees the existence and uniqueness of the solution to an initial value problem. A special type of Lipschitz continuity, called contraction, is used in the Banach fixed-point theorem.
We have the following chain of strict inclusions for functions over a closed and bounded non-trivial interval of the real line:
    Continuously differentiable ⊂ Lipschitz continuous ⊂ $\alpha$-Hölder continuous,
where $0<\alpha \leq 1$. We also have
    Lipschitz continuous ⊂ absolutely continuous ⊂ uniformly continuous = continuous.

## Definitions

Given two metric spaces (X, d$_X$) and (Y, d$_Y$), where d$_X$ denotes the metric on the set X and d$_Y$ is the metric on set Y, a function f : X → Y is called Lipschitz continuous if there exists a real constant K ≥ 0 such that, for all x$_1$ and x$_2$ in X,
    $d_{Y}(f(x_{1}),f(x_{2}))\leq Kd_{X}(x_{1},x_{2}).$
Any such K is referred to as a Lipschitz constant for the function f and f may also be referred to as K-Lipschitz. The smallest constant is sometimes called the (best) Lipschitz constant of f or the dilation or dilatation$^{:p.9,Definition1.4.1}$ of f. If K = 1 the function is called a short map, and if 0 ≤ K < 1 and f maps a metric space to itself, the function is called a contraction.
In particular, a real-valued function f : R → R is called Lipschitz continuous if there exists a positive real constant K such that, for all real x$_1$ and x$_2$,
    $|f(x_{1})-f(x_{2})|\leq K|x_{1}-x_{2}|.$
In this case, Y is the set of real numbers R with the standard metric d$_Y$(y$_1$, y$_2$) = |y$_1$ − y$_2$|, and X is a subset of R.
In general, the inequality is (trivially) satisfied if x$_1$ = x$_2$. Otherwise, one can equivalently define a function to be Lipschitz continuous if and only if there exists a constant K ≥ 0 such that, for all x$_1$ ≠ x$_2$,
    ${\frac {d_{Y}(f(x_{1}),f(x_{2}))}{d_{X}(x_{1},x_{2})}}\leq K.$
For real-valued functions of several real variables, this holds if and only if the absolute value of the slopes of all secant lines are bounded by K. The set of lines of slope K passing through a point on the graph of the function forms a circular cone, and a function is Lipschitz if and only if the graph of the function everywhere lies completely outside of this cone (see figure).
A function is called locally Lipschitz continuous if for every x in X there exists a neighborhood U of x such that f restricted to U is Lipschitz continuous. Equivalently, if X is a locally compact metric space, then f is locally Lipschitz if and only if it is Lipschitz continuous on every compact subset of X. In spaces that are not locally compact, this is a necessary but not a sufficient condition.
More generally, a function f defined on X is said to be Hölder continuous or to satisfy a Hölder condition of order α > 0 on X if there exists a constant M ≥ 0 such that
    $d_{Y}(f(x),f(y))\leq Md_{X}(x,y)^{\alpha }$
for all x and y in X. Sometimes a Hölder condition of order α is also called a uniform Lipschitz condition of order α > 0.
For a real number K ≥ 1, if
    ${\frac {1}{K}}d_{X}(x_{1},x_{2})\leq d_{Y}(f(x_{1}),f(x_{2}))\leq Kd_{X}(x_{1},x_{2})\quad {\text{ for all }}x_{1},x_{2}\in X,$
then f is called K-bilipschitz (also written K-bi-Lipschitz). We say f is bilipschitz or bi-Lipschitz to mean there exists such a K. A bilipschitz mapping is injective, and is in fact a homeomorphism onto its image. A bilipschitz function is the same thing as an injective Lipschitz function whose inverse function is also Lipschitz.

## Examples
### Lipschitz continuous functions that are everywhere differentiable

    The function $f(x)={\sqrt {x^{2}+5}}$ defined for all real numbers is Lipschitz continuous with the Lipschitz constant K = 1, because it is everywhere differentiable and the absolute value of the derivative is bounded above by 1. See the first property listed below under "Properties".Likewise, the sine function is Lipschitz continuous because its derivative, the cosine function, is bounded above by 1 in absolute value.

### Lipschitz continuous functions that are not everywhere differentiable

    The function $f(x)=|x|$ defined on the reals is Lipschitz continuous with the Lipschitz constant equal to 1, by the reverse triangle inequality. More generally, a norm on a vector space is Lipschitz continuous with respect to the associated metric, with the Lipschitz constant equal to 1.

### Lipschitz continuous functions that are everywhere differentiable but not continuously differentiable

    The function $f(x)\;=\;{\begin{cases}x^{2}\sin(1/x)&{\text{if }}x\neq 0\\0&{\text{if }}x=0\end{cases}}$, whose derivative exists but has an essential discontinuity at $x=0$.

### Continuous functions that are not (globally) Lipschitz continuous

    The function f(x) = √x defined on [0, 1] is not Lipschitz continuous. This function becomes infinitely steep as x approaches 0 since its derivative becomes infinite. However, it is uniformly continuous, and both Hölder continuous of class C$^{0,α}$ for α ≤ 1/2 and also absolutely continuous on [0, 1] (both of which imply the former).

### Differentiable functions that are not (locally) Lipschitz continuous

    The function f defined by f(0) = 0 and f(x) = x$^{3/2}$sin(1/x) for 0<x≤1 gives an example of a function that is differentiable on a compact set while not locally Lipschitz because its derivative function is not bounded. See also the first property below.

### Analytic functions that are not (globally) Lipschitz continuous

    The exponential function becomes arbitrarily steep as x → ∞, and therefore is not globally Lipschitz continuous, despite being an analytic function.The function f(x) = x$^2$ with domain all real numbers is not Lipschitz continuous. This function becomes arbitrarily steep as x approaches infinity. It is however locally Lipschitz continuous.

## Properties

* An everywhere differentiable function g : R → R is Lipschitz continuous (with K = sup |g′(x)|) if and only if it has a bounded first derivative; one direction follows from the mean value theorem. In particular, any continuously differentiable function is locally Lipschitz, as continuous functions are locally bounded so its gradient is locally bounded as well.
* A Lipschitz function g : R → R is absolutely continuous and therefore is differentiable almost everywhere, that is, differentiable at every point outside a set of Lebesgue measure zero. Its derivative is essentially bounded in magnitude by the Lipschitz constant, and for a < b, the difference g(b) − g(a) is equal to the integral of the derivative g′ on the interval [a, b].
** Conversely, if f : I → R is absolutely continuous and thus differentiable almost everywhere, and satisfies |f′(x)| ≤ K for almost all x in I, then f is Lipschitz continuous with Lipschitz constant at most K.
** More generally, Rademacher's theorem extends the differentiability result to Lipschitz mappings between Euclidean spaces: a Lipschitz map f : U → R$^m$, where U is an open set in R$^n$, is almost everywhere differentiable. Moreover, if K is the best Lipschitz constant of f, then $\|Df(x)\|\leq K$ whenever the total derivative Df exists.
* For a differentiable Lipschitz map $f:U\to \mathbb {R} ^{m}$ the inequality $\|Df\|_{W^{1,\infty }(U)}\leq K$ holds for the best Lipschitz constant $K$ of $f$. If the domain $U$ is convex then in fact $\|Df\|_{W^{1,\infty }(U)}=K$.
* Suppose that {f$_n$} is a sequence of Lipschitz continuous mappings between two metric spaces, and that all f$_n$ have Lipschitz constant bounded by some K. If f$_n$ converges to a mapping f uniformly, then f is also Lipschitz, with Lipschitz constant bounded by the same K. In particular, this implies that the set of real-valued functions on a compact metric space with a particular bound for the Lipschitz constant is a closed and convex subset of the Banach space of continuous functions. This result does not hold for sequences in which the functions may have unbounded Lipschitz constants, however. In fact, the space of all Lipschitz functions on a compact metric space is a subalgebra of the Banach space of continuous functions, and thus dense in it, an elementary consequence of the Stone–Weierstrass theorem (or as a consequence of Weierstrass approximation theorem, because every polynomial is locally Lipschitz continuous).
* Every Lipschitz continuous map is uniformly continuous, and hence continuous. More generally, a set of functions with bounded Lipschitz constant forms an equicontinuous set. The Arzelà–Ascoli theorem implies that if {f$_n$} is a uniformly bounded sequence of functions with bounded Lipschitz constant, then it has a convergent subsequence. By the result of the previous paragraph, the limit function is also Lipschitz, with the same bound for the Lipschitz constant. In particular the set of all real-valued Lipschitz functions on a compact metric space X having Lipschitz constant ≤ K  is a locally compact convex subset of the Banach space C(X).
* For a family of Lipschitz continuous functions f$_α$ with common constant, the function $\sup _{\alpha }f_{\alpha }$ (and $\inf _{\alpha }f_{\alpha }$) is Lipschitz continuous as well, with the same Lipschitz constant, provided it assumes a finite value at least at a point.
* If U is a subset of the metric space M and f : U → R is a Lipschitz continuous function, there always exist Lipschitz continuous maps M → R that extend f and have the same Lipschitz constant as f (see also Kirszbraun theorem). An extension is provided by
       ${\tilde {f}}(x):=\inf _{u\in U}\{f(u)+k\,d(x,u)\},$
    where k is a Lipschitz constant for f on U.

## Lipschitz manifolds

A Lipschitz structure on a topological manifold is defined using an atlas of charts whose transition maps are bilipschitz; this is possible because bilipschitz maps form a pseudogroup. Such a structure allows one to define locally Lipschitz maps between such manifolds, similarly to how one defines smooth maps between smooth manifolds: if M and N are Lipschitz manifolds, then a function $f:M\to N$ is locally Lipschitz if and only if for every pair of coordinate charts $\phi :U\to M$ and $\psi :V\to N$, where U and V are open sets in the corresponding Euclidean spaces, the composition $\psi ^{-1}\circ f\circ \phi :U\cap (f\circ \phi )^{-1}(\psi (V))\to V$ is locally Lipschitz. This definition does not rely on defining a metric on M or N.
This structure is intermediate between that of a piecewise-linear manifold and a topological manifold: a PL structure gives rise to a unique Lipschitz structure. While Lipschitz manifolds are closely related to topological manifolds, Rademacher's theorem allows one to do analysis, yielding various applications.

## One-sided Lipschitz

Let F(x) be an upper semi-continuous function of x, and that F(x) is a closed, convex set for all x. Then F is one-sided Lipschitz if
    $(x_{1}-x_{2})^{T}(F(x_{1})-F(x_{2}))\leq C\Vert x_{1}-x_{2}\Vert ^{2}$
for some C and for all x$_1$ and x$_2$.
It is possible that the function F could have a very large Lipschitz constant but a moderately sized, or even negative, one-sided Lipschitz constant. For example, the function
    ${\begin{cases}F:\mathbf {R} ^{2}\to \mathbf {R} ,\\F(x,y)=-50(y-\cos(x))\end{cases}}$
has Lipschitz constant K = 50 and a one-sided Lipschitz constant C = 0. An example which is one-sided Lipschitz but not Lipschitz continuous is F(x) = e$^{−x}$, with C = 0.