HomeGraph Linear Programming Constraints and Shade the Feasible Region Free original lessons
Graph Linear Programming Constraints and Shade the Feasible Region
Learn to graph inequality constraints, shade the feasible region, find vertices, and test an objective function to solve a linear programming problem.
Free lesson
Four exercises
Worked answers
Algebra and Function Practice
Linear programming uses systems of linear inequalities to model limits such as time, materials, or budget. The solution lies in the feasible region, the overlap of all shaded constraint areas. By graphing each boundary line, shading the correct side, and testing vertices in the objective function, you can find the best value. This lesson walks through graphing, shading, vertex identification, and evaluation with clear conventions and checks.
Practice materials: Printable downloads are not available for this lesson yet. Use the instructions and four exercises below.
Graph Each Constraint Boundary
Rewrite each inequality as an equation to draw its boundary line. Use intercepts or slope-intercept form. For example, 2x + 3y = 12 has intercepts (6,0) and (0,4). Plot these points and draw a solid line if the inequality includes equality (≤ or ≥), or a dashed line if it is strict (< or >).
Label each line with its equation. Keep the graph large enough that intersection points are readable. Use a ruler and consistent scale on both axes. If the problem has nonnegativity constraints x ≥ 0 and y ≥ 0, the feasible region is limited to the first quadrant.
- Write each inequality as an equation for the boundary.
- Find two points on each line using intercepts or a table.
- Draw solid lines for ≤ or ≥ and dashed lines for < or >.
- Label each boundary line clearly.
Shade and Intersect the Feasible Region
Test a point not on the boundary, often (0,0), to decide which side to shade. If the test point makes the inequality true, shade the side containing it. Repeat for every constraint. The feasible region is the overlap of all shaded sides, so shade it more darkly or use a distinct pattern.
When constraints include x ≥ 0 and y ≥ 0, the feasible region lies in the first quadrant. If the overlap is empty, the system has no feasible solution. Check that the shaded region satisfies every inequality by testing one interior point.
- Choose a test point such as (0,0) if it is not on the line.
- Substitute the test point into the inequality.
- Shade the side where the inequality is true.
- Darken the common overlap of all shaded sides.
Find Vertices and Test the Objective Function
The vertices of the feasible region are the corner points where boundary lines intersect. Solve pairs of boundary equations to find exact coordinates. Include intercepts on the axes when they are corners. Make a table listing each vertex and evaluate the objective function at each point.
The optimal value is the largest or smallest result, depending on whether the problem asks to maximize or minimize. If two vertices give the same optimal value, every point on the segment between them also gives that value. State the optimal vertex and the objective value clearly.
- List all corner points of the shaded region.
- Solve pairs of boundary equations for exact coordinates.
- Evaluate the objective function at each vertex.
- Compare results and state the optimal vertex and value.
Worked example
A workshop makes two products, A and B. Each unit of A uses 2 hours of labor and 1 unit of material; each unit of B uses 1 hour of labor and 2 units of material. There are 8 labor hours and 8 material units available. Profit is 3 per unit of A and 2 per unit of B. Maximize profit subject to 2x + y ≤ 8, x + 2y ≤ 8, x ≥ 0, y ≥ 0, where x is units of A and y is units of B.
Worked answer
Graph the lines 2x + y = 8 and x + 2y = 8. Test (0,0): both inequalities are true, so shade toward the origin. The feasible region is bounded by the axes and the two lines. Vertices: (0,0), (4,0), (0,4), and the intersection of 2x + y = 8 and x + 2y = 8. Solving gives x = 8/3 and y = 8/3. Evaluate P = 3x + 2y: at (0,0), P = 0; at (4,0), P = 12; at (0,4), P = 8; at (8/3, 8/3), P = 3(8/3) + 2(8/3) = 8 + 16/3 = 40/3 ≈ 13.33. The maximum profit is 40/3 at (8/3, 8/3).
Four practice exercises
Exercise 1
Maximize P = 2x + 3y subject to x + y ≤ 4, x ≥ 0, y ≥ 0. Graph the constraints, shade the feasible region, and find the optimal vertex and value.
Show answer and check
Vertices: (0,0), (4,0), (0,4). P values: 0, 8, 12. Maximum is 12 at (0,4).
Why: The line x + y = 4 has intercepts (4,0) and (0,4). Testing (0,0) gives 0 ≤ 4, so shade toward the origin. The feasible region is the triangle with vertices (0,0), (4,0), (0,4). Evaluate P at each vertex: (0,0) gives 0; (4,0) gives 8; (0,4) gives 12. The largest value is 12.
Check: Test an interior point such as (1,1): it satisfies x + y ≤ 4. Confirm each vertex satisfies all constraints. Recalculate P at (0,4): 2(0) + 3(4) = 12.
Exercise 2
Minimize C = 4x + y subject to x + y ≥ 3, x ≤ 4, y ≤ 3, x ≥ 0, y ≥ 0. Graph the constraints, shade the feasible region, and find the optimal vertex and value.
Show answer and check
Vertices: (0,3), (3,0), (4,0), and (4,3). C values: at (0,3), C = 3; at (3,0), C = 12; at (4,0), C = 16; at (4,3), C = 19. Minimum is 3 at (0,3).
Why: The line x + y = 3 has intercepts (3,0) and (0,3). Testing (0,0) gives 0 ≥ 3, which is false, so shade away from the origin. The constraints x ≤ 4 and y ≤ 3 bound the region on the right and top. The feasible region is a polygon with vertices (0,3), (3,0), (4,0), and (4,3). Evaluate C at each: (0,3) gives 3; (3,0) gives 12; (4,0) gives 16; (4,3) gives 19. The smallest value is 3.
Check: Test (1,2): 1 + 2 ≥ 3 is true, and 1 ≤ 4, 2 ≤ 3 hold. Confirm (0,3) satisfies all constraints. Recalculate C at (0,3): 4(0) + 3 = 3.
Exercise 3
Maximize P = x + 2y subject to 2x + y ≤ 6, x + 2y ≤ 6, x ≥ 0, y ≥ 0. Graph the constraints, shade the feasible region, and find the optimal vertex and value.
Show answer and check
Vertices: (0,0), (3,0), (0,3), and (2,2). P values: 0, 3, 6, 6. Maximum is 6, achieved at both (0,3) and (2,2), and along the segment between them.
Why: The lines 2x + y = 6 and x + 2y = 6 intersect at (2,2). Testing (0,0) satisfies both inequalities, so shade toward the origin. The feasible region is a quadrilateral with vertices (0,0), (3,0), (2,2), (0,3). Evaluate P: (0,0) gives 0; (3,0) gives 3; (2,2) gives 6; (0,3) gives 6. The maximum is 6, with a tie along the edge from (0,3) to (2,2).
Check: Test (1,1): 2(1)+1=3 ≤ 6 and 1+2=3 ≤ 6. Confirm the intersection by solving 2x + y = 6 and x + 2y = 6: subtract to get x = y, then 3x = 6, so x = 2, y = 2. Recalculate P at (2,2): 2 + 4 = 6.
Exercise 4
Minimize C = 3x + 2y subject to x + y ≥ 2, x + 3y ≥ 3, x ≥ 0, y ≥ 0. Graph the constraints, shade the feasible region, and find the optimal vertex and value.
Show answer and check
Vertices: (0,2), (3,0), and (1.5,0.5). C values: at (0,2), C = 4; at (3,0), C = 9; at (1.5,0.5), C = 5.5. Minimum is 4 at (0,2).
Why: The line x + y = 2 has intercepts (2,0) and (0,2). Testing (0,0) gives 0 ≥ 2, false, so shade away from the origin. The line x + 3y = 3 has intercepts (3,0) and (0,1). Testing (0,0) gives 0 ≥ 3, false, so shade away from the origin. The feasible region is unbounded, with vertices (0,2), (3,0), and the intersection of x + y = 2 and x + 3y = 3. Solving gives x = 1.5, y = 0.5. Evaluate C: (0,2) gives 4; (3,0) gives 9; (1.5,0.5) gives 5.5. The minimum is 4.
Check: Test (1,1): 1+1=2 ≥ 2 and 1+3=4 ≥ 3. Confirm the intersection by substituting x = 2 - y into x + 3y = 3: 2 - y + 3y = 3, so 2y = 1, y = 0.5, x = 1.5. Recalculate C at (0,2): 3(0) + 2(2) = 4.
Common mistakes
- Shading the wrong side of a boundary line. Test a point not on the line, such as (0,0), and shade the side where the inequality is true.
- Using a dashed line for ≤ or ≥. Use a solid line when equality is included; use dashed only for strict inequalities.
- Testing a point outside the feasible region as a vertex. Only corner points of the shaded overlap are vertices; check that each point satisfies every constraint.
- Forgetting nonnegativity constraints. Include x ≥ 0 and y ≥ 0 when the context requires nonnegative quantities, limiting the region to the first quadrant.
Self-check rubric
- Boundary lines are drawn accurately with correct solid or dashed style.
- Shading is applied to the correct side of each constraint.
- The feasible region is clearly identified as the overlap.
- All vertices are listed with exact coordinates.
- The objective function is evaluated at every vertex.
- The optimal vertex and value are stated with correct units or context.
- Work is organized and readable, with labels and a consistent scale.
Questions and answers
How do I know which side to shade?
Substitute a test point not on the boundary into the inequality. If the result is true, shade the side containing that point.
Do I need to test every vertex?
Yes, evaluate the objective function at every vertex of the feasible region, then compare the results.
What if the feasible region is unbounded?
An unbounded region may still have an optimal vertex, but check whether the objective grows without limit in the open direction.
Can two vertices give the same optimal value?
Yes. If two adjacent vertices tie, every point on the segment between them gives the same optimal value.