Solving Lagrange multiplier problem $\max x'Qx$ subject to $\|x\|=1$

252 Views Asked by At

Given a symmetric positive definite matrix $Q$, $$ \max_{\| x \| = 1} x^t Q x \tag{P} $$


Solving the problem I made the following:

  1. First I see that $\|x\| = 1$ is equivalent to $\|x\|^2=1$, so I replace it because it easier to use it.

  2. Then I construct the lagrange function $L(x,\lambda) = x^tQx +\lambda(\|x\|^2 -1)$

  3. I impose the gradient = 0:

$0=\nabla L(x,\lambda)=2Qx+2\lambda x = 2(Q+\lambda I)x$

So:

$Qx = -\lambda x$

So $-\lambda$ should be an eigenvalue of Q and then $-\lambda>0$

Even more if we are looking for the maximum taking

$-\lambda^* =$ max{μ_i eigenvalues}

And getting $x^*$ as any eigenvector of $-\lambda^*$ with $\|x^*\|^2=1$

We have that $(x^*)^tQx = -\lambda^*\|x\|^2 = -\lambda^*$ and that is maximum.

Is it the solution?