2D Linear Programming Explorer

Build the region. Drag the objective. See the optimum.

Students can enter constraints in slope-intercept form, visualize the feasible polygon, and slide the objective function parallel to itself to find the best point or edge.

Setup

Constraints and objective

Load model

Paste a two-variable LP statement or a coefficient table, preview it, then load it into the graph.

Use a standard two-variable LP format with `Max` or `Min`, one constraint per line, optional nonnegativity such as `A,B >= 0`, and fractions like `1/2` when needed.

Waiting

Paste a model, then click Preview model or Load into graph.

Objective function

Drag the amber midpoint to move it in parallel, or drag an endpoint to change its slope.

Constraints

Add lines and half-planes to define the feasible set.

Visualization

Feasible region and objective line

Drag the graph to pan, use your mouse wheel to scale the window, and move the colored lines directly on the plot.

Constraint colors match the cards on the left. Drag the graph background to pan the window, use your mouse wheel to scale it, and move or rotate the lines directly on the plot.

Live readout

The app updates these summaries as the model changes.

Feasible region Checking

Waiting for constraints.

Objective line Waiting

Enter a nonzero objective to draw the line.

Optimization result Not solved

Drag the line or snap it to the optimum.