Linear inequalities in two variables
A linear inequality in two variables, like , has not finitely many solutions but a region of the plane , every that satisfies the inequality. The region is always a half-plane: the line divides the plane into two halves, and the inequality picks one.
Definitions and notation
A linear inequality in two variables has the form where stands for , or , and are real with .
The boundary line is . The boundary is included (drawn solid) for and excluded (drawn dashed) for .
How to graph
Step 1. Draw the boundary line . Use a solid line if the inequality is non-strict, dashed if strict.
Step 2. Pick a test point not on the line , usually if it is not on the line , and substitute into the inequality.
Step 3. If the test point satisfies the inequality, shade the side of the line containing it. Otherwise shade the other side.
That shaded region is the solution.
The two half-planes
The line divides into two open half-planes:
For : is the side where the linear function increases past ; for both positive, is the upper-right side.
Worked examples
Example 1. Graph .
Boundary: , i.e. . Intercepts: and . Solid line.
Test : ✓. Shade the side containing the origin , below and to the left of the line.
Example 2. Graph .
Boundary: , i.e. . Intercepts: and . Dashed line.
Test : ✓. Shade the side containing the origin , below and to the right.
Example 3. Graph .
Boundary through origin. Dashed line. Cannot use as a test point (it lies on the line). Use : ✓. Shade the side containing , below the line.
Example 4. Graph and .
Each is a half-plane. : right half-plane (including -axis). : upper half-plane (including -axis). They are independent.
Example 5 (harder). A factory produces two products and . Product needs hours of labour and hour of machine time per unit; product needs hour of labour and hour of machine time. The factory has at most hours of labour and hours of machine time per day. Let be the number of units of produced. Express the constraints as inequalities and describe the region of feasible .
Labour: . Machine: . Non-negativity: .
The feasible region is the intersection of four half-planes. To sketch:
- : boundary through and .
- : boundary through and .
- : first quadrant.
The two lines intersect at and : subtract, , then . So is a vertex.
The feasible region is a quadrilateral with vertices .
Try it yourself
- Graph .
- Graph .
- Graph ? (Not linear; skip , choose another.) Instead graph .
- Graph .
- Graph .
- Graph .
- Graph .
- Graph the system (intersection of two half-planes).
- Graph .
- Identify which half-plane corresponds to , above or below the line through ?
- Find the vertices of the region .
- Describe the region , it is a square.
Pitfalls / Tricks
- The boundary line is solid for and dashed for . Always indicate.
- Choose a test point off the line. The origin is usually convenient.
- Never confuse (above) with (right of) , it depends on the orientation of the line.
- Insight. A linear inequality in two variables divides the plane into two halves. A system of such inequalities carves out a polygon (or unbounded polygonal region) , the feasible region of linear programming.