y = mx + b: Read Slope & Y-Intercept, Plot a Line

#Geometry
TL;DR
In the equation y=mx+by = mx + b, the number mm is the slope (how steeply the line rises or falls) and the number bb is the y-intercept (where the line crosses the y-axis). This article shows how to read mm and bb straight off the equation, plot the line, write the equation from points or a graph, and rearrange any linear equation into this form.
BT
Bhanzu TeamLast updated on September 30, 202610 min read

What Do m and b Mean in y = mx + b?

In the equation y=mx+by = mx + b, every line is described by just two numbers:

  • mm is the slope, the number multiplying xx. It measures how steep the line is, as rise over run: how many units yy changes for every one unit xx moves right. A positive mm slopes up to the right; a negative mm slopes down; a larger ∣m∣|m| is steeper.

  • bb is the y-intercept, the constant added on. It is the yy-value where the line crosses the y-axis, the point (0,b)(0, b). Setting x=0x = 0 in the equation gives y=by = b, which is exactly that crossing point.

So in y=2x+3y = 2x + 3, the slope is m=2m = 2 and the y-intercept is b=3b = 3, meaning the line crosses the y-axis at (0,3)(0, 3) and climbs 22 units for every 11 unit it runs right. (The slope itself, m=y2−y1x2−x1m = \tfrac{y_2 - y_1}{x_2 - x_1}, is worth a closer look on its own; the slope-intercept form just puts that slope to work inside a full equation.)

How Do You Read the Slope and Y-Intercept From the Equation?

A frequent question is, "How do I just read m and b off the equation?" When the equation is already written as y=mx+by = mx + b, you read them directly:

  • The coefficient of xx is the slope mm.

  • The constant term is the y-intercept bb.

Equation

Slope mm

Y-intercept bb

Crosses y-axis at

y=4x+1y = 4x + 1

44

11

(0,1)(0, 1)

y=−3x+5y = -3x + 5

−3-3

55

(0,5)(0, 5)

y=12x−2y = \tfrac{1}{2}x - 2

12\tfrac{1}{2}

−2-2

(0,−2)(0, -2)

y=xy = x

11

00

(0,0)(0, 0)

y=7y = 7

00

77

(0,7)(0, 7)

Two cases catch students out. When there is no visible number in front of xx, as in y=xy = x, the slope is 11, not 00. When there is no constant, as in y=xy = x, the y-intercept is 00, so the line passes through the origin. And y=7y = 7 has slope 00 (a flat horizontal line) with y-intercept 77.

How Do You Plot a Line From y = mx + b?

Reading the two numbers is half the job; the other half is turning them into a sketch. The slope and intercept give a two-step recipe.

  1. Plot the y-intercept first. Mark the point (0,b)(0, b) on the y-axis. For y=2x+3y = 2x + 3, that is (0,3)(0, 3).

  2. Use the slope to step to a second point. Write mm as riserun\tfrac{\text{rise}}{\text{run}}. For m=2=21m = 2 = \tfrac{2}{1}, go 11 unit right and 22 units up from (0,3)(0, 3) to reach (1,5)(1, 5).

  3. Draw the line through the two points and extend it both ways.

For a fractional slope like m=34m = \tfrac{3}{4}, the rise-over-run reads directly: 33 up for every 44 right. For a negative slope like m=−12m = -\tfrac{1}{2}, go 22 right and 11 down. The y-intercept anchors the line; the slope sets its tilt.

How Do You Write the Equation From Two Points or a Graph?

The reverse skill, going from a line to its equation, is the one that shows up most on tests. A common question is, "I have two points, how do I get y = mx + b?" Two steps.

  1. Find the slope from the two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2):

m=y2−y1x2−x1.m = \frac{y_2 - y_1}{x_2 - x_1}.

  1. Find bb by substituting one point and the slope into y=mx+by = mx + b, then solving for bb.

For the points (0,3)(0, 3) and (2,7)(2, 7): the slope is m=7−32−0=42=2m = \dfrac{7 - 3}{2 - 0} = \dfrac{4}{2} = 2. Substituting the point (2,7)(2, 7): 7=2(2)+b7 = 2(2) + b, so 7=4+b7 = 4 + b and b=3b = 3. The equation is y=2x+3y = 2x + 3.

