Derive why the direction of fastest local decrease of f at x is −∇f(x), using a first-order Taylor expansion and the Cauchy–Schwarz inequality. For f(x,y)=x2+3y2 at (1,1), compare the rate of decrease along −∇f/∥∇f∥ with the one along (0,−1)?

Linear algebra and optimisation, Gradient methods
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you can derive the steepest-descent direction rather than just quote it, and check it on a small example.

Key idea

For a small step η in a unit direction u, f(x+ηu)≈f(x)+η ∇f(x)⊤u. Cauchy–Schwarz gives ∇f⊤u≥−∥∇f∥ ∥u∥=−∥∇f∥, with equality at u=−∇f/∥∇f∥.

Steps

  1. This is the derivation behind `why-negative-gradient`, which gives the picture. Write the first-order Taylor approximation f(x+ηu)≈f(x)+η ∇f(x)⊤u with ∥u∥=1. The change in f is, to first order, η times the directional derivative ∇f(x)⊤u.
  2. To decrease f as fast as possible, minimise ∇f⊤u over unit vectors. Cauchy–Schwarz says ∣∇f⊤u∣≤∥∇f∥ ∥u∥=∥∇f∥, so the smallest possible value is −∥∇f∥.
  3. Equality needs u to be parallel to ∇f with the opposite sign: u∗=−∇f/∥∇f∥. That is the steepest descent direction.
  4. Numbers. ∇f=(2x,6y)=(2,6) at (1,1), and ∥∇f∥=40≈6.325. Along u∗ the slope is −6.325. Along (0,−1) the slope is (2,6)⋅(0,−1)=−6, which is less steep. Along (−1,0) it is only −2.
  5. Sanity check. −6/6.325≈−0.949, so the direction (0,−1) achieves about 95% of the best rate. It is close because the gradient is mostly in the y direction.
  6. State the condition. The result is local, since the Taylor step is valid only for small η. The word steepest also depends on measuring step length with the Euclidean norm; other norms give other directions.

Common mistakes

How long your answer should be

Half a page; about 3 minutes, with the Cauchy–Schwarz step and the numerical check.

Read this

Previous in Linear algebra and optimisation: If A−1 is known, how do you derive the Sherman–Morrison formula for (A+uu⊤)−1? How do you verify it for A=diag⁡(2,1) and u=(1,2)⊤, and why does it matter for online ridge regression?
Next in Linear algebra and optimisation: Prove that for a convex function f on a convex set C, every local minimum is a global minimum. Then show on f(x)=max⁡(0,∣x∣−1) that the minimiser need not be unique, and what extra condition makes it unique?