How To Solve Y=mx+b


For example: y=5x+-6

I don't get how to graph any of it, and I don't get how to add/subtract/multiply/divide any of it.

95 Answers | Add Yours

tboneson1's profile pic

tboneson1 | Middle School Teacher | (Level 2) Adjunct Educator

Posted on

Hey Shelly,

All of these answers are great, but unless you get a better conceptual understanding of the basic parts of a slope intercept equation you will continue to struggle with these equations in the future.  In y=mx+b the two parts that we focus on are m, which represents the slope or slant of the line, and b, which represents the y-intercept.

Let's start with b, the y-intercept. The y-intercept-b-, and more specifically the number that will be in the place of b in the actual equation you want to graph, represents a point on the y axis itself. Think of it like an interception in football. The quarterback throws the ball to his player, and the path of the ball is a line from the quarterback to his receiver. To intercept the ball, the defender from the opposing team has to cross that line between the quarterback and his intended receiver. This is like the y-intercept, or b, in our equation. It is the exact point where the line you graph will intersect with the y axis, or vertical axis.  When your equation is in slope intercept form, or y-intercept form if you prefer, you can quickly find that point by simply knowing where to look. First you have to be sure the equation is in slope intercept form, here is a quick guide. You can easily tell if an equation is in slope intercept form by looking for a couple of quick details: first, y has to be all by itself on 1 side of the equal sign; second, the x term will be first on the other side, followed by a constant (a number without a variable) that is being added or subtracted.Consider the following example:     actual equation y=2x+3

generic form y=mx+b

Notice how the parts line up. Positive 2 is where the m is located in the generic form, and  positive 3 is where the b is in the generic form. That means positive 3 is our y-intercept. To locate this on your graph, you simply find the positive 3 on the y axis, which will be up 3 places from the origin of the graph, or where the x and y axis intersect one another.  Put a dot there where you found the y- intercept. If the number in place of b were negative, say -3, then you would simply go down on the y axis 3 spaces from the origin.  Try looking at a few different slope intercept equations and just spot the y intercepts to get familiar and comfortable with this step, then proceed to the next part: Slope.

The 2 in our example represents the m, or slope of the line. Slope is rise over run, or change in y over change in x. More simply though, it is the slant of the line. Is the line steep, does it rise quickly, or is the line more flat? It is easier for us to use slope in the form of a fraction, so first let's change the 2 into its equivalent fraction, 2/1.  2/1 represents a rise of two (how far you go straight up from your y-intercept), and a run of 1(how far you move left or right from your y intercept).  If your slope is positive, you will count up and then to the right(or inversely down and to the left). If your slope is negative you will count up and to the left(or inversely down and to the right). Our slope is positive, so starting from your y-intercept of 3 you will count up 2 times, and then to the right 1 time. That should put you at the coordinates (5,1). Plot this point by putting a dot there, and then simply connect that point to your y-intercept point with a straight line. If you run out of room on your graph counting up for your slope, start over at your y-intercept and go down 2 and to the left 1. I hope this helps. Good Luck

rubeus-hagrid's profile pic

rubeus-hagrid | (Level 1) Adjunct Educator

Posted on

For any equation in the form y=mx+b, b is the y intercept. The point (0,b) is on the graph.  From (0,b) use the slope m to find the next point.  m is in the form of a/b where a is the change in y and b is the change in x.  Plot the second point and draw a straight line.

sbinkowski's profile pic

sbinkowski | Middle School Teacher | (Level 1) Adjunct Educator

Posted on

There are two different ways to graph that equation.

1. You can use the slope and y-intercept of the line to graph it. The slope is the number that is in front of x (in your example 5 would be the slope). The slope will tell you the rise and run of the line. (In other words, how far up and over you will go from your y-intercept.)Your y-intercept is the number that is by itself (in your example, -6). On your graph, go to -6 on the y-axis. The -6 will be 6 down from the origin. Now from that point, use your slope to mark 2 more points. From -6 go up 5 and right 1, mark that point. From your new point, go up 5 and right 1, mark another point. Now you have 3 points to make a line.

