Math Lab
Home/Class XI/Ch 5/Linear inequalities in two variables

Linear inequalities in two variables

A linear inequality in two variables, like 2x+3y<122x + 3y < 12, has not finitely many solutions but a region of the plane , every (x,y)(x, y) that satisfies the inequality. The region is always a half-plane: the line ax+by=cax + by = c divides the plane into two halves, and the inequality picks one.

Definitions and notation

A linear inequality in two variables has the form ax+bycax + by \lessgtr c where \lessgtr stands for <,,><, \le, >, or \ge, and a,b,ca, b, c are real with (a,b)(0,0)(a, b) \ne (0, 0).

The boundary line is ax+by=cax + by = c. The boundary is included (drawn solid) for ,\le, \ge and excluded (drawn dashed) for <,><, >.

How to graph

Step 1. Draw the boundary line ax+by=cax + by = c. Use a solid line if the inequality is non-strict, dashed if strict.

Step 2. Pick a test point not on the line , usually (0,0)(0, 0) 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 ax+by=cax + by = c divides R2\mathbb{R}^2 into two open half-planes: H+={(x,y):ax+by>c},H={(x,y):ax+by<c}.H_+ = \{(x, y) : ax + by > c\}, \qquad H_- = \{(x, y) : ax + by < c\}.

For >0> 0: H+H_+ is the side where the linear function increases past cc; for a,ba, b both positive, H+H_+ is the upper-right side.

Worked examples

Example 1. Graph 2x+y62x + y \le 6.

Boundary: 2x+y=62x + y = 6, i.e. y=2x+6y = -2x + 6. Intercepts: (0,6)(0, 6) and (3,0)(3, 0). Solid line.

Test (0,0)(0, 0): 060 \le 6 ✓. Shade the side containing the origin , below and to the left of the line.

Example 2. Graph x2y>4x - 2y > -4.

Boundary: x2y=4x - 2y = -4, i.e. y=(x+4)/2y = (x + 4)/2. Intercepts: (0,2)(0, 2) and (4,0)(-4, 0). Dashed line.

Test (0,0)(0, 0): 0>40 > -4 ✓. Shade the side containing the origin , below and to the right.

Example 3. Graph y<2xy < 2x.

Boundary y=2xy = 2x through origin. Dashed line. Cannot use (0,0)(0, 0) as a test point (it lies on the line). Use (1,0)(1, 0): 0<20 < 2 ✓. Shade the side containing (1,0)(1, 0) , below the line.

Example 4. Graph x0x \ge 0 and y0y \ge 0.

Each is a half-plane. x0x \ge 0: right half-plane (including yy-axis). y0y \ge 0: upper half-plane (including xx-axis). They are independent.

Example 5 (harder). A factory produces two products AA and BB. Product AA needs 22 hours of labour and 11 hour of machine time per unit; product BB needs 11 hour of labour and 11 hour of machine time. The factory has at most 4040 hours of labour and 3030 hours of machine time per day. Let x,yx, y be the number of units of A,BA, B produced. Express the constraints as inequalities and describe the region of feasible (x,y)(x, y).

Labour: 2x+y402x + y \le 40. Machine: x+y30x + y \le 30. Non-negativity: x0,y0x \ge 0, y \ge 0.

The feasible region is the intersection of four half-planes. To sketch:

  • 2x+y402x + y \le 40: boundary through (20,0)(20, 0) and (0,40)(0, 40).
  • x+y30x + y \le 30: boundary through (30,0)(30, 0) and (0,30)(0, 30).
  • x,y0x, y \ge 0: first quadrant.

The two lines intersect at 2x+y=402x + y = 40 and x+y=30x + y = 30: subtract, x=10x = 10, then y=20y = 20. So (10,20)(10, 20) is a vertex.

The feasible region is a quadrilateral with vertices (0,0),(20,0),(10,20),(0,30)(0, 0), (20, 0), (10, 20), (0, 30).

Try it yourself

  1. Graph x+y4x + y \le 4.
  2. Graph 2xy>22x - y > 2.
  3. Graph yx2y \ge x^2? (Not linear; skip , choose another.) Instead graph yx+3y \ge x + 3.
  4. Graph x3y6x - 3y \le 6.
  5. Graph y>1y > -1.
  6. Graph x4x \le 4.
  7. Graph y<3x+2y < 3x + 2.
  8. Graph the system {x+y5,xy1}\{x + y \le 5, x - y \le 1\} (intersection of two half-planes).
  9. Graph {x0,y0,x+2y6}\{x \ge 0, y \ge 0, x + 2y \le 6\}.
  10. Identify which half-plane corresponds to 3x+4y123x + 4y \ge 12 , above or below the line through (4,0),(0,3)(4, 0), (0, 3)?
  11. Find the vertices of the region {x0,y0,2x+y10,x+2y8}\{x \ge 0, y \ge 0, 2x + y \le 10, x + 2y \le 8\}.
  12. Describe the region {x1,y1}\{|x| \le 1, |y| \le 1\} , it is a square.

Pitfalls / Tricks

  • The boundary line is solid for ,\le, \ge 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.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Two variables
6 questions · pick the best answer
Q1

Q2

Q3

Q4

Q5

Q6