Preparation
We assume gradients, Hessians, the multivariable chain rule, eigenvalues of symmetric matrices and one-variable Taylor’s theorem. Review multivariable Taylor polynomials before the finite-step analysis.
Why the negative gradient is locally downhill
Assume is differentiable at . For a unit direction , . By Cauchy–Schwarz this is at least , with equality for when the gradient is nonzero. Thus the negative gradient is the direction of steepest first-order decrease in the chosen Euclidean coordinates.
The coordinate metric matters: changing the scales of inputs changes which direction has unit length. A gradient direction in dollars and rate proportions has no invariant physical meaning until scaling is chosen.
Gradient descent uses
Its directional derivative at a nonstationary point is negative, but an arbitrary finite step can overshoot and increase the objective. A step-size condition requires curvature information.
Deriving a finite-step descent bound
Assume is on an open set containing the entire relevant segment, and the gradient is Lipschitz there with constant : for . A zero Lipschitz constant may be replaced by any positive upper bound. By the line-integral form of the one-variable fundamental theorem,
Subtract , use Cauchy–Schwarz and integrate to obtain the descent lemma
For ,
Hence guarantees strict decrease at a nonstationary point when the assumptions hold throughout the step. A local curvature bound must not be used to justify a step that leaves the region where that bound is valid.
Worked example: safe and unsafe steps. For , gradient is and globally. With constant ,
Starting at , the first iterate is with objective , compared with initial value five. The next is with objective . With , the second-coordinate multiplier is ; that component grows in magnitude even though the initial direction is downhill.
Exact convergence for positive-definite quadratics
Let with symmetric positive-definite , and use a fixed constant step size . Its unique minimizer is . Writing error gives
Use an orthonormal eigenbasis of . Each error coordinate is multiplied by . Thus every initial point converges to exactly when for all eigenvalues, namely
At the upper endpoint, a largest-eigenvalue component can oscillate without decaying. Below the range, a zero or negative step need not decrease; above it, some component grows. The conditioning ratio also explains slow convergence when one coordinate direction is much flatter than another.
For this quadratic, . A gradient-norm stopping rule therefore yields a distance bound only when a positive lower eigenvalue bound is known. Small steps caused by choosing a tiny do not themselves establish closeness to the minimizer.
Constraints and stopping statements
An unconstrained step can leave a feasible set. For example, a nonnegative-weight constraint is not automatically preserved by subtracting a gradient. Equality constraints may require projected directions, substitution or a separate constrained algorithm. The Lagrange multiplier condition for an equality constraint and the unconstrained gradient descent formula answer different questions.
A useful numerical report states the objective, starting point, coordinate scaling, step rule, stopping criterion, and any error or decrease bound actually justified. “The code stopped” is not a mathematical convergence certificate, and a nonconvex stationary point may be a saddle rather than a desired minimum.
Exercises
P01. Find the gradient descent update for .
P02. For , show one step with from increases the objective.
P03. For , determine every constant step size yielding convergence from all starting points.
P04. For the same objective, take from and calculate the first two iterates and objective values.
P05. For with , if , bound distance to the quadratic's minimizer.
P06. Derive the finite-step descent lemma directly for a symmetric positive-definite quadratic and compare its curvature bound with the largest eigenvalue.
P07. Explain why a step parallel to the negative gradient does not necessarily preserve the constraint . At with gradient , derive the condition under which that particular step preserves the sum.
Full solutions
P01. Gradient is , so for constant step.
P02. Gradient at is . The step gives , changing the objective from one to nine. A downhill infinitesimal direction did not protect an oversized finite step.
P03. Eigenvalues are one and four, so convergence from all initial points requires .
P04. Update multipliers are and zero. Iterates are then . Objective values are and , respectively, below initial value four.
P05. The minimum eigenvalue is two, so distance is at most .
P06. The exact difference is . Since , the descent lemma holds with . Substituting gives the same sufficient decrease bound; the eigen-coordinate recurrence gives the exact all-starting-point convergence range.
P07. The new sum is . For a positive step it stays one exactly when . A general gradient need not satisfy that tangent-direction condition.
Summary
The negative gradient is steepest only for a chosen metric and at first order. Lipschitz curvature gives a finite-step decrease bound; symmetric eigenvalues give an exact convergence test for positive-definite quadratics. Constraints and stopping certificates require separate checks.
Further study
Concept lensAlgebraic
The step 1/L minimizes the descent lemma's upper model
The descent lemma above bounds by the quadratic model . Completing the square,
so the model is smallest at , a gradient step with , and its guaranteed value there is . The same conclusion appears in the decrease factor , a downward parabola in with roots and and maximum at . Gradient descent with this step is therefore the method that repeatedly minimizes the simplest upper bound the Lipschitz hypothesis provides.
Worked example 16.1.1
(The best fixed step for the earlier quadratic)
For , the Hessian has eigenvalues and , and each error coordinate is multiplied by . The worst factor is smallest when the two are balanced, , that is
From the iterates are , then : both coordinates shrink by in magnitude at every step, the second with alternating sign. The step of the earlier worked example has worst factor , so it is slower in the long run, even though its first step happens to decrease the objective more. With , the best factor is , close to when the problem is badly conditioned.
Worked example 16.1.2
(A quadratic with coupled coordinates)
Let with . Its eigenvalues are , with eigenvector , and , with eigenvector , so a fixed step converges from every start exactly when . Take ; the multipliers are and . From , the first component is removed in one step and the second is halved:
The update formula confirms this: , so , and , so . The objective values are , and . The eigenbasis, not the coordinate axes, is where the iteration acts by independent scalings.
Worked example 16.1.3
(A guaranteed decrease for a non-quadratic objective)
Let . With , we have and Hessian , whose entries lie in . By the line-integral argument above, everywhere, so works on all of . With the bound reads .
At , , the step gives , and
The guaranteed upper bound is , and the actual value is below it. The lemma needed only a curvature bound, not a formula for the minimizer.
Counterexample mode
Steady decrease without a minimizer
Strict decrease at every step and a gradient tending to zero do not imply convergence to a minimizer. Let on with fixed step , so . Every step moves left, and is increasing, so for every ; on the derivative is even Lipschitz with constant , so the hypotheses of the descent lemma hold along the whole path when . If the decreasing sequence were bounded below by some , every step would have length at least , which is impossible for a bounded monotone sequence; so , and . Yet has no minimizer: its infimum is not attained. This is the failure the stopping discussion above warns about. A distance bound from a small gradient needs a positive lower curvature bound, which here fails because .
Quick check
(For , find the fixed step that minimizes the worst error factor, and that factor.)
Balance the two factors for and .
Solution · Answer
The eigenvalues are and . Setting gives , and both factors then have absolute value . Any other step makes one of and larger than .
Quick check
(For , take one gradient step with from , and compare the new value with the descent-lemma bound.)
Compute from the Hessian, then evaluate both the step and the bound .
Solution · Answer
and , so and . At , , so the step gives . The values are and . The bound is , and indeed . The minimizer is with value .
Quick check
(A positive-definite quadratic has and , and the step is . How many steps does it take for the slowest error component to shrink by a factor of ?)
The slowest component is multiplied by at each step.
Solution · Answer
The step is allowed, since . The slowest factor is , so we need , that is . Thus steps are required; indeed and . The fast component, with factor , disappears after one step.