2. You can also do a T-chart. You can pick random numbers to use for x. any numbers that you want to use will work fine. I usually use -1, 0, 1. Take your numbers and plug into the equation. For -1, I will do 5(-1) + -6 = -11. So that will make a point (-1, -11). For 0, I will do 5(0) + -6 = -6. So that will make the point (0, -6). For 1, I will do 5(1) + -6 = -1. That will make the point (1, -1). You have 3 points to make a line now.

robineliza's profile pic

robineliza | High School Teacher | (Level 1) Adjunct Educator

Posted on

Any equation in y=mx+b form is as easy as counting and connecting the dots! 

For the equation y=5x+-6, you start with the constant.  That's the number without the x.  In this case, the number is -6.  Find that number on the y-axis, and make a dot on it. 

Now, you're ready for the slope.  That's the number before the x.  First, write it as a fraction.  Since 5 has no denominator, put a 1 under it.  For numbers that already are written as fractions, you don't have to do this step.

Starting with the dot you made on -6, count up (if the 5 were negative, you'd count down) 5 units on the graph.  You always count up (+) or down (-) for the numerator.  Then, count over (always go to the right) one.  Make a dot where you land.

Now, connect your dots!  Extend your line in both directions to the edges of the graph. summarize:  Make a dot on -6 on the y-axis. Starting there, count up 5 units and to the right one unit.  Make a dot there.  Draw a line that goes from one edge of the graph to the other that passes through your dots!  All Done!!

gilbertbi's profile pic

gilbertbi | Middle School Teacher | (Level 1) Adjunct Educator

Posted on

y = mx + b is the slope-intercept form of a line.

"m" is the slope

"b" is the y-intercept (the point where your line crosses the y-axis)


In your sample: y = 5x + 6

m = 5  (or 5/1)

b = 6


To graph the line, simply put at point at "6" on the y-axis.

The use the slope of 5 to find the next point (up 5 spaces, over one to the right).

Then sketch the line that passes through these two points.


drtrbrown's profile pic

drtrbrown | High School Teacher | (Level 1) Adjunct Educator

Posted on

You can solve the equation and graph it by the following steps.

 y = mx + b                                     y = 5x +6

Determine if the graph is going to be upward or downward by looking at the sign on the m. With the above equation, the 5 is positive. So, the graph is going to point upward.

Identify the slope and intercepts. 

With this equation, 5 represents m, which is the slope, and the y-intercept is (0,6), which is given by b, OR by plugging 0 in for x. Then, multiply 5 and 0 and add the 6.  The y-intercept is (0,6).  You would go to 0 on the coordinate plane, and up 6, and plot a point.  This is where the graph is going to cross/intersect the y-axis.

The x-intercept is calculated/computed when 0 is substituted for y and the opposite of 6, which is -6, is added to both sides; then, divide both sides by 5. So, the x-intercept is (-6/5,0) (you would go to -6/5,0 and make a point.  This is where the graph is going to cross/intersect the x-axis.

To graph the equation, you would plot the x- and y- intercepts and plot other points using the slope of 5/1 (rise/run).  Connect the points.


vixen999's profile pic

vixen999 | High School Teacher | (Level 2) Adjunct Educator

Posted on

The first thing to do when looking at this problem is to take a close look at the equation y = 5x +-6.  This equation is in what is called "slope intercept form."  Slope intercept form is y = mx + b.  (This format is something you should remember.)  The letter "m" is the "slope" of the equation and the "b" is the "y-intercept."

If you were taking a standardized test, such as the ACT, that has multiple choices, I would have you approach the problem in this way as it may possibly save you time.  I would first look at the slope.  The slope of this equation is 5 which is positive.  Slope tells us in which direction the line will go and how steep it is.  Since the slope in this equation is positive, it means that a person would walk up the hill for this equation.  (The line would start lower on the left and look like a hill going up to the right.)  At this point, I would look at the multiple choice answers and it may be possible to pick the graph out with just this information (i.e. Which one(s) are going uphill?).  If not, it is usually possible, to at least eliminate a couple of "bad" answers.  

The next step would be to look at the "y-intercept."  This is the point where the line crosses the y-axis (up and down axis).  So, back to taking a standardized test, look at the answers and find the choices that go "uphill" and go through (the line touches) the point (0. -6).  This will usually be enough information to get your answer.

If you are not taking a multiple choice test and have to actually graph this equation, you should do the following.  Start at the y-intercept point because you are 100% confident that this point is on the line.  So, in this case, go over 0 (the first coordinate always goes right/left) and down 6 (the second coordinate always goes up/down with up being positive and down being negative).  Put a point at (0, -6).  

The slope of this equation is 5.  We always think about the slope as a fraction, however.  If there is not a fraction, make one by putting a fraction bar and a 1 under the number.  So, our slope would be 5/1.  From our point (0, -6) we will go over 1 to the right (bottom of slope is always left/right with positive to the right and negative to the left) and up t (top of slope is always up/down with positive up and negative down).  This should get us to point (1, -1).  Put a point here.  

Now, since you have two points of the line, you have enough to actually create the line.  Connect the two points and continue in both directions to the edges of your graph.  Remember to put an arrow on each end of the line to indicate that a line continues to infinity.  

If you like to have more points to create your line, just continue the process we followed to get to (1, -1).  The next point would be (2, 4).  This is not really necessary, though.

jose26425's profile pic

jose26425 | High School Teacher | (Level 1) Adjunct Educator

Posted on

Graphing a linear equation written in slope-intercept form, y= mx+b is easy! Remember the structure of y=mx+b and that graphing it will always give you a straight line. 


**There are MANY ways to graph a linear equation. Using the slope and y-intercept (that I am about to show you) is the easiest.**

"b" represents the "y-intercept" of the line. This is where the line cross es the y-axis (the part of the coordinate grid that goes up and down).

"m" represents the "slope" of the line. This is rise/run. 

Let's say you're given the equation y = 2/3x + 4

The Steps:

1) Always start on the y-intercept (the number that is by itself and doesn't have "x" attached to it. If you are not given a y-intercept, start at 0. In this case, start by putting a dot on 4 on the y-axis.

2) Look at the slope, or the "m" (many times, it's the fraction. If you are not given a fraction, write the number attached to "x" over 1). 

3) Remember that slope represents rise/run. Since my slope is 2/3, I am going to start at the y-intercept of 4 and count UP 2 dashes, and OVER 3. 

4) Put another dot. Connect the two dots you just plotted with a line that extends throughout the entire coordinate grid.

