Exercises — Gradient descent and variants — convergence analysis
Before we start, one reminder of the four objects we lean on, in plain words:
Level 1 — Recognition
Exercise 1.1
A function is -smooth with . You want the one step size that gives the largest guaranteed per-step decrease of . What is , and what is the guaranteed decrease at a point where ?
Recall Solution
WHAT we use: the parent note showed that plugging into the descent lemma gives a drop of . This is a downward parabola in , maximised at . WHY and not bigger: past the factor turns negative — the "guarantee" evaporates. The peak of the parabola sits exactly at . So . Showing the substitution explicitly: plug into the drop coefficient : The guaranteed decrease is therefore
Exercise 1.2
A strongly convex quadratic has curvature eigenvalues (Hessian eigenvalues) and . State , , , the optimal step size , and the optimal contraction factor .
Recall Solution
WHAT the eigenvalues mean: for a quadratic, the Hessian's eigenvalues are the curvatures along each principal axis. The smallest is , the largest is . Optimal step size (parent note): Optimal rate:
Level 2 — Application
Exercise 2.1
For run one step of GD from with . Give and confirm each coordinate contracts by .
Recall Solution
WHAT the function is: a bowl stretched more steeply in . Its gradient is , so the Hessian is diagonal with . WHY coordinates decouple: because the Hessian is diagonal, each axis evolves independently as . So . Notice: coordinate 1 shrank (factor ), but coordinate 2 overshot past zero (factor ) — a sign is too big along the steep axis. See figure below.
Figure s01 — one GD step, . Lavender ellipses are level sets of (very elongated because the axis has curvature vs for ). The slate dot is ; the coral arrow shows the single GD step landing at the coral dot , which has flown past the mint star (the minimum at the origin) along the steep axis — the visual signature of an overshoot when .

Exercise 2.2
For the same as 2.1, what is the largest step size for which every coordinate contracts (no divergence)? What is the optimal and ?
Recall Solution
WHAT bounds : we need for all , i.e. . The tightest is the largest eigenvalue . That is why in 2.1 blew up along : . Optimal step: Optimal rate: , so
Level 3 — Analysis
Exercise 3.1
GD is applied to a strongly convex quadratic with at the optimal step size. How many iterations are needed so that ?
Recall Solution
WHAT we use: with . WHY a logarithm enters: we want . Taking (which turns exponents into multipliers) and dividing by the negative number (flipping the inequality): Round up (we need the inequality to hold): iterations.
Exercise 3.2
Momentum turns into in the rate. For the same , the momentum rate is . How many iterations does momentum need for the same accuracy, and what is the speedup factor over GD?
Recall Solution
, so . Speedup: . This is the " gift" made numeric: near a fewer iterations at .
Level 4 — Synthesis
Exercise 4.1
Show from the descent lemma that with the loss is monotonically non-increasing, and derive the exact per-step decrease. Then explain precisely at which the guaranteed decrease first becomes zero.
Recall Solution
WHAT we start from: the descent lemma . WHAT we substitute: , so and : WHY gives clean decrease: substitute : so . Since the subtracted term is , the loss never increases. When does the guarantee vanish? The coefficient when (trivial) or . For the coefficient is negative — the lemma no longer promises any decrease (and GD diverges on the worst eigendirection).
Exercise 4.2
For the anisotropic quadratic , plot conceptually why GD zig-zags. Then compute how many GD iterations vs momentum iterations reach , using optimal rates.
Recall Solution
WHY it zig-zags: . The narrow valley in has huge curvature; even the optimal step overshoots along each iteration, producing a back-and-forth path (see figure below). GD: . Momentum: . Speedup .
Figure s02 — GD zig-zag at . Lavender ellipses are the (very elongated) level sets of . The coral path with dots is the GD trajectory at the optimal step , starting from the labelled "start" point and spiralling toward the mint star at the origin. Even at the best possible scalar step it bounces side-to-side across the narrow valley — the geometry of a large condition number that no single can cure.

Level 5 — Mastery
Exercise 5.1
Derive the descent lemma bound's parabola-minimisation independently: given the one-step bound with , find maximising the drop by calculus, and confirm it equals .
Recall Solution
WHAT we optimise: the drop . WHY differentiate: is a downward parabola in ; its maximum is where the derivative is zero (Fermat's condition). Second derivative confirms a maximum. So the best guaranteed single-step drop uses exactly , giving , matching the parent note.
Exercise 5.2
SGD residual. Suppose near (a 1D quadratic , ) SGD uses a constant step and gradient noise variance . The stationary mean-square error satisfies (standard result for this model) Compute it, and then find the that minimises this residual is not the point — instead explain why it stays nonzero for any constant , and what schedule removes it.
Recall Solution
Plug in: , , : So the RMS residual is — SGD bounces in a ball of that radius, never settling. WHY nonzero: the numerator is proportional to ; it vanishes only as . With any fixed the noise keeps injecting energy each step, balanced by the contraction — a nonzero equilibrium. The fix (Robbins–Monro): use a decaying schedule with (still able to travel anywhere) and (total injected noise finite), e.g. . See Stochastic Approximation (Robbins–Monro).
Exercise 5.3
Full-batch vs Newton, one line each. For with having eigenvalues : (a) how many steps does optimally-tuned GD need to halve the error, and (b) how many does Newton's method need to reach the exact optimum? Explain the gap in one sentence.
Recall Solution
First, where is the minimum? For the gradient is , which is zero only at (since is positive definite, it is invertible, so ). So throughout. (a) GD: , . Need : (b) Newton: the update is — it reaches the minimum in exactly one step, regardless of . Why the gap (one sentence): Newton multiplies the gradient by , which rescales every eigendirection by its own curvature so all axes hit zero simultaneously, whereas GD uses a single scalar and is throttled by its worst-conditioned axis. See Newton's Method (second-order methods) and Eigenvalues and the Condition Number.
Recall One-line recap of the whole ladder
Recognition = plug into , , . Application = check per eigendirection. Analysis = iteration counts via (round up!). Synthesis = the descent lemma → monotone drop. Mastery = derive the optima, and know SGD needs a decaying schedule while Newton kills outright.