A math question about solving the Lagrangian of Support Vector Machine
Since you have an inequality constraint you need to meet the necessary Kuhn-Tucker Conditions which for non-negativity constraints are:


$\xi \geq 0$
$-r \cdot \xi = 0$ 


It is not enough to set the derivative w.r.t. to $r$ to zero as is the case for equality constraints and Lagrange multipliers.

Therefore, there are two cases to distinguish:


Either the condition is tight ($\xi=0$) and you can have $r \neq 0$
Or $\xi &gt; 0$ and $r = 0$.