I was reading the convex optimization book from Stephen Boyd, I was trying to solve this problem of euclidean projection on a hyperplane via lagrangian but I am unable to get this solution can someone please guide through steps for solving it via lagrangian. I know there are easier methods to solve this but I want to solve it via lagrangian.
2026-03-28 16:58:04.1774717084
On
Projection of a point exterior to the set on to a hyper plane via lagrangian
494 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
2
On
Guide:
Let's solve
$$\min_{x} \|x-x_0\|^2$$
subject to $$a^Tx=b$$
The Lagrangian is $$\|x-x_0\|^2+\lambda (a^Tx-b)$$
Differentiating it gives us $$2(x-x_0)+\lambda a = 0$$
If we know $\lambda$, we can recover $x$. To recover $\lambda$, multiply $a^T$ throughout and use the information that $a^Tx=b$. Try to take it from here.

Hint (outline):
First form Lagrangian $$L(x, \lambda) = \underbrace{\frac{1}{2} \| x - x_0 \|_2^2}_{ := f(x)} + \lambda \underbrace{\left( a^Tx - b \right)}_{:= g(x)} .$$
Then invoke KKT conditions: