Plotting Linear Inequalities
What you will be able to do
Given one or more linear inequalities in two variables, the learner can draw each boundary line, determine which side the inequality allows by testing a point, and shade the set satisfying all of them together, including sign restrictions.
Orientation
An inequality describes a boundary and a side. Getting the boundary right and the side wrong produces a plausible region belonging to a different problem.
That second half is the reason this is a unit of its own. Placing a line is arithmetic, and its failures are usually visible: a mis-plotted intercept looks wrong. Choosing the side is a decision, and choosing it wrongly produces a tidy, plausible, entirely incorrect region that no subsequent step will question.
Everything downstream inherits the error. The feasible region is the intersection of these sides; the corners come from that region; the optimum comes from those corners. A single wrong side at the start produces a confident final answer to a problem nobody asked.
This unit assumes you know what a half-space is and can decide whether a given point satisfies a linear inequality.
Intuition
A boundary line and the side the inequality allows
An inequality is an equation plus a choice of side. The equation says where the boundary runs; the inequality says which way from it you may stand.
Why does testing one point settle an entire side? Because the quantity
That is also why the origin is the customary test point:
The failure mode is worth naming plainly. It is not that people cannot test a point. It is that they do not, because the sign of the inequality feels like it already says which way to shade. 'Less than' feels downward. It is downward often enough to build a habit and not often enough to trust.
Definition
Boundary, side, and the test point
To plot
The boundary line is
The allowed side is determined by a test point not on the line. Evaluate the inequality there. If it holds, the allowed side is the one containing the test point; if it fails, the allowed side is the other one.
The origin is a valid test point exactly when
A non-strict inequality (
Procedure
Drawing a system of inequalities
Write each constraint as an equation. Replace every inequality sign with an equals sign. These equations are the boundary lines; the inequalities will be reinstated when you choose sides.
Plot each boundary from its intercepts. Set one variable to zero and solve for the other, then repeat. Two points give the line. If a coefficient is zero, the boundary is vertical or horizontal instead.
Choose a test point for each constraint and evaluate it. Use the origin whenever the boundary does not pass through it, that is, whenever the right-hand side is nonzero. Otherwise pick any point that does not satisfy the boundary equation, substitute it and check that the two sides differ.
Record the verdict for each constraint before shading anything. Write down, for each one, whether the test point satisfied it and therefore which side is allowed. Doing this in writing rather than by eye is what prevents the error this unit exists to prevent.
Shade the intersection, not the union. A point is feasible only if it satisfies every constraint simultaneously. The region you want is what survives all of the restrictions together.
Include the sign restrictions. Treat
Verify with one interior point. Take a point well inside the shaded region and check it against every original inequality. One point satisfying all of them confirms the region is on the right side of every boundary.
Figure
Intercepts, a test point, and a corner found by solving
The procedure carried out on
Each boundary is placed by its intercepts:
What survives is the quadrilateral with corners
Example
Four constraints, one region
Plot the region defined by
First boundary.
Second boundary.
Sign restrictions.
The intersection. The surviving region is a quadrilateral with corners
Verification. Take the interior point
Worked example
A constraint that needs rearranging first
Problem. Plot
Goal. Draw the region, with particular care over the inequality direction.
Relevant principle. Multiplying or dividing an inequality by a negative number reverses its direction. Testing a point is immune to this, which is why the test is the safeguard rather than the rearrangement.
Step 1: the boundary.
Step 2: test the origin. The right-hand side is
Step 3: rearrange, and confirm the two agree. Multiplying through by
Test the origin in this form:
Step 4: what happens if the reversal is forgotten. Writing
Step 5: the region. With the sign restrictions, the allowed set is the part of the first quadrant on the origin's side of the line through
Check. Take
What did the work. The test point. It gave the same verdict in both algebraic forms, which is exactly the property that makes it a safeguard against the sign-reversal error.
Non-example
Ways the side goes wrong
Not a rule: 'less than shades below'. For
Not a valid test point: the origin on the boundary. For
Not the intersection: shading each constraint separately and taking whatever is covered. A point satisfying one constraint but not another is infeasible. The region is where all of the shadings overlap, not where any of them reaches.
Not optional: the sign restrictions. Omitting
Not a special case: a missing variable.
Contrast
Correct boundary, incorrect half-plane
Two errors are possible when plotting a constraint, and they are not equally visible.
A misplaced boundary is usually visible. Compute an intercept wrongly and the line sits somewhere the constraint cannot justify, cutting an axis beyond the bound it came from, or crossing another boundary far outside the quadrant. The drawing contradicts the arithmetic that produced it.
A wrong side does not. Consider
The consequence propagates silently. That triangle has corners, those corners get evaluated, one of them wins, and a specific optimum with a specific value is reported. Every step after the shading is performed correctly on incorrect input. Nothing downstream can detect it, because nothing downstream ever sees the original inequality again.
The safeguard is cheap and must be habitual. Test a point and write the verdict down, for every constraint, before shading. Then verify the finished region with one interior point checked against all the original inequalities. Two arithmetic checks, and together they close the only failure mode in this procedure that the picture cannot reveal.
Exercise
1. Plot
2. Plot
3. Rewrite
4. A classmate plots
5. Shade the region satisfying
What to carry forward
Plotting an inequality is two moves: draw the boundary from the equation, then decide the side by testing a point.
The boundary comes from the intercepts in the ordinary case, or from a single value when a coefficient is zero. The side comes from evaluating one point not on the line. The origin whenever the right-hand side is nonzero, since that makes the test immediate.
One test decides a whole side because the expression cannot change which side of
Two situations deserve deliberate care: an inequality multiplied or divided by a negative number, which reverses its direction while leaving the boundary untouched; and sign restrictions, which are constraints like any other and confine the region to the first quadrant when present.
The region is the intersection of every allowed side, not the union. Verify the finished drawing with one interior point checked against all the original inequalities. The wrong-side error is invisible in its own output, and this check is what catches it before anything downstream inherits it.