Let $A\in \mathbb R^{m×n}, b \in \mathbb R^m$ with $m \leq n$, $\operatorname{rank} A = m$ and $x_0 \in \mathbb R^n$. Consider the problem : $$\arg \min\|x-x_0\|² \quad\text{s.t. }Ax = b$$
How can I solve this, please? I was thinking about using the least square solution to $Ax=b$ minimizing $\|x\|$ but I'm not sure.
Thank you for your help.
Let $y=x-x_0$; then $Ay=b-Ax_0$. If you use least squares for this transformed system $\|y\|=\|x-x_0\|$ will be minimized. After that you need to add $x_0$ to $y^*$ to get the solution $x^*$.