Matrix gradient and Hessian

Problem

For

f(w)=Xwy22+λw22,f(w) = \lVert Xw-y \rVert_2^2 + \lambda \lVert w \rVert_2^2,

derive the gradient and Hessian. State a sufficient condition for strict convexity.

Reveal answer or reference solution
f(w)=2XT(Xwy)+2λw,2f(w)=2XTX+2λI.\nabla f(w) = 2X^{\mathsf T}(Xw-y) + 2\lambda w, \qquad \nabla^2 f(w) = 2X^{\mathsf T}X + 2\lambda I.

It is strictly convex if λ>0\lambda>0, or if XX has full column rank when λ=0\lambda=0.

Local history

Loading attempts saved in this browser…

    Appears in