# Linear Programming Negativity Constraints

What happens when a variable is negative?

An example would be:

Maximize z = 3x1 + 4x2, subject to constraints:

1. 2x1 + 3x2 <= 10
2. 2x1 - 4x2 <= 20
3. x2 <= 10
4. x1 >= 0

To set up an Linear Programming problem in Standard Form, I learned that it must be of maximization type. The constraints must be <= (which is good as 1) and 2) agree with that). However, x1 is >= 0, but x2 is not. What would one do in this case? I tried introducing slack variables, namely x2', but I don't know where to go from here, any hints/help would be appreciated. I am just confused on what to do when one of the variables does not satisfy the positivity constraint, here x2<=10.

Edit: I think I can rewrite x2<= 10 as x2-10 <= 0. Then introduce x2' = x2-10. Then, can I replace x2 with x2'+10?

Replace $$x_2$$ with $$x_2^+ - x_2^-$$, with $$x_2^+ \geq 0$$ and $$x_2^- \geq 0$$.