[Math] ”min $c^tx$ subject to $x^tAx=1$”: is is possible to solve it with Lagrange multiplier or in the scope of KKT

lagrange multiplierlinear programmingoptimization

I find a problem:

Minimize $c^tx$ subject to $x^tAx=1$, where $A$ is a positive semidefinite symmetric matrix.

But the question obligates to use KKT but I am trying to apply simple Lagrange multiplier solution but cannot cope with it.

Is that question solvable via Lagrange Multiplier or this method is only available for linear equality constraints?

Best Answer

If $A$ is a positive definite matrix then you can use usual Lagrangian methods but if $A$ is only positive semi-definite matrix then you have some constraint on the $x_s$ that is missing from your original question. For example, if $A=\left(\begin{array}{cc}0 & 0 \\0 & 1\end{array}\right)$ and $c=(-1,2)$ then there is no bounded solution. The "solution" in this example is $x_1=-\infty$ and $x_2=1$.

In what follows I assume $A$ is a positive definite matrix.

The first-order condition for the optimization problem give us:

$$c - \lambda\,\left(A^t+A\right)x=0 \Rightarrow x=\dfrac{\left(A^t+A\right)^{-1}c}{\lambda}\Rightarrow x^tAx=\dfrac{c^t \left(\left(A^t+A\right)^{-1}\right)^tA\left(A^t+A\right)^{-1}c}{\lambda^2}=\dfrac{c^t \left(A^t+A\right)^{-1}A\left(A^t+A\right)^{-1}c}{\lambda^2}=1$$ where $\left(A^t+A\right)^{-1}$ is the inverse matrix of $\left(A^t+A\right)$ (notice that the existence of $\left(A^t+A\right)^{-1}$ is not guaranteed if $A$ were to be only semi definite). So $\lambda=\sqrt{c^t \left(A^t+A\right)^{-1}A\left(A^t+A\right)^{-1}c}$ and we finally get: $$ \boxed{x=\dfrac{\left(A^t+A\right)^{-1}c}{\sqrt{c^t \left(A^t+A\right)^{-1}A\left(A^t+A\right)^{-1}c}}}.$$

Suggestion: don't get intimidated with vector calculus. It always helps to do simpler versions of the problem in $\mathbb{R}^2$ to check you are on the right track.

Side work: $\nabla_x\left( c^t x\right) = c$ so $\nabla_x\left( y^tAx\right)= A^t y$ and $\nabla_y\left( y^tAx\right)= Ax$.