Let \(\mathbf{A} \in \mathbb{R}^{m\times n}\), \(\mathbf{b} \in \mathbb{R}^m\), and \(\mathbf{c} \in \mathbb{R}^n\). Let \(\mathbf{x} = \begin{bmatrix} x_1 \\ \vdots \\ x_n\end{bmatrix}\) be a tuple of variables. When studying linear programming, we often consider LP problems in standard (equality) form: \[\begin{array}{rlcrl} \min & \mathbf{c}^\mathsf{T}\mathbf{x} \\ (P)~~~~~\mbox{s.t.} & \mathbf{A}\mathbf{x} = \mathbf{b} \\ & \mathbf{x} \geq \mathbf{0}. \end{array} \]
The standard form is often the preferred because, as we will later see, it simplifies the discussion of certain ideas, especially those related to computations. It is also prevalent in the research literature on linear programming.
We can convert any given minimization LP problem to an equivalent one in standard form using one of the following transformations:
If \(x_i\) is constrained to be nonpositive (i.e. \(x_i \leq 0\)), create a new variable \(x'_i\) and replace every occurrence of \(x_i\) with \(−x'_i\). Note that \(x_i \leq 0\) becomes \(x'_i \geq 0\).
If \(x_i\) is a free variable, create two new variable \(x^+_i\) and \(x^-_i\) and replace every occurrence of \(x_i\) with \(x^+_i - x^-_i\) and add \(x^+_i \geq 0, x^-_i \geq 0\) to the problem.
For an inequality \(\mathbf{a}^\mathsf{T} \mathbf{x} \leq \beta\), create a new slack variable \(s\) and replace the inequality \(\mathbf{a}^\mathsf{T} \mathbf{x} \leq \beta\) with \(\mathbf{a}^\mathsf{T} \mathbf{x} + s = \beta\) and \(s \geq 0\).
For an inequality \(\mathbf{a}^\mathsf{T} \mathbf{x} \geq \beta\), create a new surplus variable \(s\) and replace the inequality \(\mathbf{a}^\mathsf{T} \mathbf{x} \geq \beta\) with \(\mathbf{a}^\mathsf{T} \mathbf{x} - s = \beta\) and \(s \geq 0\).
It is not difficult to check that each of the above transformations results in an equivalent LP problem in the sense that every feasible solution to the transformed problem can be converted to a feasible solution to the original LP problem with the same objective function value and vice versa. Furthermore, the transformed problem has an optimal solution if and only if the original problem does.
Example. We convert the following into an equivalent LP problem in standard form: \[ \begin{array}{rrcrcl} \min & 3x & + & 2y \\ \text{s.t.} & x & + & 3y & \leq & 6 \\ & -7x & - & y & \geq & 4 \\ & x & & & \leq & 0 \\ & & & y & & \text{free}. \end{array} \]
First, we replace \(x\) with \(-x'\) and \(y\) with \(y^+ - y^-\), \(y^+, y^- \geq 0\) to obtain \[ \begin{array}{rrcrcrcl} \min & -3x' & + & 2y^+ & - & 2 y^- \\ \text{s.t.} & -x' & + & 3y^+ & - & 3y^- & \leq & 6 \\ & 7x' & - & y^+ & + & y^- & \geq & 4 \\ & x' & , & y^+ & , & y^- & \geq & 0. \end{array} \]
Finally, we introduce a slack variable \(s\) to the first inequality and a surplus variable \(t\) to the second inequality to obtain: \[ \begin{array}{rrcrcrcrcrcl} \min & -3x' & + & 2y^+ & - & 2 y^- \\ \text{s.t.} & -x' & + & 3y^+ & - & 3y^- & + & s & & & = & 6 \\ & 7x' & - & y^+ & + & y^- & & & - & t & = & 4 \\ & x' & , & y^+ & , & y^- & , & s & , & t & \geq & 0. \end{array} \]