What is a subgradient of a convex function at a non-differentiable point, and what is the subdifferential of f(w)=∣w∣ at w=0? Why can the subgradient method increase the objective on some steps, and why must its step size decay instead of staying constant?

Linear algebra and optimisation, Subgradient methods
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you know how subgradients generalise gradients to kinks like ∣w∣ and why constant-step subgradient descent cannot converge.

Key idea

A vector g is a subgradient of convex f at x if the linear function with slope g stays globally beneath f: f(y)≥f(x)+g⊤(y−x) for all y. Because −g is not guaranteed to be a descent direction on every step and subgradients need not vanish near a kink, the step size must shrink to zero.

Steps

  1. Define the subgradient and subdifferential: g∈Rd is a subgradient of convex f at x if f(y)≥f(x)+g⊤(y−x) for all y. The set of all subgradients at x is the subdifferential ∂f(x). When f is differentiable at x, ∂f(x)={∇f(x)}.
  2. Compute ∂∣0∣: we need ∣y∣≥0+g(y−0)=gy for all y∈R. Testing y=1 gives g≤1 and y=−1 gives g≥−1; conversely, ∣g∣≤1 satisfies ∣y∣≥gy. Hence ∂∣0∣=[−1,1].
  3. Explain why the objective can rise: −g need not be a descent direction at a kink. For example, on f(x1,x2)=2∣x1∣+∣x2∣ at (0,1), the vector g=(2,1) is a valid subgradient (since ∂(2∣0∣)=[−2,2]), yet stepping along −g gives f(−2η,1−η)=4η+∣1−η∣≥1+3η>1=f(0,1) for every η>0 because climbing the steeper ∣x1∣ wall outweighs descending ∣x2∣. Even in 1-D on f(w)=∣w∣ from w0=0.2 with η=1, w1=0.2−1(1)=−0.8 raises f from 0.2 to 0.8.
  4. Explain why ηt must decay: for f(w)=∣w∣, every non-zero w has ∣g∣=1. With a fixed η, each step moves by distance η, so iterates bounce across 0 at distance O(η) forever instead of converging. Standard convergence needs ηt→0 with ∑ηt=∞ (e.g. ηt∝1/t).

Common mistakes

How long your answer should be

Half a page; 4–5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Linear algebra and optimisation: What is the Armijo (sufficient decrease) condition in backtracking line search, why is simply requiring f(x+αd)<f(x) not enough to guarantee convergence, and what step size does backtracking choose on f(x)=x2 from x0=2 in direction d=−4 with initial α0=1, shrink factor β=0.5 and c1=0.25?
Next in Linear algebra and optimisation: How is the Lagrange dual function g(λ,ν) defined for a constrained optimisation problem, why is g(λ,ν) always concave even when the primal problem is non-convex, and how do you prove weak duality (d∗≤p∗)?