This is related to an attempt at solving this problem : Best rank-$1$ approximation of matrix with condition.
Let $M\in\mathbb R^{m\times m}$ be PSD symmetric and $a\in \mathbb R^m$ be such that $0\leq a$, i.e. for $i=1,\dots, m$, $a_i\geq 0$. I am trying to solve the following problem : \begin{align*} &\min_{\substack{b\in\mathbb R^m:\\0\leq b}} ~(a+b)^TM(a+b) \end{align*}
Since the problem is convex, the KKT conditions are both necessary and sufficient and are ($\mu$ are the Lagrange multipliers) \begin{align*} \begin{cases} 2M(a+b) = \mu\\ 0\leq b\\ 0\leq \mu\\ \mu^T b=0 \end{cases} \end{align*}
Is there any closed form for this problem ? or a fast and simple algorithm that optimize it ?
pytorchand therefore I would like to make it as simple as possible to not have to send data back and forth from GPU to CPU to another program etc... – P. Quinton Mar 17 '23 at 16:05