Newton and quasi-Newton methods
Use local curvature to choose a direction, and identify when damping or curvature approximations are necessary.
On this page
The question for today
What you’ll understand
- Derive a Newton direction by minimizing a quadratic local model.
- Check whether a Hessian produces a descent direction.
- Explain what a secant update learns and what it cannot guarantee.
Gradient descent measures steepness but treats every coordinate with the same ruler. Newton's method asks how the gradient itself changes and rescales the proposed movement using curvature. This can remove the slow zigzag caused by differently scaled directions. It also introduces new costs and failure modes: solving a linear system may be expensive, local curvature may be indefinite, and a full step may trust a local approximation too far.
Solve the model, not an explicit inverse
Expand a twice differentiable objective to second order around the current point. If the Hessian is positive definite, the quadratic model has a unique minimizer in its displacement variable. Setting that model's derivative to zero yields a linear system for the Newton direction. Implementations usually solve this system through a factorization or iterative method; explicitly forming a matrix inverse is unnecessary and can waste work or lose numerical accuracy.
The positive-definiteness assumption is substantive. It guarantees that the gradient's inner product with the Newton direction is negative whenever the gradient is nonzero. An indefinite Hessian can instead point toward increasing objective values, or produce a direction toward a saddle. Regularizing the Hessian, solving a trust-region subproblem, or falling back to a descent direction are ways to handle this situation; none should be silently called an unmodified Newton step.
Local speed needs a local neighborhood
Near a minimizer with nonsingular positive-definite Hessian, a locally Lipschitz Hessian gives quadratic convergence of full Newton steps when the starting point is sufficiently close. Roughly, the next error is bounded by a constant times the square of the current error. This local statement does not promise convergence from every initialization. Far away, damping through line search or a trust region limits how much of the local quadratic model is trusted.
Newton's direction is also sensitive to how accurately the linear system is solved. In large models, Hessian-vector products can avoid storing the full matrix, but the resulting method needs an explicit linear-solve tolerance. A loose solve may be adequate far from the solution; tighter solves can become necessary for fast local convergence. Computational cost should therefore be compared in gradient evaluations, curvature operations, storage, and elapsed time rather than iteration count alone.
Learn curvature from successive gradients
Quasi-Newton methods replace the exact Hessian by a matrix updated from observed displacements and gradient changes. With and , a Hessian approximation can enforce the secant relation . This is one vector equation, not full knowledge of the true Hessian. BFGS chooses a structured update, and its usual positive-definiteness preservation requires a positive curvature pair and a positive-definite starting approximation.
Limited-memory variants retain a small history of curvature pairs instead of a dense matrix. They reduce storage but still require sensible line-search rules and numerical safeguards. The lab remains ordinary gradient descent on the unit quadratic: compare its several-step path with the hand-derived Newton step below. It does not compute Hessians, solve Newton systems, update BFGS matrices, or demonstrate the local convergence rate of a general nonlinear Newton iteration.
Work it through
Rescale a narrow quadratic exactly
For at , compute one full Newton step and compare its value with a gradient step of size .
The gradient is and the Hessian is . Solve and to get the Newton direction . The initial objective is .
The full Newton update reaches and value zero. This is exact because the local quadratic model is the entire objective, so there is no neglected higher-order remainder.
A gradient step of size instead gives , with value . The flat coordinate survives because the shared step was chosen for the steep curvature.
Newton removes both quadratic error components in one exact solve. This one-step outcome is special to a nonsingular quadratic, not a general nonlinear guarantee.
The living notebook
Explore the model
Interactive lab · optimization
Compare the gradient baseline with a Newton calculation
Set η=0.5 and x₀=4, then count gradient steps needed to halve the error twice on x²/2. Compare with the exact Newton displacement −x calculated in the lesson. This interactive model performs gradient descent only; it is not a Newton or BFGS simulator.
- Position x0
- 2
- Objective x²/2
- 2
- Iteration behavior
- Stable step
Gradient descent on f(x) = x²/2: xₙ = (1 − η)ⁿx₀. Playback advances two discrete iterations per second. Values outside |x| ≤ 4 are explicitly reported. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA curvature-aware calculation can remove a quadratic's scale mismatch, but the displayed iteration remains a fixed-step gradient baseline.
Pause & reason
Check your understanding
Your turn
Try it yourself
Apply one full Newton step to from . Does it reach zero, and why does the usual nonsingular-minimum theorem need care here?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Use derivative x³ and second derivative 3x². Inspect the Hessian at the actual minimizer, not only the starting point.
Compare with the solution
At two, the gradient is eight and curvature twelve, so the displacement is and the new point is . More generally the update is for nonzero x. It converges linearly rather than quadratically because the Hessian at the minimizer zero vanishes, violating the nonsingularity assumption.
Keep the idea
Take it with you
- Newton's direction solves a local quadratic model through a linear system.
- Positive curvature and globalization control whether that local direction is useful.
- Quasi-Newton updates approximate curvature from gradient differences under explicit safeguards.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.