- [[Optimization Problem - Standard and Convex]] >[!info] Introducing Slack Variables >This trick enables us to transform **any inequality into an equality** constraint at the cost of additional variables over which to optimize. For any $f_i(\mathbf{x})\leq0$, we can say that the constraint is only satisfied, if there is an $s_i \geq 0$, such that $f_i(\mathbf{x})+s_i=0,\quad s_i \geq 0.$This creates a new variable and condition for each inequality constraint, transforming an initial$\begin{align} \min_\mathbf{x} &\quad f(\mathbf{x}) \\ \text{subj. to } &g(\mathbf{x}) \leq 0 \end{align}$ with a softened problem$\begin{align} \min_\mathbf{x,s} &\quad f(\mathbf{x}) + I_s(s) \\ \text{subj. to } &g(\mathbf{x}) \leq 0 \\ &s \geq 0\end{align}$ >[!warning] >A requirement on $I(s)$ is that for $s=0$, any feasible solution of the original problem must still be feasible >[!brainwaves] Intuition >Instead of strictly enforcing a constraint, we punish its violation.