Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Subgradient and proximal operator practice

Original practice questions (PDF)

1. Subgradients of the Euclidean norm at zero

For f(x)=∥x∥2f(x)=\|x\|_2, compute ∂f(0)\partial f(0) using directional derivatives or limits of gradients.

Solution to exercise 1

For a direction dd, f′(0;d)=∥d∥2f'(0;d)=\|d\|_2. The subgradient condition is g⊺d≤∥d∥2g^\intercal d\le\|d\|_2 for every dd. This holds if ∥g∥2≤1\|g\|_2\le1 by Cauchy–Schwarz, and taking d=gd=g proves necessity. So ∂f(0)={g:∥g∥2≤1}\partial f(0)=\{g:\|g\|_2\le1\}.

2. An eigenvalue with multiplicity two

For symmetric XX, ∂λmax(X)=conv⁡{vv⊺:∥v∥2=1,Xv=λmax(X)v}\partial\lambda_{\max}(X)=\operatorname{conv}\{vv^\intercal:\|v\|_2=1,\ Xv=\lambda_{\max}(X)v\}. Compute the set for X=[200020001].X=\begin{bmatrix}2&0&0\\0&2&0\\0&0&1\end{bmatrix}.

Solution to exercise 2

The top eigenspace is span⁡{e1,e2}\operatorname{span}\{e_1,e_2\}. The convex hull of the unit rank-one projectors on that space consists of positive semidefinite matrices supported on the first two coordinates with trace 1. This follows by spectral decomposition. Explicitly the set consists of [ab0b1−a0000],0≤a≤1,b2≤a(1−a).\begin{bmatrix}a&b&0\\b&1-a&0\\0&0&0\end{bmatrix}, \qquad 0\le a\le1,\quad b^2\le a(1-a).

3. A maximum of three affine functions

Let f(x)=max⁡{x1+2x2,3x1−x2,−x1+3x2}f(x)=\max\{x_1+2x_2,3x_1-x_2,-x_1+3x_2\}. At x=(1,1)x=(1,1), identify the active terms and find the full subdifferential.

Solution to exercise 3

The values are 3,2,23,2,2 in the order shown, so only the first term is active. The subdifferential is the singleton {(1,2)}\{(1,2)\}.

4. Conjugate of a half-line indicator

Let f(x)=δ[0,∞)(x)f(x)=\delta_{[0,\infty)}(x), which is zero on [0,∞)[0,\infty) and +∞+\infty elsewhere. Compute f⋆(y)=sup⁡x≥0xyf^\star(y)=\sup_{x\ge0}xy. Use g∈∂f(x)g\in\partial f(x) if and only if f(x)+f⋆(g)=xgf(x)+f^\star(g)=xg to determine ∂f(0)\partial f(0).

Solution to exercise 4

For y≤0y\le0, the supremum is zero, attained at x=0x=0. For y>0y>0, it is +∞+\infty. At zero the Fenchel equality requires f⋆(g)=0f^\star(g)=0, so ∂f(0)=(−∞,0]\partial f(0)=(-\infty,0].

5. A subgradient step at and away from a kink

Let f(x)=|x|+5f(x)=|x|+5 and take one subgradient step with step size α=0.4\alpha=0.4 from x0=3x_0=3. Separately, list all possible next iterates for a step started at x0=0x_0=0.

Solution to exercise 5

At 33 the sole subgradient is 11, so x1=3−0.4=2.6x_1=3-0.4=2.6. At 00 the subdifferential is [−1,1][-1,1]. The next iterate is −0.4g-0.4g for any gg in that interval, giving [−0.4,0.4][-0.4,0.4].

6. Projection onto a box

Let C={x∈ℝ2:0≤xi≤1,i=1,2}C=\{x\in\mathbb R^2:0\le x_i\le1,\ i=1,2\}. The proximal operator of its indicator is the Euclidean projection onto CC. Compute it at w=(3,4)w=(3,4).

Solution to exercise 6

The squared-distance objective is separable, so project each coordinate onto [0,1][0,1]. Both coordinates exceed the upper bound, giving (1,1)(1,1).

7. A proximal step with a constraint

For f(x)=12(x−5)2+δ[0,∞)(x)f(x)=\tfrac12(x-5)^2+\delta_{[0,\infty)}(x), find prox⁡tf(v)\operatorname{prox}_{tf}(v) at v=1v=1 and t=1t=1.

Solution to exercise 7

Minimize 12(x−5)2+12(x−1)2\tfrac12(x-5)^2+\tfrac12(x-1)^2 over x≥0x\ge0. The derivative 2x−62x-6 vanishes at x=3x=3, which is feasible and uniquely minimizes the strictly convex objective.

8. Fixed points of a proximal operator

Let f(x)=|x−2|f(x)=|x-2| and T(x)=prox⁡f(x)T(x)=\operatorname{prox}_f(x). Find all fixed points of TT and explain their relation to 0∈∂f(x)0\in\partial f(x).

Solution to exercise 8

The point xx is fixed exactly when it minimizes f(z)+12(z−x)2f(z)+\tfrac12(z-x)^2 over zz. At z=xz=x the quadratic has zero derivative, so this is equivalent to 0∈∂f(x)0\in\partial f(x). The only minimizer of |x−2||x-2| is 22, giving the sole fixed point.