From a graph, it is faster still: read the y-intercept straight off where the line crosses the y-axis (that is bb), then count the rise over run between two grid-crossing points to get mm. No formula needed when the picture hands you both numbers.

How Do You Rearrange Any Line Into y = mx + b?

Not every equation arrives in slope-intercept shape. A line in standard form, Ax+By=CAx + By = C, hides its slope and intercept until you solve for yy. The question, "How do I convert standard form to y = mx + b?", is answered by isolating yy.

Take 3x+4y=123x + 4y = 12. Solve for yy:

4y=−3x+12,4y = -3x + 12, y=−34x+3.y = -\frac{3}{4}x + 3.

Now read it off: slope m=−34m = -\tfrac{3}{4}, y-intercept b=3b = 3. The rule is always the same, get yy alone on the left, and whatever multiplies xx is the slope while the constant is the intercept. The slope-intercept form is just the "solved-for-yy" version of any non-vertical line.

Examples of y = mx + b

With reading, plotting, and rearranging in place, here is the equation doing real work. The problems build from reading off two numbers up to writing an equation from a graph.

Example 1 - State the slope and y-intercept of y=5x−2y = 5x - 2

The coefficient of xx is the slope, and the constant is the y-intercept: m=5m = 5, b=−2b = -2. The line crosses the y-axis at (0,−2)(0, -2).

Final answer: m=5m = 5, b=−2b = -2.

Example 2 - Find the slope and y-intercept of 2x+y=62x + y = 6

A tempting first move is to read the numbers straight off as they sit: slope 22, intercept 66. Check that against the form. The equation is not yet solved for yy; the 22 is attached to xx on the wrong side, and there is a hidden minus sign waiting. Reading an unsolved equation as if it were slope-intercept form is the most common error here.

Done correctly, isolate yy first: y=−2x+6y = -2x + 6. Now read it off: slope m=−2m = -2, y-intercept b=6b = 6.

Final answer: m=−2m = -2, b=6b = 6.

Example 3 - Plot the line y=−x+4y = -x + 4

Start at the y-intercept (0,4)(0, 4). The slope is m=−1=−11m = -1 = \tfrac{-1}{1}, so step 11 right and 11 down to (1,3)(1, 3). Draw the line through (0,4)(0, 4) and (1,3)(1, 3).

Final answer: a line falling left-to-right, crossing the y-axis at (0,4)(0, 4).

Example 4 - Write the equation of the line through (0,−1)(0, -1) and (3,5)(3, 5)

Slope: m=5−(−1)3−0=63=2m = \dfrac{5 - (-1)}{3 - 0} = \dfrac{6}{3} = 2. The first point (0,−1)(0, -1) is already on the y-axis, so b=−1b = -1 directly.

Final answer: y=2x−1y = 2x - 1.

Example 5 - Rearrange 6x−2y=86x - 2y = 8 into slope-intercept form and state mm and bb

Isolate yy: −2y=−6x+8-2y = -6x + 8, then divide by −2-2: y=3x−4y = 3x - 4.

Final answer: y=3x−4y = 3x - 4, with m=3m = 3 and b=−4b = -4.

Example 6 - A line on a graph crosses the y-axis at (0,2)(0, 2) and passes through (4,0)(4, 0). Write its equation

The y-intercept is read straight from the crossing: b=2b = 2. Slope from the two points: m=0−24−0=−24=−12m = \dfrac{0 - 2}{4 - 0} = \dfrac{-2}{4} = -\tfrac{1}{2}.

Final answer: y=−12x+2y = -\tfrac{1}{2}x + 2.

Why y = mx + b Matters Beyond the Page

