I have a linear function with unit norm constraint that I need to minimize.
$$\begin{array}{ll} \underset{w}{\text{minimize}} & w^\top x\\ \text{subject to} & \|w\| = 1 \end{array}$$
Is there a way to do this analytically?
My current thinking is that:
$$ \frac{d}{d w} w^\top x = x $$
$$ w = \|x\| $$
But this doesn't seem to make sense at all.
Thanks
Best Answer
Taking the lagrangian we have equivalently
$$ L(w,\lambda) = w^\top x + \lambda (w^\top w -1) $$
and the stationary points are the solutions for
$$ \nabla L = 0 = \cases{x+2\lambda w = 0\\ w^\top w - 1 = 0} $$
As $w = -\frac{1}{2\lambda}x$ we have
$$ \frac{1}{4\lambda^2}x^\top x = 1 $$
or
$$ \lambda = \pm\frac 12||x|| $$
and finally
$$ w = \pm \frac{x}{||x||} $$