Matrix Lagrange Multiplier with only positive entries

127 Views Asked by At

The problem is given $g(x) = A^Tx = k$ minimize $f(x) = x^TMx$ and $A$ is a real valued vector, $M$ is a real valued symmetric matrix, and all entries of $x$ must sum to 1. I attempted to use Lagrange multipliers and then solve for each entry in $x$, but because of the quadratic term it seems like the derivative for one entry depends on all of $x$ and I'm not sure if I'm approaching this problem correctly. How can this problem be solved?

1

There are 1 best solutions below

7
On

Typically, the gradient of $x^TMx$ is written as $(M+M^T)x$. The reason is as follows. We first express $x^TMx$ as $$ x^TMx=\sum_{i,j}m_{ij}x_ix_j, $$ from which $$ {\frac{\partial x^TMx}{\partial x_k} = \frac{\partial \sum_{i,j}m_{ij}x_ix_j}{\partial x_k} \\ = \frac{\partial \sum_{i=k,j\ne k}m_{ij}x_ix_j}{\partial x_k} + \frac{\partial \sum_{i\ne k,j= k}m_{ij}x_ix_j}{\partial x_k} \\ + \frac{\partial \sum_{i=j=k}m_{ij}x_ix_j}{\partial x_k} + \frac{\partial \sum_{i\ne k,j\ne k}m_{ij}x_ix_j}{\partial x_k} \\ = \sum_{j\ne k}m_{kj}x_j + \sum_{i\ne k}m_{ik}x_i + 2m_{kk}x_k \\ = \sum_{i}(m_{kj}+m_{jk})x_j \\= (M+M^T)x } $$