• Foundation
  • About 14 min
  • 5 practice questions

Linear inequalities and half-planes

Read an inequality such as 2x + 3y ≤ 12 as a region of the plane, draw its boundary line from the intercepts, pick the correct side with a test point and tell solid boundaries from dashed ones.

If something looks wrong, please tell us.

Linear programming is the mathematics of making the best choice when resources are limited: how many tables and chairs a workshop should make, which mix of foods gives enough nutrition at the lowest cost, how goods should be sent from godowns to shops. Every limit in such a problem is written as a linear inequality in two variables. Before we can choose the best plan we must be able to see what an inequality looks like on a graph. This lesson builds that skill from zero.

From an equation to an inequality

The equation 2x + 3y = 12 is a straight line. That line divides the whole plane into two parts called half-planes. Every point on one side makes 2x + 3y smaller than 12, and every point on the other side makes it larger than 12. So the inequality 2x + 3y ≤ 12 describes the line together with one of the two half-planes. Graphing an inequality means two jobs: draw the line, then decide which side to shade.

Drawing the boundary line from its intercepts

The quickest way to draw a line ax + by = c is to find where it cuts the axes. Put x = 0 to get the y-intercept and y = 0 to get the x-intercept. For 2x + 3y = 12: x = 0 gives 3y = 12, so y = 4; y = 0 gives 2x = 12, so x = 6. Join (6, 0) and (0, 4). If the line passes through the origin (c = 0), the intercept method gives only one point, so find a second point by choosing any x, for example x = 1.

Choosing the side: the test point

Pick any point that is not on the line and substitute it. If the inequality is true there, shade the side containing that point; if it is false, shade the other side. The origin (0, 0) is the easiest test point because every term becomes zero. For 2x + 3y ≤ 12, the origin gives 0 ≤ 12, which is true, so the region is the side of the line containing the origin. When the line passes through the origin you must use another point, such as (1, 0) or (0, 1).

Five inequalities and their half-planes
InequalityBoundary lineTest pointResultRegion
2x + 3y ≤ 12through (6, 0) and (0, 4)(0, 0): 0 ≤ 12trueorigin side, line included
x + y ≥ 5through (5, 0) and (0, 5)(0, 0): 0 ≥ 5falseside away from the origin, line included
y ≤ 2xthrough (0, 0) and (1, 2)(1, 0): 0 ≤ 2trueside containing (1, 0), below the line
x ≤ 4vertical line x = 4(0, 0): 0 ≤ 4trueleft of the line
y ≥ 1horizontal line y = 1(0, 0): 0 ≥ 1falseabove the line

Solid or dashed boundary

With ≤ or ≥ the points on the line satisfy the inequality, so the line is drawn solid and belongs to the region. With < or > the line is excluded and is drawn dashed. The constraints of linear programming problems almost always use ≤ and ≥, because a resource can be used up exactly.

Non-negativity: x ≥ 0 and y ≥ 0

x ≥ 0 is the half-plane to the right of the y-axis (axis included) and y ≥ 0 is the half-plane above the x-axis. Together they give the first quadrant. In real problems x and y count things such as tables or kilograms, which cannot be negative, so these two conditions appear in nearly every problem.

Worked example 1: 3x + 4y ≥ 24 with x ≥ 0, y ≥ 0

Intercepts: x = 0 gives y = 6; y = 0 gives x = 8. Draw the solid line through (8, 0) and (0, 6). Test the origin: 0 ≥ 24 is false, so the region is the side away from the origin. Combined with x ≥ 0 and y ≥ 0, the region is the part of the first quadrant on or beyond the line, and it stretches without end to the right and upwards. Check with a point that should be inside: (8, 6) gives 24 + 24 = 48 ≥ 24, true.

Worked example 2: is (2, 3) in the region x − 2y ≤ −3?

Substitute: 2 − 2 × 3 = 2 − 6 = −4, and −4 ≤ −3 is true, so yes. To see the region, the boundary x − 2y = −3 cuts the x-axis at x = −3 and the y-axis at y = 3/2. The origin gives 0 ≤ −3, false, so the region is the side of the line not containing the origin, and (2, 3) lies on that side, as it should.

Worked example 3: writing the inequality from a picture

A region is the side of the line through (4, 0) and (0, 2) that contains the origin, with the line included. Write it as an inequality. A line with intercepts 4 and 2 is x/4 + y/2 = 1; multiplying by 4 gives x + 2y = 4. The origin gives 0, which is less than 4, so the origin side is x + 2y ≤ 4. Always confirm: (4, 0) gives 4 and (0, 2) gives 4, so both points lie on the line.

To graph ax + by ≤ c: draw ax + by = c through its intercepts (solid for ≤ or ≥, dashed for < or >), substitute a test point not on the line, usually (0, 0), and shade the side where the inequality is true.

Key takeaways: a linear inequality in x and y is a half-plane. Find the boundary from its intercepts, test a point not on the line, and shade the true side. x ≥ 0 and y ≥ 0 together keep you in the first quadrant. A point on a solid boundary satisfies the inequality.

Check your understanding

  1. 1. Which of these points lies in the region 2x + y ≤ 8?

    1. (5, 0)
    2. (3, 3)
    3. (2, 4)
    4. (4, 1)
    Show answer

    Answer: C. Substitute each point: (5, 0) gives 10, (3, 3) gives 9, (4, 1) gives 9, all more than 8. (2, 4) gives 4 + 4 = 8, and 8 ≤ 8 is true because the boundary line is included.

  2. 2. Where does the boundary line of 5x + 2y ≥ 20 cut the axes?

    1. (4, 0) and (0, 10)
    2. (5, 0) and (0, 2)
    3. (10, 0) and (0, 4)
    4. (4, 0) and (0, 5)
    Show answer

    Answer: A. Put y = 0: 5x = 20, so x = 4. Put x = 0: 2y = 20, so y = 10. The intercepts are (4, 0) and (0, 10). Dividing 20 by the wrong coefficient gives the swapped pair (10, 0) and (0, 4).

  3. 3. For the inequality x + y ≥ 6, putting the origin into it shows that the region is:

    1. the side of the line x + y = 6 containing the origin
    2. the side of the line x + y = 6 not containing the origin, with the line
    3. only the points on the line x + y = 6
    4. the whole plane
    Show answer

    Answer: B. At (0, 0): 0 + 0 ≥ 6 is false, so the origin is not in the region. The region is the other side of the line, and because the sign is ≥ the line itself is included.

  4. 4. Which inequality describes the side of the line through (3, 0) and (0, 6) that contains the origin, with the line included?

    1. 2x + y ≥ 6
    2. x + 2y ≤ 6
    3. x + 2y ≥ 6
    4. 2x + y ≤ 6
    Show answer

    Answer: D. The line with intercepts 3 and 6 is x/3 + y/6 = 1, that is 2x + y = 6 (check: (3, 0) gives 6 and (0, 6) gives 6). The origin gives 0, which is less than 6, so the origin side is 2x + y ≤ 6. The line x + 2y = 6 passes through (6, 0) and (0, 3), a different line.

  5. 5. To decide which side of y ≤ 3x to shade, which test point can be used?

    1. (1, 0)
    2. (0, 0)
    3. (1, 3)
    4. (2, 6)
    Show answer

    Answer: A. The line y = 3x passes through (0, 0), (1, 3) and (2, 6), so those points lie on the boundary and cannot tell you the side. (1, 0) is not on the line: 0 ≤ 3 is true, so shade the side containing (1, 0), the side below the line.

Privacy · Terms · Refunds · Delivery