# Slack variables

1. Aug 1, 2007

### catcherintherye

i am working with the following linear program

$$(P) max 2x_1 - x_2 \\ subject to x_1 \leq 3 \\ - x_1 + x_2 \leq -1 \\ x_1 + x_2 \geq 2 \\ x_1, x_2 \geq 0$$

my question is this, when introducing slack variable $$x_3 , x_4 , x_5$$

what should i do about the greater and equal to inequality, must i subtract the slack variable?

Last edited: Aug 1, 2007
2. Aug 1, 2007

### catcherintherye

i am working with the following linear program

(P) max $$2x_1 - x_2$$

$$subject to x_1 \leq 3$$

$$- x_1 + x_2 \leq -1$$

$$x_1 + x_2 \geq 2$$

$$x_1, x_2 \geq 0$$

my question is this, when introducing slack variable $$x_3 , x_4 , x_5$$

what should i do about the greater and equal to inequality, must i subtract the slack variable?

Last edited: Aug 1, 2007
3. Aug 1, 2007

### morphism

You can do that. Or you can multiply the last constraint by -1 to turn $\geq$ into $\leq$, and then add the slack variable.