I am given the following:
min $f(x) = 1/2(x-r)^T(x-r)$
s.t $a^Tx=b$
This is basically minimizing the distance from x on the hyperplan $a^Tx = b$ from some point r in $R^n$
If I compute the gradient I get:
$\nabla f(x) = x - r$ and set = $a\lambda \implies x = r + a\lambda$
However the book states the minim value $x_*$ is given by:
$x_* = r + \frac{b-a^Tr}{a^Ta}a$
I'm not sure how they're getting this or how to show $\lambda = \frac{b-a^Tr}{a^Ta}$
$$x-r=a\lambda$$
Multiplying $a^T$ on both sides,
$$a^T(x-r)=\lambda (a^Ta)$$
$$a^Tx-a^Tr=\lambda (a^Ta)$$
But we know that $a^Tx=b$.
$$b-a^Tr=\lambda (a^Ta)$$