How the KKT conditions change when we replace the equality constraint $g(x)=0$ to $||g(x)||^2=0$?

47 Views Asked by At

Consider the following optimization problem: $$ \min_{x \in \mathbb{R}^n} f(x) \text{ subject to } g(x)=0 , $$ where $f$ and $g$ are smooth functions from $\mathbb{R}^n$ to $\mathbb{R}$. This is equivalent to $$ \min_{x \in \mathbb{R}^n} f(x) \text{ subject to } ||g(x)||_2^2=0 . $$ However, I am struggling with the KKT conditions for the latter form. The Lagrange function is $$ L(x,\lambda) = f(x) + \lambda (g(x))^T g(x) \quad \text{ with } \begin{cases} \nabla_x L(x,\lambda) = \nabla f(x) + \lambda \nabla g(x) \cdot g(x) \\ \nabla_\lambda L(x,\lambda) = (g(x))^T g(x) = ||g(x)||_2^2 \end{cases} $$ By the first-order optimality conditions, $\nabla_\lambda L(x,\lambda)=0$ implies $g(x)=0$. Then, combining with $\nabla_x L(x,\lambda) = 0$ yields $\nabla f(x) = 0$, which does not make sense compared to the first-order optimality conditions for the original problem, i.e., $g(x)=0$ and $\nabla f(x) + \lambda \nabla g(x)=0$.

My question is what is wrong with the second formulation?

Thank you for your help!