# How to add nonnegative constraint to an LP problem

I have the following LP problem (from Bazaraa, Jarvis and Sherali Linear Programming and Network Flow problem 1.30):

Minimize $x_1 - 2x_2 + 3x_3$

s.t. $-x_1+3x_2+x_3 \le13$

$x_1+2x_2+3x_3 \ge 12$

$2x_1-x_2+x_3 = 4$ $x_3 \le -3$

I need to convert this into standard and canonical forms for the exercise. To convert to standard form I have added two slack variables $s_1$ and $s_2$. This is what I have so far:

$-x_1+3x_2+x_3+s_1=13$

$x_1+2x_2+3x_3+s_2=12$

$2x_1-x_2+x_3=4$

However, I am unsure what to do about the nonnegativity constraint that I need to add. I.e. $x_1$ and $x_2$ are not sign restricted and $x_3$ has another condition. How do I go about ensuring that all of my variables are nonnegative to fit the standard form?

To do so, you will have to add variables to your problem. Set $x_1=x_1^+-x_1^-$ and $x_2=x_2^+-x_2^-$ where $x_i^+$ and $x_i^-$ are positives and replace $x_1$ and $x_2$ by those expressions in your problem.