Tutorials › Real Analysis › Lipschitz Continuity

Uniform Continuity · Tutorial 365 of 1000

Lipschitz Continuity

Learn to verify Lipschitz bounds, determine optimal constants, and distinguish functions that are Lipschitz on restricted domains from those that are not Lipschitz globally.

Intermediate 9 min read

What You'll Learn

  • Define an L-Lipschitz function on an arbitrary subset of the real line
  • Find the least Lipschitz constant using ratios of output change to input distance
  • Verify sharp constants with explicit pairs of inputs
  • Use a finite input-distance bound to control the range of a Lipschitz function
  • See why a function can be Lipschitz on a separated domain but not on the whole real line

Measuring Output Change Against Input Distance

Uniform continuity asks whether sufficiently close inputs always give close outputs, using one radius across the domain. Lipschitz continuity imposes a more specific kind of control: the output distance is bounded by a fixed multiple of the input distance. This gives a direct numerical measure of how rapidly function values can change. The distinction between local behavior and a bound that works for every pair of inputs will be important throughout this module.

The domain can be any subset of \(\mathbb{R}\), not just an interval. Consequently, the same formula may be Lipschitz on one domain and fail to be Lipschitz on a larger one. We will define the condition, find the smallest constant that works when one exists, and see how a finite bound on input distances controls the range of a Lipschitz function.

Definition: Let \(E\subseteq\mathbb{R}\), and let \(f:E\to\mathbb{R}\). For a number \(L\geq0\), the function \(f\) is Lipschitz with constant \(L\) on \(E\) if $$ |f(x)-f(y)|\leq L|x-y| $$ for every \(x,y\in E\). The function is Lipschitz on \(E\) if it is Lipschitz with some finite constant \(L\geq0\).

