TL;DR
A function is Lipschitz when there is one number that caps how steep it ever gets. For any two inputs, the change in the output is at most times the distance between the inputs. Continuity says small input changes give small output changes; Lipschitz says exactly how small.
This sharper promise is what lets you bound errors, prove that iterative methods converge, and guarantee that an equation has one solution.
Where you'll see it: in the step-size rule of gradient descent, in the proof that an ODE has a unique solution, and in the stability bounds used to check neural networks against small adversarial changes.
Intuition
A hiking trail with a maximum grade
Picture a mountain trail that the trail builders promise never rises more steeply than 10 percent. Walk 100 metres along it and your height changes by at most 10 metres. You do not need to know the shape of the trail; the promise alone bounds your height change. The number 0.10 is the Lipschitz constant of the trail's height as a function of distance walked.
Continuity alone would only say that the trail has no jumps. A continuous trail could be gentle everywhere, or it could contain a cliff that is steep but still unbroken. A Lipschitz trail rules out the cliff, and the rule is quantitative: you can compute the worst case in advance.
That quantitative promise is the reason the idea exists. Many proofs and algorithms need to say "if the input is off by this much, the output is off by at most that much", and continuity cannot supply a usable number.
- f(x) = x²
- slope +4
- slope -4
The math
Let and let . The function is -Lipschitz on for a number , called a Lipschitz constant, if
Here is the Euclidean norm (see Vector Norm) on both sides.
In words: the output distance never exceeds times the input distance. The smallest valid is the best Lipschitz constant of on . A function can be Lipschitz on one set and not on a larger one, so always state the set.
Lipschitz implies continuous
Suppose is -Lipschitz with . Given any tolerance , pick .
- If , then .
- Since , we get .
- So .
The depends only on , not on the point. That is stronger than ordinary Continuity, which lets depend on the point too. It is called uniform continuity.
The converse fails. The square root on is continuous but not Lipschitz, as the worked examples show.
Derivatives bound the constant
Let be differentiable on an interval with there. Take in .
- By the mean value theorem, there is a point between and with .
- Take absolute values: .
- Since , we get .
So a bounded Derivative gives a Lipschitz function, with . The multivariable version replaces the mean value theorem with the fundamental theorem of calculus along the segment from to . If is convex and everywhere on , then is -Lipschitz. The same argument with a Cauchy–Schwarz step gives the bound, and it is the form used when a Gradient is bounded.
The reverse is not true. The function is 1-Lipschitz but has no derivative at .
Combining Lipschitz functions
Two rules do most of the work in applications.
- Sums. If is -Lipschitz and is -Lipschitz, then is -Lipschitz. The triangle inequality gives .
- Composition. is -Lipschitz, because .
Composition is why the constant of a deep network can be estimated layer by layer. The product of the layer constants is an upper bound, often a loose one.
The contraction case
If , the map is a contraction: each application pulls points closer together. The Banach fixed-point theorem says that a contraction on a complete set (one that contains the limits of its convergent sequences, such as a closed subset of ) has exactly one fixed point, and repeated application converges to it from any start. This is the engine behind many iterative solvers.
Worked examples
Let on .
- For any and , .
- So .
- The ratio is exactly for every pair, so , and no smaller value works.
Interpretation: for a line, the slope is the best Lipschitz constant.
Let . Use the identity .
- On all of , take and let grow. The ratio is unbounded, so is not Lipschitz on .
- On , we have , so . Thus is -Lipschitz there.
- The constant is the best one. Take and for small : the ratio is , which approaches as .
Interpretation: a parabola gets steeper as you move out, so its Lipschitz constant depends on the interval you choose.
Let on . The reverse triangle inequality gives , so is -Lipschitz.
Check with numbers. Take and .
- and , so the output difference is .
- , so .
- The ratio is , as the rule predicts.
Interpretation: taking a length never stretches distances between vectors.
Let on . It is continuous, including at .
- Take . The ratio is .
- At the ratio is . At it is .
- The ratio is unbounded as approaches , so no finite works.
Interpretation: the square root has a vertical tangent at , which is exactly what Lipschitz forbids.
Tradeoffs and failure modes
Lipschitz is a strong, quantitative promise. Its strength is also its cost: the constant must be known or bounded, and a bad bound makes every guarantee weak.
| Situation | What goes wrong | Better choice |
|---|---|---|
| You only need "small input gives small output" | Lipschitz adds an assumption you may not have | Plain continuity is enough |
| The function has a corner, a cusp or a jump | The ratio is unbounded, so no exists | Use a weaker condition such as Hölder continuity, or split the domain |
| is large or unknown | Step sizes and error bounds become tiny and slow | Estimate locally, or use adaptive methods |
| A deep network's constant is a product of layer constants | The product is an upper bound and often far too large | Normalise the weight matrices, or report the bound as conservative |
| Searching for a global minimum in many dimensions | Branch-and-bound cost grows quickly with dimension | Compare with the methods in Global Optimization |
A common mistake is to assume a function is Lipschitz because it is smooth on a small region. Smoothness on a region does not bound the slope on a larger one. Always state the set on which the constant holds.
History
Rudolf Lipschitz, a German mathematician, introduced the condition in the 1870s while studying differential equations. The problem he was solving was whether an equation has a solution, and whether that solution is unique. The condition on in turned out to be exactly what the successive-approximation method needs. Later work by Émile Picard, Ernst Lindelöf and others built the existence and uniqueness theorem on it, and the name "Lipschitz" stuck.
In the early 1920s Stefan Banach proved the fixed-point theorem for contractions, which made the condition a central tool in analysis and then in numerical methods. The idea has stayed useful because it gives a number, not just a qualitative promise, and a number can be used in proofs and algorithms.
Check yourself
QuestionIn your own words, what does it mean for f to be L-Lipschitz?Show answer
For any two inputs, the distance between the outputs is at most times the distance between the inputs. The ratio of output change to input change never exceeds . Equivalently, the function never gets steeper than slope anywhere in its domain.
QuestionFind the best Lipschitz constant of f(x) = x³ on [−1, 1].Show answer
Use , so the ratio is . On this is largest when , where it equals . Smaller values of and give smaller values, so the best constant is . The derivative check agrees: has maximum absolute value on .
QuestionWhy does Lipschitz continuity imply continuity, but not the other way round?Show answer
Lipschitz gives a bound . Choosing makes the output gap smaller than whenever the input gap is smaller than , which is the definition of continuity. The converse fails because continuity allows the slope to be unbounded near a point, as the square root at shows. Continuity only needs the output gap to shrink eventually, not to shrink at a linear rate.
QuestionA model is 4-Lipschitz in the Euclidean norm. Two inputs differ by 0.01 in norm. What is the largest possible change in output?Show answer
The bound is . No pair of inputs at that distance can produce a larger output difference. The bound is worst case, so the actual change is often smaller.