Level set
|
In mathematics, a level set of a real-valued function f of n variables is a set of the form
- { (x1,...,xn) | f(x1,...,xn) = c }
where c is a constant. That is, it is the set where the function takes on a given constant value. When the number of variables is two, this is a level curve (contour line), if it is three this is a level surface, and for higher values of n the level set is a level hypersurface.
Level sets versus the gradient
Level_grad.png
Theorem. The gradient of f at a point is perpendicular to the level set of f at that point.
This theorem is quite remarkable. To understand what it means, imagine that two hikers are at the same location on a mountain. One of them is bold, and decides to go in the direction where the slope is steepest. The other one is more cautious; he does not want to either climb or descend, choosing a path which will keep him at the same height. In our analogy, the above theorem says that the two hikers will depart in directions perpendicular to one another.
Proof. Let x0 be the point of interest. The level set going through x0 is {x | f(x) = f(x0)}. Consider a curve x(t) in the level set going through x0, so we will assume that x(0)=x0. We have
- f(x(t)) = f(x0) = c.
Now let us differentiate at t=0 by using the chain rule. We find
- <math>J_f({\mathbf x_0}) {\mathbf x}'(0)=0.<math>
Equivalently, the Jacobian of f at x0 is the gradient at x0
- <math>\nabla f({\mathbf x}_0) \cdot {\mathbf x}'(0)=0.<math>
Thus, the gradient of f at x0 is perpendicular to the tangent x′(0) to the curve (and to the level set) at that point. Since the curve x(t) is arbitrary, it follows that the gradient is perpendicular to the level set. Q.E.D.
A consequence of this theorem is that if a level set crosses itself (more precisely, fails to be a smooth submanifold or hypersurface) then the gradient vector must be zero at all points of crossing. Then, every point in the crossing will be a critical point of f.