Linear programming finds the best value of a linear objective — maximum profit or minimum cost — subject to linear constraints. In a two-variable problem, the graphical method finds the feasible region and checks its corner points. In larger problems, the simplex method applies the same corner-point idea algebraically.
When this method applies
Use linear programming only when both the objective and the constraints are linear. If a relationship bends, curves, or depends on products like , it is not a linear program. The general shape is
subject to linear inequalities such as
together with conditions like when negative values make no sense. The set of all points satisfying every constraint is the feasible region, and the question is: among those feasible points, which gives the best objective value? Typical settings are production planning, transportation, staffing, blending, scheduling, and budget allocation — anywhere decisions compete for limited resources under linear limits.
The procedure, step by step
- Define the variables. Choose what each variable counts, e.g. units of product and product .
- Write the objective. Express the quantity to maximize or minimize as a linear function.
- List the constraints. Translate each limit into a linear inequality, and add nonnegativity conditions where they apply.
- Graph the feasible region. Draw each constraint on the -plane; the overlap of all allowed regions is the feasible region.
- Find the corner points. Locate the vertices where boundary lines intersect.
- Evaluate the objective at each corner and pick the best value.
Why corner points are enough
For linear programs, one fact drives the whole method: if an optimal solution exists, at least one optimal solution sits at a corner point of the feasible region. Linear objectives create parallel level lines such as ; as you slide that line toward larger profit, the last point still touching the feasible region is where the maximum occurs. Usually that last touch is a single vertex. If the objective line is parallel to a boundary edge, every point on that edge can be optimal — but there is still at least one optimal corner. That is why you check vertices instead of every point in the shaded region.
Full worked example: solve graphically
A shop makes products and . Profit per unit is for and for . Machine time allows at most hours, with using hour and using hours each. Assembly allows at most hours, with each unit of either using hour.
Let be units of and units of . Maximize
subject to
The feasible corner points are , , , and . The point comes from solving the boundary equations and ; subtracting gives , then .
Evaluate the objective at each corner:
- At ,
- At ,
- At ,
- At ,
So the maximum profit is at . That is the whole graphical method in one sentence: graph the region, find the corners, evaluate the objective.
Simplex method intuition
The graphical method is practical only with two variables, or sometimes three if you can picture a 3D region. Real optimization problems often carry many variables, so drawing the feasible region stops being realistic. The simplex method keeps the same corner-point logic but does it algebraically: in broad terms it moves from one feasible corner point to an adjacent one that improves the objective, and it halts when no adjacent move gives a better value. A clean mental model:
- Graphical method: see the corner points
- Simplex method: navigate the corner points without drawing them
That is the intuition, not the full algorithm — the actual procedure uses a tableau or equivalent algebraic form to decide which variable enters and which leaves at each step. The model is only as good as its assumptions, too: if the real relationship is far from linear, or the variables must be integers, a plain linear program may be just a starting point.
Where each step traps people, plus a self-check
A frequent trap is confusing feasible with optimal: a point can satisfy every constraint and still not optimize the objective — feasible only means allowed. Another is forgetting nonnegativity; leaving out or can change the problem when the variables are quantities. A third is assuming answers must be whole numbers — plain linear programming permits fractions, so counts like trucks or workers need an integer-programming model. A fourth is assuming every problem has a finite best: some programs are infeasible (no point satisfies all constraints) and others are unbounded (the objective improves without limit). And graphing stops being the right tool once there are many variables.
For your own pass, take a small word problem with two products, two resource limits, and a profit function. Define the variables, graph the constraints, and test the corner points. Once that clicks, the simplex method reads as the same logic extended to higher dimensions.
Frequently Asked Questions
- What is linear programming?
- Linear programming is a method for finding the best value of a linear objective, such as maximum profit or minimum cost, subject to linear constraints. The set of points satisfying every constraint is called the feasible region, and the problem asks which feasible point gives the best objective value.
- Why does the graphical method only check corner points?
- Because of a key fact about linear programs: if an optimal solution exists, at least one optimal solution occurs at a corner point of the feasible region. That is why the graphical method draws each constraint, finds the feasible region, and evaluates the objective only at the vertices instead of checking every point in the shaded area.
- When should you not use linear programming?
- Use linear programming only when both the objective and the constraints are linear. If the relationship bends, curves, or depends on products of variables such as xy, the model is not a linear program. Checking linearity first prevents applying corner-point reasoning to a problem where it does not hold.
- What is the feasible region in linear programming?
- The feasible region is the set of all points that satisfy every constraint at the same time. In a two-variable problem you can see it as the overlap of the regions allowed by each inequality on the coordinate plane. Each point inside is a valid solution, and the objective function assigns a value to each one.
- How is the simplex method related to the graphical method?
- Both rely on the same corner-point idea. The graphical method works for two decision variables, where you can draw the feasible region and check its vertices directly. For larger problems with many variables, the simplex method applies the same vertex-checking logic algebraically instead of geometrically.
Need help with a problem?
Upload your question and get a verified, step-by-step solution in seconds.
Open GPAI Solver →