Skip to content

Unrestricted Variable Transformation

Definition

An unrestricted variable xjx_j can be replaced everywhere by the difference of two nonnegative variables:

xj=xj+−xj−,xj+,xj−≥0.x_j=x_j^+-x_j^-,\qquad x_j^+,x_j^-\ge0.

If xj≤0x_j\le0 is required, use xj=−xj−x_j=-x_j^- with xj−≥0x_j^-\ge0 instead.


Interpretation

The simplex method works with nonnegative variables only, but some decisions can be negative, for example a change in stock level. The transformation writes such a free variable as the difference of two nonnegative parts, so the model again has only nonnegative variables while the original variable keeps its full range.

A number line with the values 2.5 and -3, each split into a positive part and a negative part, so that x = x plus minus x minus with both parts nonnegative.

On the number line, x=2.5x=2.5 is written with x+=2.5x^+=2.5 and x−=0x^-=0, and x=−3x=-3 with x+=0x^+=0 and x−=3x^-=3. One part carries the size of the number and the other is zero, so x=x+−x−x=x^+-x^- holds with both parts nonnegative.

The substitution has to be made in the objective and in every constraint; afterwards xjx_j no longer appears, and its value is recovered as xj+−xj−x_j^+-x_j^-. The representation is not unique: x=2x=2 can also be written as 5−35-3. This does no harm: the objective and constraints depend on the two parts only through their difference, so all representations of the same xjx_j are equally feasible and give the same objective value. Both parts stay linear terms, so the model remains a linear program.

When the sign is known, splitting is unnecessary: for xj≤0x_j\le0 the single substitution xj=−xj−x_j=-x_j^- is enough, and a variable that already satisfies a nonnegativity constraint needs no change. With the negative RHS transformation and the minimization-to-maximization transformation, it is one of the steps that bring a model into the form the simplex method starts from.


Key Results

  • Apply the substitution to both the objective and every constraint.
  • The difference representation is not unique; it is not necessary to impose a nonlinear restriction preventing both parts from being positive.
  • The optimal original variable is the difference of the computed parts.

Examples

The two replacement columns are opposites: the column of xj−x_j^- is −1-1 times the column of xj+x_j^+. They cannot both be basic in the same basic solution, although a feasible solution that is not basic may have both parts positive.

  • x2+=0x_2^+=0 and x2−=10x_2^-=10 give x2=−10x_2=-10.
  • The other-model-forms exercise transforms its nonpositive x1x_1 as −x1−-x_1^-.

Prerequisites

Sources

Aliases: variable splitting

Last updated: 20 October 2026 03:02