Skip to main content
Mathematics LibreTexts

13.2.4: Graphing Linear Inequalities

  • Page ID
    70406
  • \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    Learning Objectives
    • Determine whether an ordered pair is a solution to an inequality.
    • Graph an inequality in two variables.

    Introduction

    Linear inequalities can be graphed on a coordinate plane. The solutions for a linear inequality are in a region of the coordinate plane. A boundary line, which is the related linear equation, serves as the boundary for the region. You can use a visual representation to figure out what values make the inequality true—and also which ones make it false. Let’s study inequalities by returning to the coordinate plane.

    Linear Inequalities as Regions

    Linear inequalities are different than linear equations, although you can apply what you know about equations to help you understand inequalities. Inequalities and equations are both math statements that compare two values. Equations use the symbol =; inequalities will be represented by the symbols \(\ <, \leq,>, \text { and } \geq\).

    One way to visualize two-variable inequalities is to plot them on a coordinate plane. Here is what the inequality \(\ x>y\) looks like. The solution is a region, which is shaded.

    Screen Shot 2021-06-28 at 2.53.13 PM.png

    There are a few things to understand here. First, the dashed red boundary line is the graph of the related linear equation \(\ x=y\). Next, the light red region that is to the right of the line (excluding the line \(\ x=y\)) represents the entire set of solutions for the inequality \(\ x>y\). Remember how all points on a line are solutions to the linear equation of the line? Well, all points in a region are solutions to the linear inequality representing that region.

    Let’s think about it for a moment—if \(\ x>y\), then a graph of \(\ x>y\) will show all ordered pairs \(\ (x, y)\) for which the x-coordinate is greater than the y-coordinate.

    The graph below shows the region \(\ x>y\) as well as some ordered pairs on the coordinate plane. Look at each ordered pair. Is the x-coordinate greater than the y-coordinate? Does the ordered pair sit inside or outside of the shaded region?

    Screen Shot 2021-06-28 at 3.32.46 PM.png

    The ordered pairs \(\ (4,0)\) and \(\ (0,-3)\) lie inside the shaded region. In these ordered pairs, the x-coordinate is larger than the y-coordinate. These ordered pairs are in the solution set of the equation \(\ x>y\).

    The ordered pairs \(\ (-3,3)\) and \(\ (2,3)\) are outside of the shaded area. In these ordered pairs, the x-coordinate is smaller than the y-coordinate, so they are not included in the set of solutions for the inequality.

    The ordered pair \(\ (-2,-2)\) is on the boundary line. It is not a solution as -2 is not greater than -2. However, had the inequality been \(\ x \geq y\) (read as "\(\ x\) is greater than or equal to \(\ y\)"), then \(\ (-2,-2)\) would have been included (and the line would have been represented by a solid line, not a dashed line).

    Let’s take a look at one more example: the inequality \(\ 3 x+2 y \leq 6\). The graph below shows the region of values that makes this inequality true (shaded red), the boundary line \(\ 3 x+2 y=6\), as well as a handful of ordered pairs. The boundary line is solid this time, because points on the boundary line \(\ 3 x+2 y=6\) will make the inequality \(\ 3 x+2 y \leq 6\) true.

    Screen Shot 2021-06-28 at 3.52.02 PM.png

    As you did with the previous example, you can substitute the x- and y-values in each of the \(\ (x, y)\) ordered pairs into the inequality to find solutions. While you may have been able to do this in your head for the inequality \(\ x>y\), sometimes making a table of values makes sense for more complicated inequalities.

    Ordered Pair Makes the inequality \(\ 3 x+2 y \leq 6\) a true statement Makes the inequality \(\ 3 x+2 y \leq 6\) a false statement
    \(\ (-5,5)\) \(\ \begin{array}{c}
    3(-5)+2(5) \leq 6 \\
    -15+10 \leq 6 \\
    \color{green}-5 \leq 6
    \end{array}\)
    \(\ (-2,-2)\) \(\ \begin{array}{c}
    3(-2)+2(-2) \leq 6 \\
    -6+(-4) \leq 6 \\
    \color{green}-10 \leq 6
    \end{array}\)
    \(\ (2,3)\) \(\ \begin{array}{c}
    3(2)+2(3) \leq 6 \\
    6+6 \leq 6 \\
    \color{red}12 \leq 6
    \end{array}\)
    \(\ (2,0)\) \(\ \begin{array}{c}
    3(2)+2(0) \leq 6 \\
    6+0 \leq 6 \\
    \color{green}6 \leq 6
    \end{array}\)
    \(\ (4,-1)\) \(\ \begin{array}{c}
    3(4)+2(-1) \leq 6 \\
    12+(-2) \leq 6 \\
    \color{red}10 \leq 6
    \end{array}\)

    If substituting \(\ (x, y)\) into the inequality yields a true statement, then the ordered pair is a solution to the inequality, and the point will be plotted within the shaded region or the point will be part of a solid boundary line. A false statement means that the ordered pair is not a solution, and the point will graph outside the shaded region, or the point will be part of a dotted boundary line.

    Example

    Use the graph to determine which ordered pairs plotted below are solutions of the inequality \(\ x-y<3\).

    Solution

    Screen Shot 2021-06-28 at 4.19.45 PM.png

    Solutions will be located in the shaded region. Since this is a “less than” problem, ordered pairs on the boundary line are not included in the solution set.
    \(\ \begin{array}{r}
    (-1,1) \\
    (-2,-2)
    \end{array}\)
    These values are located in the shaded region, so are solutions. (When substituted into the inequality \(\ x-y<3\), they produce true statements.)
    \(\ \begin{array}{l}
    (1,-2) \\
    (3,-2) \\
    (4,0)
    \end{array}\)
    These values are not located in the shaded region, so are not solutions. (When substituted into the inequality \(\ x-y<3\), they produce false statements.)

    \(\ \begin{array}{c}
    (-1,1), \\
    (-2,-2)
    \end{array}\)

    Example

    Is \(\ (2,-3)\) a solution of the inequality \(\ y<-3 x+1\)?

    Solution

    \(\ y<-3 x+1\) If \(\ (2,-3)\) is a solution, then it will yield a true statement when substituted into the inequality \(\ y<-3 x+1\).
    \(\ -3<-3(2)+1\) Substitute \(\ x=2\) and \(\ y=-3\) into inequality.
    \(\ -3<-6+1\) Evaluate.
    \(\ -3<-5\) This statement is not true, so the ordered pair \(\ (2,-3)\) is not a solution.

    \(\ (2,-3)\) is not a solution.

    Exercise

    Which ordered pair is a solution of the inequality \(\ 2 y-5 x<2\)?

    1. \(\ (-5,1)\)
    2. \(\ (-3,3)\)
    3. \(\ (1,5)\)
    4. \(\ (3,3)\)
    Answer
    1. Incorrect. Substituting \(\ (-5,1)\) into \(\ 2 y-5 x<2\), you find \(\ 2(1)-5(-5)<2\), or \(\ 2+25<2.27\) is not smaller than 2, so this cannot be correct. The correct answer is \(\ (3,3)\).
    2. Incorrect. Substituting \(\ (-3,3)\) into \(\ 2 y-5 x<2\), you find \(\ 2(3)-5(-3)<2\), or \(\ 6+15<2\). 21 is not smaller than 2, so this cannot be correct. The correct answer is \(\ (3,3)\).
    3. Incorrect. Substituting \(\ (1,5)\) into \(\ 2 y-5 x<2\), you find \(\ 2(5)-5(1)<2\), or \(\ 10-5<2\). 5 is not smaller than 2, so this cannot be correct. The correct answer is \(\ (3,3)\).
    4. Correct. Substituting \(\ (3,3)\) into \(\ 2 y-5 x<2\), you find \(\ 2(3)-5(3)<2\), or \(\ 6-15<2\). This is a true statement, so it is a solution to the inequality.

    Graphing Inequalities

    So how do you get from the algebraic form of an inequality, like \(\ y>3 x+1\), to a graph of that inequality? Plotting inequalities is fairly straightforward if you follow a couple steps.

    Graphing Inequalities

    To graph an inequality:

    • Graph the related boundary line. Replace the <, >, ≤, or ≥ sign in the inequality with = to find the equation of the boundary line.
    • Identify at least one ordered pair on either side of the boundary line and substitute those \(\ (x, y)\) values into the inequality. Shade the region that contains the ordered pairs that make the inequality a true statement.
    • If points on the boundary line are solutions, then use a solid line for drawing the boundary line. This will happen for ≤ or ≥ inequalities.

    Let’s graph the inequality \(\ x+4 y \leq 4\)

    To graph the boundary line, find at least two values that lie on the line \(\ x+4 y=4\). You can use the x- and y-intercepts for this equation by substituting 0 in for x first and finding the value of y; then substitute 0 in for y and find x.

    x y
    0 1
    4 0

    Plot the points \(\ (0,1)\) and \(\ (4,0)\), and draw a line through these two points for the boundary line. The line is solid because ≤ means “less than or equal to,” so all ordered pairs along the line are included in the solution set.

    Screen Shot 2021-06-28 at 8.23.45 PM.png

    The next step is to find the region that contains the solutions. Is it above or below the boundary line? To identify the region where the inequality holds true, you can test a couple of ordered pairs, one on each side of the boundary line.

    If you substitute \(\ (-1,3)\) into \(\ x+4 y \leq 4\):

    \(\ \begin{array}{r}
    -1+4(3) \leq 4 \\
    -1+12 \leq 4 \\
    11 \leq 4
    \end{array}\)

    This is a false statement, since 11 is not less than or equal to 4.

    On the other hand, if you substitute \(\ (2,0)\) into \(\ x+4 y \leq 4\):

    \(\ \begin{array}{r}
    2+4(0) \leq 4 \\
    2+0 \leq 4 \\
    2 \leq 4
    \end{array}\)

    This is true! The region that includes \(\ (2,0)\) should be shaded, as this is the region of solutions.

    Screen Shot 2021-06-28 at 8.27.43 PM.png

    And there you have it—the graph of the set of solutions for \(\ x+4 y \leq 4\).

    Example

    Graph the inequality \(\ 2 y>4 x-6\).

    Solution

    \(\ \begin{array}{l}
    2 y>4 x-6 \\
    \frac{2 y}{x}>\frac{4 x}{2}-\frac{6}{2} \\
    y>2 x-3 \\
    y=2 x-3
    \end{array}\)
    Solve for \(\ y\)
    \(\ x\) \(\ y\)
    0 -3
    2 1
    Create a table of values to find two points on the line \(\ y=2 x-3\), or graph it based on the slope-intercept method, the \(\ b\) value of the y-intercept is -3 and the slope is 2.
    Plot the points, and graph the line. The line is dotted because the sign in the inequality is >, not ≥ and therefore points on the line are not solutions to the inequality.
    Screen Shot 2021-06-28 at 8.32.13 PM.png
    \(\ \begin{array}{r}
    2 y>4 x-6 \\
    \text { Test } 1:(-3,1) \\
    2(1)>4(-3)-6 \\
    2>-12-6 \\
    \color{green}2>-18 \text { True! }
    \end{array}\)
    Find an ordered pair on either side of the boundary line. Insert the x- and y-values into the inequality \(\ 2 y>4 x-6\) and see which ordered pair results in a true statement.
    \(\ \begin{array}{r}
    \text { Test } 2:(4,1) \\
    2(1)>4(4)-6 \\
    2>16-6 \\
    \color{red}2>10 \text { False! }
    \end{array}\)
    Since \(\ (-3,1)\) results in a true statement, the region that includes \(\ (-3,1)\) should be shaded.

    The graph of the inequality \(\ 2 y>4 x-6\) is:

    Screen Shot 2021-06-28 at 8.37.16 PM.png

    A quick note about the problem above. You can use the points \(\ (0,-3)\) and \(\ (2,1)\) to graph the boundary line, but that these points are not included in the region of solutions, since the region does not include the boundary line!

    Exercise

    When plotted on a coordinate plane, what does the graph of \(\ y \geq x\) look like?

    1. Screen Shot 2021-06-28 at 8.43.21 PM.png
    2. Screen Shot 2021-06-28 at 8.44.03 PM.png
    3. Screen Shot 2021-06-28 at 8.45.06 PM.png
    4. Screen Shot 2021-06-28 at 8.45.51 PM.png
    Answer

    Summary

    When inequalities are graphed on a coordinate plane, the solutions are located in a region of the coordinate plane, which is represented as a shaded area on the plane. The boundary line for the inequality is drawn as a solid line if the points on the line itself do satisfy the inequality, as in the cases of ≤ and ≥. It is drawn as a dashed line if the points on the line do not satisfy the inequality, as in the cases of < and >. You can tell which region to shade by testing some points in the inequality. Using a coordinate plane is especially helpful for visualizing the region of solutions for inequalities with two variables.


    This page titled 13.2.4: Graphing Linear Inequalities is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by The NROC Project via source content that was edited to the style and standards of the LibreTexts platform.