Graphical Method

Suppose a linear program has nn decision variables. Then it can be solved graphically using a Rn\mathbb{R}^n space. Hence not suitable for n>2n > 2 (or n>3n > 3 with computer visualization).

All constraints are plotted on the same Rn\mathbb{R}^n space. Feasible region is the intersection of all constraint half-spaces. Optimal solution occurs at a vertex (and not the interior) of the feasible region. Based on the vertex property.

The vertex is found by moving the objective hyperplane z=c1x1+⋯+cnxnz = c_1x_1 + \dots + c_nx_n across the feasible region. Increase zz for maximization, decrease it for minimization. The optimal vertex is the last one the hyperplane touches before leaving the region.

Worked Example

Maximize z=3x1+2x2z = 3x_1 + 2x_2 subject to

x1+x2≤4x1+3x2≤6x1,x2≥0\begin{aligned} x_1 + x_2 &\le 4 \\ x_1 + 3x_2 &\le 6 \\ x_1, x_2 &\ge 0 \end{aligned}
Solution Reveal Hide

Plot both constraint lines. The feasible region is the polygon with vertices (0,0)(0,0), (4,0)(4,0), (3,1)(3,1), (0,2)(0,2). Vertex (3,1)(3,1) is the intersection of x1+x2=4x_1 + x_2 = 4 and x1+3x2=6x_1 + 3x_2 = 6.

Graphical Method Worked Example The feasible region of a two-variable linear program, bounded by two constraints and the axes. Arrows point to each constraint's feasible half-plane. x₂ x₁ x₁ + x₂ = 4 x₁ + 3x₂ = 6 (0,0) (4,0) (3,1) (0,2)
The feasible region is bounded by x₁ + x₂ ≤ 4, x₁ + 3x₂ ≤ 6, and the axes. Arrows mark the feasible side of each constraint line. The optimal vertex (3,1) is where the 2 lines intersect.

Evaluate zz at each vertex:

Vertexzz
(0,0)(0,0)00
(4,0)(4,0)1212
(3,1)(3,1)1111
(0,2)(0,2)44

Optimal: x1=4x_1 = 4, x2=0x_2 = 0, z=12z = 12.

Special Cases

  • Multiple optima
    The objective line is parallel to a binding constraint edge. Every point on that edge is optimal.
  • Unbounded problem
    The feasible region extends without limit in the improving direction. No finite optimum exists.
  • Infeasible problem
    The constraint half-planes have empty intersection. No solution exists.

Wolfram Mathematica notebooks

A companion notebook for this note. Open it in Mathematica and evaluate the cells to reproduce the worked example.

The summary notebook defines every function used in this module, with documentation and no examples, as a starting point for your own problems.

Written by October 24, 2026 2 min read
Was this helpful?