The inequality must hold for all pairs in the domain, including pairs that are far apart. A particular function may have more than one Lipschitz constant: if the inequality holds with \(L\), it also holds with any \(L'\geq L\). The smallest possible constant, when it exists, gives the sharpest bound.

Checking Lipschitz Bounds Directly

Worked Example: An Affine Function

Let \(f(x)=5x-3\) on a set \(E\subseteq\mathbb{R}\). For any \(x,y\in E\), subtract the function values and factor:

$$ |f(x)-f(y)| =|(5x-3)-(5y-3)| =|5(x-y)| =5|x-y|. $$

Thus \(f\) is Lipschitz with constant \(5\). If \(E\) contains at least two distinct points, equality holds for every such pair, so no constant smaller than \(5\) can work. If \(E\) has zero or one point, there are no distinct pairs to test, and the least constant is instead \(0\).

Worked Example: The Square Function on a Bounded Interval

Consider \(f(x)=x^2\) on \([-1,2]\). For \(x,y\in[-1,2]\), factor the difference:

$$ |f(x)-f(y)| =|x^2-y^2| =|x-y||x+y|. $$

Since \(-1\leq x,y\leq2\), we have \(-2\leq x+y\leq4\), and therefore \(|x+y|\leq4\). It follows that

$$ |f(x)-f(y)|\leq4|x-y|. $$

So \(4\) is a Lipschitz constant. To see that it is the smallest one, take \(x=2\) and \(y=2-h\), where \(0<h<1\). Both points belong to \([-1,2]\), and

$$ \frac{|f(2)-f(2-h)|}{|2-(2-h)|} =\frac{4-(2-h)^2}{h} =\frac{4-(4-4h+h^2)}{h} =4-h. $$

For any proposed constant \(C<4\), we can choose \(h\) with \(0<h<1\) and \(h<4-C\). Then \(4-h>C\), so the pair \(2,2-h\) violates the Lipschitz inequality with constant \(C\). Hence the least Lipschitz constant is \(4\).

The Least Constant and Secant Slopes

For two distinct inputs, the ratio of output distance to input distance measures the change in output per unit of input distance. These ratios are sometimes called secant slopes in absolute value. The following result identifies their supremum as the least Lipschitz constant.

Theorem (Least Lipschitz Constant): Let \(E\subseteq\mathbb{R}\) contain at least two points, and let \(f:E\to\mathbb{R}\). Define $$ S=\sup_{\substack{x,y\in E\\x\ne y}}\frac{|f(x)-f(y)|}{|x-y|}, $$ where \(S\) is allowed to be \(+\infty\). Then \(f\) is Lipschitz on \(E\) if and only if \(S<\infty\). When \(S<\infty\), \(S\) itself is the least Lipschitz constant.

Proof. First suppose \(S<\infty\). By the definition of supremum, for every distinct \(x,y\in E\),

$$ \frac{|f(x)-f(y)|}{|x-y|}\leq S. $$

Since \(|x-y|>0\), multiplication by \(|x-y|\) gives \(|f(x)-f(y)|\leq S|x-y|\). If \(x=y\), both sides of this inequality are zero, so it holds for that pair as well. Thus \(f\) is Lipschitz with constant \(S\).

Now suppose \(f\) is Lipschitz with some constant \(L\geq0\). For every distinct \(x,y\in E\), its defining inequality gives

$$ \frac{|f(x)-f(y)|}{|x-y|}\leq L. $$

Therefore \(L\) is an upper bound for all the ratios, and \(S\leq L\). In particular, \(S\) is finite. This argument also shows that every Lipschitz constant is at least \(S\). Since \(S\) itself is a Lipschitz constant, it is the least one. \(\square\)

If \(E\) has exactly one point, the displayed supremum has no ratios to consider. In that case every function on \(E\) is Lipschitz with constant \(0\), because the only pair has identical inputs and identical outputs. This small case is why the theorem states its hypothesis that \(E\) contain at least two points.

Worked Example: A Function on Two Separated Pieces

Let \(E=(-\infty,-1]\cup[1,\infty)\), and define \(f(x)=0\) for \(x\leq-1\) and \(f(x)=1\) for \(x\geq1\). If two inputs lie in the same piece, their function values agree, so their output distance is zero. If \(x\leq-1\) and \(y\geq1\), then

$$ |f(x)-f(y)|=1 \qquad\text{and}\qquad |x-y|=y-x\geq2. $$

Thus for every pair in different pieces,

$$ |f(x)-f(y)|=1\leq\frac{1}{2}|x-y|. $$

The function is Lipschitz on \(E\) with constant \(1/2\). This constant is sharp: the pair \(x=-1\), \(y=1\) has output distance \(1\) and input distance \(2\), so the ratio is \(1/2\). The gap in the domain matters. The function changes from \(0\) to \(1\), but no pair of inputs from opposite pieces is closer than \(2\).

Finite Input Distances Bound the Range

The Lipschitz inequality can also control all the values of a function relative to one chosen input. This is useful when the domain has bounded diameter: if no two inputs are very far apart, then a Lipschitz function cannot have arbitrarily large output differences.

Theorem (Range Bound from Input Distances): Let \(E\subseteq\mathbb{R}\) be nonempty, and suppose \(f:E\to\mathbb{R}\) is Lipschitz with constant \(L\geq0\). If \(D\geq0\) satisfies \(|x-y|\leq D\) for all \(x,y\in E\), then $$ |f(x)-f(y)|\leq LD $$ for every \(x,y\in E\). In particular, \(f\) is bounded on \(E\).

Proof. Fix \(x,y\in E\). The assumed bound on input distances and the Lipschitz inequality give

$$ |f(x)-f(y)|\leq L|x-y|\leq LD. $$

This proves the claimed pairwise output bound. To show that \(f\) is bounded, choose one point \(a\in E\), which is possible because \(E\) is nonempty. For every \(x\in E\), apply the pairwise bound with \(y=a\):

$$ |f(x)-f(a)|\leq LD. $$

The triangle inequality now gives

$$ |f(x)|\leq |f(a)|+|f(x)-f(a)| \leq |f(a)|+LD. $$

The right-hand side is a finite number independent of \(x\), so \(f\) is bounded on \(E\). This also covers \(L=0\) or \(D=0\): in either case the estimates remain valid. \(\square\)

Worked Example: Bounding Values on a Finite-Diameter Domain

Suppose \(E\subseteq[-2,3]\), and \(f:E\to\mathbb{R}\) is Lipschitz with constant \(4\). For any \(x,y\in E\), the interval containing \(E\) gives \(|x-y|\leq5\). The theorem therefore yields

$$ |f(x)-f(y)|\leq4\cdot5=20. $$

If \(E\) is nonempty, choose \(a\in E\). Then every \(x\in E\) satisfies

$$ |f(x)|\leq |f(a)|+|f(x)-f(a)| \leq |f(a)|+20. $$

Thus the function is bounded, even if \(E\) is not closed and does not contain either endpoint of \([-2,3]\). The bound depends on the value at the chosen point \(a\), but it is uniform over all \(x\in E\).

Why the Domain Must Be Part of the Claim

A formula alone does not determine whether a function is Lipschitz; the domain matters. The square function from the earlier example has a finite Lipschitz constant on \([-1,2]\), but it has no finite Lipschitz constant on all of \(\mathbb{R}\). Indeed, for each positive integer \(n\), take \(x=n+1\) and \(y=n\). Then

$$ \frac{|x^2-y^2|}{|x-y|} =\frac{(n+1)^2-n^2}{1} =\frac{n^2+2n+1-n^2}{1} =2n+1. $$

These ratios grow without bound as \(n\) increases. By the Least Lipschitz Constant Theorem, no finite Lipschitz constant can work on all of \(\mathbb{R}\). This does not conflict with the bounded-interval calculation: restricting the inputs restricts which pairs, and hence which ratios, must be controlled.

A reliable test is to examine the quotient \(|f(x)-f(y)|/|x-y|\) for distinct inputs. A bound on this quotient across the entire domain proves Lipschitz continuity; a sequence of pairs for which the quotient grows without bound disproves it. When estimating a constant, keep track of whether the estimate is merely sufficient or actually sharp. The supremum of all such quotients gives the exact answer whenever it is finite.

Check Your Understanding

Use the definition, the secant-ratio characterization, and the examples above to answer the following questions.

  1. Why does a Lipschitz constant have to work for pairs of inputs that are far apart as well as close together?
  2. For the affine function in the first worked example, why is \(5\) sharp when the domain contains two distinct points?
  3. What does the supremum of the secant ratios tell us when it is finite?
  4. Why is the function on \((-\infty,-1]\cup[1,\infty)\) Lipschitz even though its values differ between the two pieces?
  5. How does a finite bound on all input distances lead to boundedness of a Lipschitz function?
  6. Which pairs show that the square function cannot have a finite Lipschitz constant on all of \(\mathbb{R}\)?