advanced28 min studyLesson 44 in Mathematics

Newton and quasi-Newton methods

Use local curvature to choose a direction, and identify when damping or curvature approximations are necessary.

On this page

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.

m(p)=f(x)+gTp+12pTHp,HpN=−g,gTpN=−gTH−1g<0m(p)=f(x)+g^{\mathsf T}p+\tfrac12p^{\mathsf T}Hp,\qquad Hp_N=-g,\qquad g^{\mathsf T}p_N=-g^{\mathsf T}H^{-1}g<0
Here g is the gradient and H the positive-definite Hessian at x. The strict descent statement assumes g is nonzero; the inverse notation describes a result, not a recommended implementation.↔ Scroll wide equations horizontally.

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.

xk+1=xk+αkpk,Hkpk=−gk,0<αk≤1x_{k+1}=x_k+\alpha_k p_k,\qquad H_kp_k=-g_k,\qquad 0<\alpha_k\leq1
Damped Newton uses a line search or other globalization strategy to select α. Accepting full steps near a regular minimizer enables the local quadratic rate under the required regularity assumptions.↔ Scroll wide equations horizontally.

Learn curvature from successive gradients

Quasi-Newton methods replace the exact Hessian by a matrix updated from observed displacements and gradient changes. With s=xk+1−xks=x_{k+1}-x_k and y=gk+1−gky=g_{k+1}-g_k, a Hessian approximation can enforce the secant relation Bk+1s=yB_{k+1}s=y. 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 sTy>0s^{\mathsf T}y>0 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.

Rescale a narrow quadratic exactly

For f(x,y)=(x2+9y2)/2f(x,y)=(x^2+9y^2)/2 at (3,2)(3,2), compute one full Newton step and compare its value with a gradient step of size 1/91/9.

  1. The gradient is (3,18)(3,18) and the Hessian is diag⁡(1,9)\operatorname{diag}(1,9). Solve px=−3p_x=-3 and 9py=−189p_y=-18 to get the Newton direction (−3,−2)(-3,-2). The initial objective is (9+36)/2=22.5(9+36)/2=22.5.

  2. The full Newton update reaches (0,0)(0,0) and value zero. This is exact because the local quadratic model is the entire objective, so there is no neglected higher-order remainder.

  3. A gradient step of size 1/91/9 instead gives (3−1/3,2−2)=(8/3,0)(3-1/3,2-2)=(8/3,0), with value (64/9)/2=32/9(64/9)/2=32/9. The flat coordinate survives because the shared step was chosen for the steep curvature.

The result

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.

Explore the model

Interactive lab

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.

Compare the gradient baseline with a Newton calculationGradient descent on f(x) = x²/2: xₙ = (1 − η)ⁿx₀. Playback advances two discrete iterations per second. Values outside |x| ≤ 4 are explicitly reported. Current readings: Position x0: 2; Objective x²/2: 2; Iteration behavior: Stable step. All parameters are adjustable with the labeled controls below.−4−202402.174.356.528.7Parameter xf(x) = x²/2n = 0
ObjectiveDiscrete iterate
Position x0
2
Objective x²/2
2
Iteration behavior
Stable step
n = 0 · t = 0 s

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.

Check your understanding

Which condition ensures the exact Newton direction is a strict descent direction when the gradient is nonzero?

Try it yourself

Apply one full Newton step to f(x)=x4/4f(x)=x^4/4 from x=2x=2. 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 −8/12=−2/3-8/12=-2/3 and the new point is 4/34/3. More generally the update is xk+1=2xk/3x_{k+1}=2x_k/3 for nonzero x. It converges linearly rather than quadratically because the Hessian at the minimizer zero vanishes, violating the nonsingularity assumption.

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.