Skip to main content
Mathematics LibreTexts

7.8: Graphing Linear Inequalities in Two Variables

  • Page ID
    60039
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Location of Solutions

    In our study of linear equations in two variables, we observed that all the solutions to the equation, and only the solutions to the equation, were located on the graph of the equation. We now wish to determine the location of the solutions to linear inequalities in two variables. Linear inequalities in two variables are inequalities of the forms:

    \(\begin{aligned}
    ax + by \le c & ax + by \ge c\\
    ax + by < c & ax + by > c
    \end{aligned}\)

    Half-Planes

    A straight line drawn through the plane divides the plan into two half-planes

    Boundary Line

    The straight line is called the boundary line.

    A straight line dividing an xy plane in two half-planes.

    Solution to an Inequality in Two Variables

    Recall that when working with linear equations in two variables, we observed that ordered pairs that produced true statements when substituted into an equation were called solutions to that equation. We can make a similar statement for inequalities in two variables. We say that an inequality in two variables has a solution when a pair of values has been found such that when these values are substituted into the inequality a true statement results.

    The Location of Solutions in the Plane

    As with equations, solutions to linear inequalities have particular locations in the plane. All solutions to a linear inequality in two variables are located in one and only in one entire half-plane. For example, consider the inequality

    \(2x + 3y \le 6\)

    A straight line in an xy plane passing through two points with coordinates  zero, two and three, zero. Equation of this line is two x plus three y equal to six. Points lying in the shaded region below the line are the solutions of inequality two x plus three y less than equal to six.

    All solutions to the inequality \(2x + 3y \le 6\) lie in the shaded half-plane.

    Point \(A(1, -1)\) is a solution since:

    \(\begin{aligned}
    2x + 3y \le 6\\
    2(1) + 3(-1) \le 6?\\
    2 - 3 \le 6?
    -1 \le 6. \text{True.}
    \end{aligned}\)

    Point \(B(2, 5)\) is not a solution since:

    \(\begin{aligned}
    2x + 3y \le 6\\
    2(2) + 3(5) \le 6?\\
    4 + 15 \le 6?
    19 \le 6. \text{False}
    \end{aligned}\)

    Method of Graphing

    The method of graphing linear inequalities in two variables is as follows:

    1. Graph the boundary line (consider the inequality as an equation, that is, replace the inequality sign with an equal sign).
      1. If the inequality is \(≤\) or \(≥\), draw the boundary line solid. This means that points on the line are solutions and are part of the graph.
      2. If the inequality is \(<\) or \(>\), draw the boundary line dotted. This means that points on the line are not solutions and are not part of the graph.
    2. Determine which half-plane to shade by choosing a test point.
      1. If, when substituted, the test point yields a true statement, shade the half-plane containing it.
      2. If, when substituted, the test point yields a false statement, shade the half-plane on the opposite side of the boundary line.

    Sample Set A

    Example \(\PageIndex{1}\)

    Graph \(3x - 2y \ge -4\).

    1. Graph the boundary line. The inequality is \(\ge\) so we'll draw the line solid. Consider the inequality as an equation.

    \(3x - 2y = -4\)

    \(x\) \(y\) \((x, y)\)

    \(0\)

    \(\dfrac{-4}{3}\)

    \(2\)

    \(0\)

    \((0, 2)\)

    (\(frac{-4}{3}, 0)\)

    A graph of a line passing through two points with coordinates zero, two and negative four upon three,  zero. Boundary line points on this line are included in solutions of inequality.

    2. Choose a test point. The easiest one is \((0, 0)\). Substitute \((0, 0)\) into the original inequality.

    \(\begin{array}{flushleft}
    3x - 2y \ge -4\\
    3(0) - 2(0) \ge -4?\\
    0 - 0 \ge -4?
    0 \ge -4. \text{ True}
    \end{array}\)

    Shade the half-plane containing \((0, 0)\).

    A straight line in an xy plane passing through two points with coordinates zero, two and negative four upon three, zero. Points lying in the region to the right of the line are solutions of the inequality and points lying  in the region left to the line are not solutions of the inequality. The test point zero, zero belongs to the shaded region.

    Example \(\PageIndex{2}\)

    Graph \(x + y - 3 < 0\)

    1. Graph the boundary line: \(x + y - 3 = 0\). The inequality is \( < \) so we'll draw the line dotted.

    A graph of a dashed line passing through two points with coordinates zero, three and three, zero. Boundary line points on this line are not included in the solutions of the inequality.

    2. Choose a test point, say \((0, 0)\).

    \(\begin{array}{flushleft}
    x + y - 3 < 0\\
    0 + 0 - 3 < 0?\\
    -3 < 0. \text{ True}
    \end{array}\)

    A dashed straight line in an xy plane passing through two points with coordinates zero, three and three, zero. The region to the left of the line is shaded. The test point zero, zero belongs to the shaded region.

    Example \(\PageIndex{3}\)

    Graph \(y \le 2x\).

    1. Graph the boundary line \(y = 2x\). The inequality is \(\le\), so we'll draw the line solid.

    A graph of a line passing through two points with coordinates zero, zero and one, two. Boundary line points on this line are included in the solutions of the inequality.

    2. Choose a test point, say \((0, 0)\).

    \(\begin{array}{flushleft}
    y \le 2x\\
    0 \le 2(0)?\\
    0 \le 0. \text{ True}
    \end{array}\)

    Shade the half-plane containing \((0, 0)\). We can't! \((0, 0)\) is right on the line! Pick another test point, say \((1, 6)\).

    \(\begin{array}{flushleft}
    y \le 2x\\
    6 \le 2(1)\\
    6 \le 2. \text{ False}
    \end{array}\)

    Shade the half-plane on the opposite side of the boundary line.

    A straight line in an xy plane passing through two points with coordinates zero, zero and one, two. Points lying in the region to the right of the line are solutions of the inequality and points lying  in the region left to the line are not solutions of the inequality.The test point zero, zero belongs to the shaded region where as another test point one, six does not belong to the shaded region.

    Example \(\PageIndex{4}\)

    Graph \(y > 2\).

    1. Graph the boundary line \(y = 2\). The inequality is \( >\) so we'll draw the line dotted.

    A graph of a dashed line parallel to x axis and passing through point with coordinates zero, two.

    2. We don't really need a test point. Where is \(y > 2\)? Above the line \(y = 2\)! Any point above the line clearly has a \(y\)-coordinate greater than \(2\)

    A dashed straight line in an xy plane parallel to x axis and passing through point with coordinates zero, two. The region above the line is shaded.

    Practice Set A

    Solve the following inequalities by graphing.

    Practice Problem \(\PageIndex{1}\)

    \(-3x + 2y \le 4\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    A straight line in an xy plane passing through two points with coordinates zero, two and two, five. The region to the right of the line is shaded.

    Practice Problem \(\PageIndex{2}\)

    \(x−4y<4\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    A dashed straight line in an xy plane passing through two points with coordinates zero, negative one and four, zero. The region above the line is shaded.

    Practice Problem \(\PageIndex{3}\)

    \(3x+y>0\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    A dashed straight line in an xy plane passing through two points with coordinates zero, zero and one, negative three. The region right to the line is shaded.

    Practice Problem \(\PageIndex{4}\)

    \(x≥1\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    A straight line in an xy plane parallel to the y-axis is passing through a point with coordinates one, zero. The region right to the line is shaded.

    Exercises

    Solve the inequalities by graphing.

    Exercise \(\PageIndex{1}\)

    \(y<x+1\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    A dashed line in an xy plane passing through two points with coordinates zero, one and negative one, zero. The region below the line is shaded.

    Exercise \(\PageIndex{2}\)

    \(x+y≤1\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Exercise \(\PageIndex{3}\)

    \(−x+2y+4≥0\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    A line in an xy plane passing through two points with coordinates zero, negative two and four, zero. The region above the line is shaded.

    Exercise \(\PageIndex{4}\)

    \(−x+5y−10<0\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Exercise \(\PageIndex{5}\)

    \(−3x+4y>−12\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    A dashed line in an xy plane passing through two points with coordinates zero, negative three and four, zero. The region above the line is shaded.

    Exercise \(\PageIndex{6}\)

    \(2x+5y−15≥0\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Exercise \(\PageIndex{7}\)

    \(y≤4\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    A line parallel to x-axis in an xy plane.The line crosses the y-axis at y equals four. The region below the line is shaded.

    Exercise \(\PageIndex{8}\)

    \(x≥2\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Exercise \(\PageIndex{9}\)

    \(x≤0\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    An xy-coordinate plane with the region to the left of the y-axis is shaded.

    Exercise \(\PageIndex{10}\)

    \(x−y<0\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Exercise \(\PageIndex{11}\)

    \(x+3y≥0\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Answer

    A line in an xy plane passing through two points with coordinates negative three, one and three, negative one. The region above the line is shaded.

    Exercise \(\PageIndex{12}\)

    \(−2x+4y>0\)

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Exercises for Review

    Exercise \(\PageIndex{13}\)

    Graph the inequality \(−3x+5≥−1\).

    A horizontal line with arrows on both ends.

    Answer

    A number line with arrows on each end, labeled from negative three to three, in increments of one. There is an open circle at two. A dark line is orginating from this circle, and heading towards the left of two.

    Exercise \(\PageIndex{14}\)

    Supply the missing word. The geometric representation (picture) of the solutions to an equation is called the of the equation.

    Exercise \(\PageIndex{15}\)

    Supply the denominator: \(m = \dfrac{y_2-y_1}{?}\)

    Answer

    \(m = \dfrac{y_2-y_1}{x_2-x_1}\)

    Exercise \(\PageIndex{16}\)

    Graph the equation \(y=−3x+2\).

    An xy-plane with gridlines, labeled negative five and five on the both axes.

    Exercise \(\PageIndex{17}\)

    Write the equation of the line that has slope \(4\) and passes through the point \((−1, 2)\).

    Answer

    \(y=4x+6\)


    This page titled 7.8: Graphing Linear Inequalities in Two Variables is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Denny Burzynski & Wade Ellis, Jr. (OpenStax CNX) .

    • Was this article helpful?