If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Intro to graphing two-variable inequalities

Learn how to graph two-variable linear inequalities like y≤4x+3. Created by Sal Khan and CK-12 Foundation.

Want to join the conversation?

  • blobby green style avatar for user jocarol
    How to I solve compound inequalities?
    (81 votes)
    Default Khan Academy avatar avatar for user
  • ohnoes default style avatar for user Madhav Vaithylingam
    Is there any way to find the shaded side easier.
    (5 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user Pei-Hsin Lin 林培心 🌸
      Draw a little man ⛷ on each line as if it were the side of a mountain. ⛰
      The side that's above ground is the greater than side. ≥ or >
      The side that's below ground is the less than side. ≤ or <

      You can also try ✈️ airplane arms and align your own arms with each line.
      The side above your shoulders is the greater than side. ≥ or >
      The side below your shoulders is the less than side. ≤ or <
      (36 votes)
  • aqualine seed style avatar for user dgyoung
    Why do you have to put an equal sign in place of the greater and less than signs? And are you supposed to divide or multiply when you have an equation like this -3x-y <-1 ( there is suppose to be a line underneath the less than sign) ?
    (10 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user AdityaHirey
      The line underneath the greater than or less than sign means less than or equal to and greater than or equal to. Sal did this to show you what this means.
      For your second question, you need to divide so you get an x on one side of the equation. For example, if y = 3, than the equation would be -3x-3<=-1. You would then subtract 3 from both sides of the equation to get -3x<=-4. Then, divide both sides by 3 to isolate the x on one side. Since you are dividing by a negative number, reverse the less than or equal to to a GREATER THAN or equal to sign.
      (1 vote)
  • leafers seedling style avatar for user Cerian. D
    How do I write the slope if the line goes straight up (is vertical) and how do I write it's equation if the y-intercept is not given but I have an x-intercept?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • leaf orange style avatar for user Richard Liu
      If the line goes straight up, then the line's equation is in the form x = ? because only the y value changes, the x value never changes. The x intercept is all you need to calculate for the equation because that x value is the same x value for every point on the line. So if your x intercept is (5,0) then your line's equation would be x = 5.
      Hope this helped :)
      Happy holidays!!
      (9 votes)
  • blobby green style avatar for user fblpn
    5x-y is greater than or equal to 5 and y<5
    (4 votes)
    Default Khan Academy avatar avatar for user
    • hopper cool style avatar for user Chuck Towle
      Fblpn,
      5x-y >= 5 and y=5
      If you change the first equation to slope y-intercept form
      5x-y >= 5 add y to both sides
      5x-y+y >= 5+y The y-y = 0 and disappears
      5x >= 5+y And subtract 5 from both sides
      5x-5 >= y Now reverse the sides and reverse the sign
      y <= 5x-5 So we now the slope is 5 and y-intercept is (0,-5)
      So graph that line (solid because it is also = to
      and shade everything below the line since it is also <

      The y<5 can be rewritten as
      y=0x+5 So the slope is 0 (a horizontal line) that crosses the y axis at 5.
      So graph that line (dashed line because it is not = to)
      and shade below the line since it is <

      Where the shaded areas overlap, that is your solution.
      http://www.khanacademy.org/cs/y5x-5-y5/6275881863479296

      I hope that helps make it click for you.
      (11 votes)
  • piceratops sapling style avatar for user Lorrai Yada
    how do I know to shade above or below the line
    (4 votes)
    Default Khan Academy avatar avatar for user
  • leaf grey style avatar for user Helios
    if I have something like y>-3 and the question says to 'graph the inequality in the coordinate plane'. Then what does the -3 signify/refer to when I put this inequality into slop intercept form to graph it......?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • primosaur ultimate style avatar for user chikhi fethi
    how can i now if the equation is >= or just > i dont see the deference especially when we have the graph and we wont the equation
    (3 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      If the line in the graph is solid then the inequality is >=.
      If the line is dashed, then the inequality is just >.
      If you watch the entire video, you will see toward the end that Sal changes the solid line into a dashed line since the 2nd example is for >.
      (3 votes)
  • aqualine tree style avatar for user Amber
    At , why is -x/2 the same thing as -1/2x?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user Adriana
    how can you tell what side you shade and which one not to shade I need help. Someone explain?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user thesergcan
      Let's say you have an equation for an inequality, for instance y < 4x+3.
      Draw the line on the graph (you can use the video of the graph since its the same equation except I'm using a less than instead of less than or equal to). Now you can do this problem a few ways. I think the easiest way at least for me is to simply pick a coordinate from any side of the line. You have the freedom to pick any point you can and just check if this inequality holds.

      So, using this freedom let's pick (-2,2) which is on the left side of the line. Plug this into the equation: We get 2 < 4*(-2) +3, which we get this inequality 2 < -5.
      Now, let's think is this correct?
      No, it's not. So, that side of the line probably won't be shaded.

      Continue using our freedom of choice, let's pick a point on the right side of the line. I like the point (2,0). So, plugging this into our equation gets us
      0 < 4*2 +3. Is 0 < 11? Yes it is!

      We can check this millions and millions of times on the right side and it turns out this inequality will hold!
      (4 votes)

Video transcript

Let's graph ourselves some inequalities. So let's say I had the inequality y is less than or equal to 4x plus 3. On our xy coordinate plane, we want to show all the x and y points that satisfy this condition right here. So a good starting point might be to break up this less than or equal to, because we know how to graph y is equal to 4x plus 3. So this thing is the same thing as y could be less than 4x plus 3, or y could be equal to 4x plus 3. That's what less than or equal means. It could be less than or equal. And the reason why I did that on this first example problem is because we know how to graph that. So let's graph that. Try to draw a little bit neater than that. So that is-- no, that's not good. So that is my vertical axis, my y-axis. This is my x-axis, right there. And then we know the y-intercept, the y-intercept is 3. So the point 0, 3-- 1, 2, 3-- is on the line. And we know we have a slope of 4. Which means if we go 1 in the x-direction, we're going to go up 4 in the y. So 1, 2, 3, 4. So it's going to be right here. And that's enough to draw a line. We could even go back in the x-direction. If we go 1 back in the x-direction, we're going to go down 4. 1, 2, 3, 4. So that's also going to be a point on the line. So my best attempt at drawing this line is going to look something like-- this is the hardest part. It's going to look something like that. That is a line. It should be straight. I think you get the idea. That right there is the graph of y is equal to 4x plus 3. So let's think about what it means to be less than. So all of these points satisfy this inequality, but we have more. This is just these points over here. What about all these where y ix less than 4x plus 3? So let's think about what this means. Let's pick up some values for x. When x is equal to 0, what does this say? When x is equal to 0, then that means y is going to be less than 0 plus 3. y is less than 3. When x is equal to negative 1, what is this telling us? 4 times negative 1 is negative 4, plus 3 is negative 1. y would be less than negative 1. When x is equal to 1, what is this telling us? 4 times 1 is 4, plus 3 is 7. So y is going to be less than 7. So let's at least try to plot these. So when x is equal to-- let's plot this one first. When x is equal to 0, y is less than 3. So it's all of these points here-- that I'm shading in in green-- satisfy that right there. If I were to look at this one over here, when x is negative 1, y is less than negative 1. So y has to be all of these points down here. When x is equal to 1, y is less than 7. So it's all of these points down here. And in general, you take any point x-- let's say you take this point x right there. If you evaluate 4x plus 3, you're going to get the point on the line. That is that x times 4 plus 3. Now the y's that satisfy it, it could be equal to that point on the line, or it could be less than. So it's going to go below the line. So if you were to do this for all the possible x's, you would not only get all the points on this line which we've drawn, you would get all the points below the line. So now we have graphed this inequality. It's essentially this line, 4x plus 3, with all of the area below it shaded. Now, if this was just a less than, not less than or equal sign, we would not include the actual line. And the convention to do that is to actually make the line a dashed line. This is the situation if we were dealing with just less than 4x plus 3. Because in that situation, this wouldn't apply, and we would just have that. So the line itself wouldn't have satisfied it, just the area below it. Let's do one like that. So let's say we have y is greater than negative x over 2 minus 6. So a good way to start-- the way I like to start these problems-- is to just graph this equation right here. So let me just graph-- just for fun-- let me graph y is equal to-- this is the same thing as negative 1/2 minus 6. So if we were to graph it, that is my vertical axis, that is my horizontal axis. And our y-intercept is negative 6. So 1, 2, 3, 4, 5, 6. So that's my y-intercept. And my slope is negative 1/2. Oh, that should be an x there, negative 1/2 x minus 6. So my slope is negative 1/2, which means when I go 2 to the right, I go down 1. So if I go 2 to the right, I'm going to go down 1. If I go 2 to the left, if I go negative 2, I'm going to go up 1. So negative 2, up 1. So my line is going to look like this. My line is going to look like that. That's my best attempt at drawing the line. So that's the line of y is equal to negative 1/2 x minus 6. Now, our inequality is not greater than or equal, it's just greater than negative x over 2 minus 6, or greater than negative 1/2 x minus 6. So using the same logic as before, for any x-- so if you take any x, let's say that's our particular x we want to pick-- if you evaluate negative x over 2 minus 6, you're going to get that point right there. You're going to get the point on the line. But the y's that satisfy this inequality are the y's greater than that. So it's going to be not that point-- in fact, you draw an open circle there-- because you can't include the point of negative 1/2 x minus 6. But it's going to be all the y's greater than that. That'd be true for any x. You take this x. You evaluate negative 1/2 or negative x over 2 minus 6, you're going to get this point over here. The y's that satisfy it are all the y's above that. So all of the y's that satisfy this equation, or all of the coordinates that satisfy this equation, is this entire area above the line. And we're not going to include the line. So the convention is to make this line into a dashed line. And let me draw-- I'm trying my best to turn it into a dashed line. I'll just erase sections of the line, and hopefully it will look dashed to you. So I'm turning that solid line into a dashed line to show that it's just a boundary, but it's not included in the coordinates that satisfy our inequality. The coordinates that satisfy our equality are all of this yellow stuff that I'm shading above the line. Anyway, hopefully you found that helpful.