5) Smile! You've just graphed a linear equation!

baxthum8's profile pic

baxthum8 | High School Teacher | (Level 3) Associate Educator

Posted on

In your equation y=5x+(-6).  5 represents the slop (or steepness) of the line. (-6) represents where your line crosses the y-axis (vertical axis) often referred as the y-intercept.  Therefore, plot your y-intercept.  From your y-intercept count your slope. Since 5 means 5/1, from your y-intercept go up (positive 5) 5 and then right (positive) 1.  Connect the points and you'll have your graph of your line.

nees101's profile pic

nees101 | Student, Graduate | (Level 2) Adjunct Educator

Posted on

We know the given eqaution y=mx+b represents a straight line with slope m and the y intercept b.

So now let us see how to graph the equation y=5x+(-6):

Putting x=0, we get y=-6 which implies one coordinate is (0,-6)

Now putting x=1, we get y=-1 which implies the coordinate is (1,-1)

Putting x=2, we get y=4. So the coordinate is (2,4)

Similarly we get coordinates by substituting different values for x.

Finally joining all these coordinate points we get a straight line as shown below:

This image has been Flagged as inappropriate Click to unflag
Image (1 of 1)
giorgiana1976's profile pic

giorgiana1976 | College Teacher | (Level 3) Valedictorian

Posted on





For x = 0

y = 5*0 -6

y = -6


For x = -1



