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

Graphing a linear equation: y=2x+7

Learn how to create a graph of the linear equation y = 2x + 7. Created by Sal Khan and CK-12 Foundation.

Want to join the conversation?

Video transcript

Let's do a couple of problems graphing linear equations. They are a bunch of ways to graph linear equations. What we'll do in this video is the most basic way. Where we will just plot a bunch of values and then connect the dots. I think you'll see what I'm saying. So here I have an equation, a linear equation. I'll rewrite it just in case that was too small. y is equal to 2x plus 7. I want to graph this linear equation. Before I even take out the graph paper, what I could do is set up a table. Where I pick a bunch of x values and then I can figure out what y value would correspond to each of those x values. So for example, if x is equal to-- let me start really low-- if x is equal to minus 2-- or negative 2, I should say-- what is y? Well, you substitute negative 2 up here. It would be 2 times negative 2 plus 7. This is negative 4 plus 7. This is equal to 3. If x is equal to-- I'm just picking x values at random that might be indicative of-- I'll probably do three or four points here. So what happens when x is equal to 0? Then y is going to be equal to 2 times 0 plus 7. Is going to be equal to 7. I just happen to be going up by 2. You could be going up by 1 or you could be picking numbers at random. When x is equal to 2, what is y? It'll be 2 times 2 plus 7. So 4 plus 7 is equal to 11. I could keep plotting points if I like. We should already have enough to graph it. Actually to plot any line, you actually only need two points. So we already have one more than necessary. Actually, let me just do one more just to show you that this really is a line. So what happens when x is equal to 4? Actually, just to not go up by 2, let's do x is equal to 8. Just to pick a random number. Then y is going to be 2 times 8 plus 7, which is-- well this might go off of our graph paper-- but 2 times 8 is 16 plus 7 is equal to 23. Now let's graph it. Let me do my y-axis right there. That is my y-axis. Let me do my x-axis. I have a lot of positive values here, so a lot of space on the positive y-side. That is my x-axis. And then I use the points x is equal to negative 2. That's negative 1. That's 0, 1, 2, 3, 4, 5, 6, 7, 8. Those are our x values. Then we can go up into the y-axis. I'll do it at a slightly different scale because these numbers get large very quickly. So maybe I'll do it in increments of 2. So this could be 2, 4, 6, 8, 10, 12, 14, 16. I could just keep going up there, but let's plot these points. So the first coordinate I have is x is equal to negative 2, y is equal to 3. So I can write my coordinate. It's going to be the point negative 2, 3. x is negative 2. y is 3. 3 would land right over there. So that's our first one, negative 2, 3. Then our next point. 0, 7. We do it in that color. 0, 7. x is 0. Y is 7. Right there. 0, 7. We have this one in green here. Point 2, 11. 2, 11 would be right about there. And then this last point-- this is actually going to fall off of my graph. 8, 23. That's going to be way up here someplace. If you can even see what I'm doing. This is 8, 23. If we connect the dots, you'll see a line forms. Let me connect these dots. I've obviously hand drawn it, so it might not be a perfectly straight line. If you had a computer do it, it would be a straight line. So you could keep picking x values and figuring out the corresponding y values. In the situation y is a function of our x values. If you kept plotting every point, you'll get every line. If you picked every possible x and plotted every one, you get every point on the line. Let's do another problem. At the airport, you can change your money from dollars into Euros. The service costs $5. and for every additional dollar, you get EUR 0.7. Make a table for this and plot the function on a graph. Use your graph to determine how many Euros you would get if you give the office $50. I will write Euros is equal to-- so let's see, it's going to be dollars. So you're going to have to give your dollars. Right off of the bat, they're going to take $5. So dollars minus 5. So immediately this service costs $5. And then everything that's leftover-- this is your leftover-- you get EUR 0.7 for every leftover dollars. You get 0.7 for whatever's leftover. So this is the relationship. Now we can plot points-- we could actually answer their question right off the bat. If you give them $50, we don't even have to look at a graph. But we will look at a graph right after this. So if you did Euros is equal to-- if you have given them $50-- it would be 0.7 times 50 minus 5. You gave them 50. They took 5 as a service fee. So this is just $45 It would be 0.7 times 45. I could do that right here. 45 times 0.7. 7 times 5 is 35. 4 times 7 is 28 plus 3 is 31. And then we have only one number behind the decimal, only this 7. So it's 31.5. So if you give them $50, you're going to get EUR 31.5. Euros, not dollars. So we answered their question, but let's actually do it graphically. Let's do a table. Maybe I'll get a calculator out. I'll refer to that in a little bit. So let's say dollars you give them. And how many Euros do you get? I'll just put a bunch of random numbers. If you give them $5, they're just going to take your $5 for the fee. You're going to get $5 minus 5, which is 0 times 0.7. So you're going to get nothing back. So there's really no good reason for you to do that. Then if you give them $10. What's going to happen? If you give them $10, 10 minus 5 is 5 times 0.7. You're going to get $3-- or I should say EUR 3.50. 3.5 Euros, you'll get. Now what happens if you give them $30? Actually let me say 25. If you give him $25, 25 minus 5 is 20. 20 times 0.7 is $14. I'll do one more value. Let's say you gave them $55. This makes the math easy because then you subtract that 5 out. 55 minus 5 is 50 times 0.7 is $35. Is that right? Yep, that's right. You'll get EUR 35 I should say. These are all Euros. I keep wanting to say dollars. Let's plot this. All of these values are positive, so I only have to draw the first quadrant here. And so the dollars-- let's go in increments of 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55. I made my x-axis a little shorter than I needed to. All the way up to 55. And then the y-axis. I'll go in increments of 5. So that's 5, 10, 15, 20, 25, 30, 35. Well that's a little bit too much of an increment. 35. Now let's plot these points. I give them $5. I get EUR 0. This right here is Euros. This is the dollars. The dollars is the independent variable and we figure out the Euros from it. Or the Euros I get is dependent on the dollars I get. If I give $10, I get EUR 3.50. 3.50-- it's hard to read. Maybe 3.50 would be right around there. If I give $25, I get EUR 14. 25, 14 is right about there. Obviously, I'm hand drawing it, so it's not going to be quite exact. If I get $55, I get EUR 35. So 55, 35 right there. If I were to connect to the dots, I should get something that looks pretty close to a line. If I did it-- if I was a computer, it would be exactly a line. That looks pretty good. Then we could eyeball what they asked us to do. Use your graph to determine how many Euros you would get if you give the office $50. This is 50 right here. So you go bam, bam, bam, bam, bam, bam, bam, bam. I'm at the graph. Then you go all the way-- actually I drew that last point on the graph a little bit incorrectly. Let me. 35 is right here. Let me redraw that point. 35 is right there roughly. So 55, 35 is right there. So let me redraw my line. It will look-- I lost 25. 25, 14 is right there. So my graph looks something like that. That's my best attempt. Now let's answer the question. We give them $50 right there. You go up, up, up, up, up, up, up. $50. The person is going to get. You go all the way to the left-hand side. That's right about 31.50. We figured out exactly using the formula. But you can see, you can eyeball it from the graph and figure out any amount of dollars. If you give them $20, you're going to go all the way over here. You'll figure out that it should be-- well $20 should be about 7.50. The imprecision in my graph-- in my drawing the graph makes it a little bit less exact. When you say 20 minus 5 is 15. 15 times-- actually it'll be a little over $10, which is right. It's right over there. If you put $20 in there, 20 minus 5 is 15. 15 times 0.7 is $10.50, which is right there. So you can look at any point in the graph and figure out how many Euros you'll get. Let's do this one where we'll do a little bit of reading a graph. The graph-- I think it said use the graph below. Oh, the graph below shows a conversion chart for converting between weight in kilograms and weight in pounds. Use it to convert the following measurements. We have kilograms here and pounds here. So they want 4 kilograms into weight into pounds. So if we look at this right here, 4 kilograms is right there. We just follow where the graph is. So 4 kilograms into pounds, it looks like, I don't know, a little bit under 9 pounds. So a little bit less than-- so almost, I'll write almost 9 pounds. You can't exactly see. It's a little less than 9 pounds right there. 4 kilograms. Now 9 kilograms. We go over here. 9 kilograms. Go all the way up. That looks like almost exactly 20 pounds. Here they say 12 pounds into weight in kilograms. Actually kilograms is mass, but I won't get particular. So 12 pounds. Go over here. Pounds. 12 pounds in kilograms looks like 5 1/2. Approximately 5 1/2. And then 17 pounds to kilograms. So 17 is right there. 17 pounds to kilograms looks right about 7 1/2 kilograms. Anyway, hopefully that these examples made you a little bit more comfortable with graphing equations and reading graphs of equations. I'll see you in the next video.