I have the following optimization problem: $$ \text{minimize}_x \Vert z - x \Vert^2 \\ \text{subject to } Ax = 0, $$ where $x,z\in \mathbb{C}^N$, and $A\in\mathbb{C}^{M \times N}$. $A$ is a wide matrix, i.e. $M \le N$, with rank $M$. I found a closed-form solution to this problem in "D. Bertsekas, Nonlinear Programming, 1999", which is $$ x_\star = (I_N - A^H(AA^H)^{-1}A)z, $$ where $I_N$ is the $N \times N$ identity matrix. However, I'm having problems deriving this solution.
I have tried to use the Lagrange multiplier method as follows. The dual optimization problem is $$ \text{minimize}_{\{x,\lambda\}} \Vert z - x \Vert^2 + \lambda \Vert Ax \Vert^2, $$ where $\lambda > 0$ is a Lagrange multiplier. Setting the derivative of the Lagrangian Dual with respect to $x$ to zero gives $$ x_\star = (I_N - A^HA)^{-1}z, $$ and, applying the matrix inversion lemma, I get $$ x_\star = (I_N - A^H(\tfrac{1}{\lambda}I_M + A A^H)^{-1}A)z. $$ Thus, the solution in the book and the solution I'm getting are equal when $\lambda \rightarrow \infty$. What does this mean? Any ideas how can I get the $\lambda \rightarrow \infty$ condition?
Thank you very much for your help.