Now, in order to graph, trace the system of coordinates, which means two rectangular axes. ox is perpendicular to oy. Choose an unit of measure (for example, if you're working on a math sheet, a unit of measure could be the square from the page)

The negative values, on ox axis, are on the left side and the positive values are on the right side. In the middle of the axis is origin, which has coordinates (0,0).

The negative values, on oy axis, are above origin, and negative values are below origin.

For the point (-1,-11), on ox axis, number 1 square on the left side and, for oy axis, number 11 squares below origin.

neela's profile pic

neela | High School Teacher | (Level 3) Valedictorian

Posted on

y = mx+c. If you give various values for x you obtain corresponding values of y. And plot it , you can confirm that it is a straight line.

You can plot the graph yourself.

The given equation is y=5x-6.

Find y values for any x values. Take the easiest values for x and putting it in the equation you get y value.

y = 5x- 6 ;

y= 5*0-6 = -6. y is -6 when x=0.

y=5*1-6 =  -1. Y is -1 when x=1

y=5*2-6 =   4 . y is 4 when x = 2.

y=5*3-6 =  9 . y is 9 when x=3.

y=5*4-6= 14. y is 14 when x= 4.

y=5*5-6= 19 y is 19 when x= 5


y= 5*15-6=69. Test whether it is on the graph.

Plot the coordinates: (x,y):  (0,-6),(1, -1), (2,4) (3,9),(4,14),(5,19). And see whether the point (15,69 ) falls on the graph. Is not the graph a straight line?

Don't get dishartened. You can do well in mathematics.Go through the reference below in maths and follow all the links.


kmieciakp's profile pic

kmieciakp | High School Teacher | (Level 2) Assistant Educator

Posted on

Isn't m the slope and b the y intercept?  So can't you just mark (0, -6) on the graph, and then count up 5 and over 1, mark the point (1,-1), and draw the line?

tutoringcraft's profile pic

tutoringcraft | High School Teacher | (Level 1) Honors

Posted on

Lines are pretty boring but also powerful and very important in your study of mathematics.  The basic idea: if you pick any two points on a line and compute the slope, which is "change in y" divided by "change in x", you'll get the same number.  ANY two points.  No other mathematical shape will have that property.

From this idea comes several forms of the equation of a line.  You've asked about the "slope-intercept" form:  y = m*x + b.

The "m" stands for "slope" and the "b" is the "y-intercept".

Let's talk about the y-intercept first.  It's called that because it's the y-value at which the line crosses the y-axis.  I.e., the point (0, b) is on the line.  Can you see why?  Well, let x equal zero.  Then y=m*0+b=b, no matter what value "m" has.  So yes, the point with x=0 and y=b, called (0,b), is on the line.

Now let's think about slope.  Let b=0 and m=2/3 for this conversation.  The slope being 2/3 means that if the "change is y" is 2, then the "change in x" must be 3.  Let's see that that happens:

Pick any value for x, such as x=5.  
Then y=(2/3)*5=10/3.
Let x go up by 3, so x=8.  
Now y=(2/3)*8=16/3 so the change in y is (16/3)-(10/3)=6/3=2.

With this understanding, you can now graph lines in this form easily:

First graph the point (0,b) since you know that is the y-intercept.

Now write the slope as a fraction (perhaps with a denominator of 1).  Count "change in y" units up (or down, if that is a negative number) then "change in x" units to the right (or left, if it is a negative number) to get a second point.  (You might want to graph three points, just to be sure you're counting correctly.)  Then connect the dots!

You should be sure you understand the other form of a line also:

y-k=m(x-h)  which I think is the best, called "point-slope" form.


revolution's profile pic

revolution | College Teacher | (Level 1) Valedictorian

Posted on

Easy, this is a linear equation and what you will expect is a straight-line graph.

To get the y-values,

sub x=0

y= 5(0)-6


Mark (0,-6) into your graph paper

Then sub. x=1



Mark (1,-1) on graph paper.

Do it for more x-values, then join the points up to form a straight-line graph.

Showing 1–15 of 95

We’ve answered 317,527 questions. We can answer yours, too.

Ask a question