Let $A$ be a $n\times m$ matrix. Let us define the system $$Av=b$$ $$v\geq 0$$

I want to find a solution $v$ of this system that is the closest (euclidean norm) to $v_0$, a given $n$-dimensional vector.

What is the simplest way to solve this ?


  • $\begingroup$ What does $v \ge 0$ mean? Is $v^*$ conjugate transpose? $\endgroup$ – GFauxPas Apr 2 '15 at 13:36
  • $\begingroup$ The elements of the vector are all non-negative. I removed the star. $\endgroup$ – quantguy Apr 2 '15 at 13:40
  • 1
    $\begingroup$ You want to solve the problem $\min_v\|v_0-v\|_2$ such that $Av=b$ and $v\geq 0$. If the "way how to solve this" means a tool, Matlab has the function lsqlin to do exactly this. Otherwise, these kinds of problems are solved using trust region and interior point methods. $\endgroup$ – Algebraic Pavel Apr 2 '15 at 13:43
  • $\begingroup$ Thanks. I will give it a try. $\endgroup$ – quantguy Apr 2 '15 at 13:45
  • 1
    $\begingroup$ Here's the full model:\begin{array}{ll}\text{minimize} & \|v-v_0\|_2^2 \\ \text{subject to} & Av=b \\ & v \geq 0\end{array}This is actually a very standard quadratic program. Certainly Algebraic Pavel is right, but in fact any quadratic programming engine can handle this readily. $\endgroup$ – Michael Grant Apr 2 '15 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.