The slope-intercept form is the most-used equation in applied mathematics because so many real relationships are, at least over a range, straight lines, and this form reads the two facts you most want from them.

  • A starting value plus a steady rate. A phone plan costs a flat bb dollars plus mm dollars per gigabyte; a road trip starts bb kilometres from home and adds mm kilometres an hour. In every such case, bb is the starting amount and mm is the rate of change, exactly the two numbers the equation isolates.

  • Reading trends. Plot data that fall roughly on a line and the slope tells you how fast something grows or shrinks, while the intercept tells you where it began. This is the seed of linear regression, the workhorse of data science.

  • The bridge to calculus. The slope mm is a constant rate of change. When the rate stops being constant, that same idea, slope at a point, becomes the derivative. Master reading mm here and you have met the central idea of calculus years early.

  • Descartes' gift. The whole trick of writing a geometric line as an algebra equation traces to René Descartes and his 1637 work joining algebra to geometry, the same coordinate thinking behind every graph you will draw.

Where Students Trip Up on y = mx + b

Mistake 1: Reading m and b before solving for y

Where it slips in: The equation is in standard form, like 2x+y=62x + y = 6, and the student reads the numbers where they sit.

Don't do this: Call the coefficient of xx the slope while yy is not yet isolated.

The correct way: First rearrange to y=mx+by = mx + b (here y=−2x+6y = -2x + 6), then read. The rusher who reads before rearranging grabs the wrong sign almost every time; confirm the equation starts with "y=y =" first.

Mistake 2: Mixing up which number is the slope and which is the intercept

Where it slips in: A student swaps mm and bb, treating the constant as the slope.

Don't do this: Read bb as the slope or mm as the intercept.

The correct way: mm multiplies xx; bb stands alone. In y=4x+1y = 4x + 1, the slope is 44 (attached to xx) and the intercept is 11 (the lone constant). The memorizer who learned "mm then bb" but not what each does loses the order under pressure; anchor it to the picture instead, bb is where the line starts on the y-axis.

Mistake 3: Mishandling the rise-over-run direction for a negative slope

Where it slips in: Plotting a line with negative slope, the student steps up instead of down.

Don't do this: Treat m=−12m = -\tfrac{1}{2} as 12\tfrac{1}{2} when stepping.

The correct way: A negative slope falls left-to-right: go right along the run and down by the rise. The second-guesser who knows the line should fall but steps up anyway should check that the finished line actually slopes the way the sign predicts.

Conclusion

  • In y=mx+by = mx + b, mm is the slope and bb is the y-intercept, the point (0,b)(0, b).

  • Read mm as the coefficient of xx and bb as the constant, but only once the equation is solved for yy.

  • Plot a line by marking (0,b)(0, b) first, then stepping by the slope's rise over run.

  • Write the equation from two points by finding mm, then solving for bb; from a graph, read bb off the crossing and count rise over run for mm.

  • Any non-vertical line rearranges into y=mx+by = mx + b by isolating yy.

Practice These Problems to Solidify Your Understanding

  1. State the slope and y-intercept of y=−2x+7y = -2x + 7.

  2. Rearrange 4x+2y=104x + 2y = 10 into slope-intercept form and state mm and bb.

  3. Write the equation of the line through (0,4)(0, 4) and (2,0)(2, 0).

Answer to Question 1: m=−2m = -2, b=7b = 7. Answer to Question 2: y=−2x+5y = -2x + 5, so m=−2m = -2, b=5b = 5. Answer to Question 3: y=−2x+4y = -2x + 4. If Question 2 gave m=4m = 4, you read the equation before solving for yy; isolate yy first, then read.

Want a live Bhanzu trainer to walk your child through linear equations and graphing lines? Book a free demo class — online globally.

Also Read:

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What do m and b stand for in y = mx + b?
mm is the slope (rise over run, how steep the line is), and bb is the y-intercept (the yy-value where the line crosses the y-axis, the point (0,b)(0, b)).
How is y = mx + b related to slope-intercept form?
They are the same thing. "Slope-intercept form" is the name for the equation y=mx+by = mx + b; this article focuses on the mechanics of reading, plotting, and rearranging it.
How do I find b if the line does not pass through the y-axis on my points?
Find the slope mm first, then substitute any one point and mm into y=mx+by = mx + b and solve for bb.
What is m if the equation is just y = x?
The slope is 11 (an invisible coefficient of 11 multiplies xx) and the y-intercept is 00, so the line passes through the origin.
How do I convert standard form into y = mx + b?
Solve the equation for yy, getting yy alone on the left. Whatever multiplies xx is mm; the constant is bb.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →