What Do m and b Mean in y = mx + b?
In the equation $y = mx + b$, every line is described by just two numbers:
$m$ is the slope, the number multiplying $x$. It measures how steep the line is, as rise over run: how many units $y$ changes for every one unit $x$ moves right. A positive $m$ slopes up to the right; a negative $m$ slopes down; a larger $|m|$ is steeper.
$b$ is the y-intercept, the constant added on. It is the $y$-value where the line crosses the y-axis, the point $(0, b)$. Setting $x = 0$ in the equation gives $y = b$, which is exactly that crossing point.
So in $y = 2x + 3$, the slope is $m = 2$ and the y-intercept is $b = 3$, meaning the line crosses the y-axis at $(0, 3)$ and climbs $2$ units for every $1$ unit it runs right. (The slope itself, $m = \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 + b$, you read them directly:
The coefficient of $x$ is the slope $m$.
The constant term is the y-intercept $b$.
Equation | Slope $m$ | Y-intercept $b$ | Crosses y-axis at |
|---|---|---|---|
$y = 4x + 1$ | $4$ | $1$ | $(0, 1)$ |
$y = -3x + 5$ | $-3$ | $5$ | $(0, 5)$ |
$y = \tfrac{1}{2}x - 2$ | $\tfrac{1}{2}$ | $-2$ | $(0, -2)$ |
$y = x$ | $1$ | $0$ | $(0, 0)$ |
$y = 7$ | $0$ | $7$ | $(0, 7)$ |
Two cases catch students out. When there is no visible number in front of $x$, as in $y = x$, the slope is $1$, not $0$. When there is no constant, as in $y = x$, the y-intercept is $0$, so the line passes through the origin. And $y = 7$ has slope $0$ (a flat horizontal line) with y-intercept $7$.
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.
Plot the y-intercept first. Mark the point $(0, b)$ on the y-axis. For $y = 2x + 3$, that is $(0, 3)$.
Use the slope to step to a second point. Write $m$ as $\tfrac{\text{rise}}{\text{run}}$. For $m = 2 = \tfrac{2}{1}$, go $1$ unit right and $2$ units up from $(0, 3)$ to reach $(1, 5)$.
Draw the line through the two points and extend it both ways.
For a fractional slope like $m = \tfrac{3}{4}$, the rise-over-run reads directly: $3$ up for every $4$ right. For a negative slope like $m = -\tfrac{1}{2}$, go $2$ right and $1$ 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.
Find the slope from the two points $(x_1, y_1)$ and $(x_2, y_2)$:
$$m = \frac{y_2 - y_1}{x_2 - x_1}.$$
Find $b$ by substituting one point and the slope into $y = mx + b$, then solving for $b$.
For the points $(0, 3)$ and $(2, 7)$: the slope is $m = \dfrac{7 - 3}{2 - 0} = \dfrac{4}{2} = 2$. Substituting the point $(2, 7)$: $7 = 2(2) + b$, so $7 = 4 + b$ and $b = 3$. The equation is $y = 2x + 3$.
From a graph, it is faster still: read the y-intercept straight off where the line crosses the y-axis (that is $b$), then count the rise over run between two grid-crossing points to get $m$. 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 = C$, hides its slope and intercept until you solve for $y$. The question, "How do I convert standard form to y = mx + b?", is answered by isolating $y$.
Take $3x + 4y = 12$. Solve for $y$:
$$4y = -3x + 12,$$ $$y = -\frac{3}{4}x + 3.$$
Now read it off: slope $m = -\tfrac{3}{4}$, y-intercept $b = 3$. The rule is always the same, get $y$ alone on the left, and whatever multiplies $x$ is the slope while the constant is the intercept. The slope-intercept form is just the "solved-for-$y$" 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 - 2$
The coefficient of $x$ is the slope, and the constant is the y-intercept: $m = 5$, $b = -2$. The line crosses the y-axis at $(0, -2)$.
Final answer: $m = 5$, $b = -2$.
Example 2 - Find the slope and y-intercept of $2x + y = 6$
A tempting first move is to read the numbers straight off as they sit: slope $2$, intercept $6$. Check that against the form. The equation is not yet solved for $y$; the $2$ is attached to $x$ 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 $y$ first: $y = -2x + 6$. Now read it off: slope $m = -2$, y-intercept $b = 6$.
Final answer: $m = -2$, $b = 6$.
Example 3 - Plot the line $y = -x + 4$
Start at the y-intercept $(0, 4)$. The slope is $m = -1 = \tfrac{-1}{1}$, so step $1$ right and $1$ down to $(1, 3)$. Draw the line through $(0, 4)$ and $(1, 3)$.
Final answer: a line falling left-to-right, crossing the y-axis at $(0, 4)$.
Example 4 - Write the equation of the line through $(0, -1)$ and $(3, 5)$
Slope: $m = \dfrac{5 - (-1)}{3 - 0} = \dfrac{6}{3} = 2$. The first point $(0, -1)$ is already on the y-axis, so $b = -1$ directly.
Final answer: $y = 2x - 1$.
Example 5 - Rearrange $6x - 2y = 8$ into slope-intercept form and state $m$ and $b$
Isolate $y$: $-2y = -6x + 8$, then divide by $-2$: $y = 3x - 4$.
Final answer: $y = 3x - 4$, with $m = 3$ and $b = -4$.
Example 6 - A line on a graph crosses the y-axis at $(0, 2)$ and passes through $(4, 0)$. Write its equation
The y-intercept is read straight from the crossing: $b = 2$. Slope from the two points: $m = \dfrac{0 - 2}{4 - 0} = \dfrac{-2}{4} = -\tfrac{1}{2}$.
Final answer: $y = -\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 $b$ dollars plus $m$ dollars per gigabyte; a road trip starts $b$ kilometres from home and adds $m$ kilometres an hour. In every such case, $b$ is the starting amount and $m$ 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 $m$ is a constant rate of change. When the rate stops being constant, that same idea, slope at a point, becomes the derivative. Master reading $m$ 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 = 6$, and the student reads the numbers where they sit.
Don't do this: Call the coefficient of $x$ the slope while $y$ is not yet isolated.
The correct way: First rearrange to $y = mx + b$ (here $y = -2x + 6$), then read. The rusher who reads before rearranging grabs the wrong sign almost every time; confirm the equation starts with "$y =$" first.
Mistake 2: Mixing up which number is the slope and which is the intercept
Where it slips in: A student swaps $m$ and $b$, treating the constant as the slope.
Don't do this: Read $b$ as the slope or $m$ as the intercept.
The correct way: $m$ multiplies $x$; $b$ stands alone. In $y = 4x + 1$, the slope is $4$ (attached to $x$) and the intercept is $1$ (the lone constant). The memorizer who learned "$m$ then $b$" but not what each does loses the order under pressure; anchor it to the picture instead, $b$ 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 = -\tfrac{1}{2}$ as $\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 + b$, $m$ is the slope and $b$ is the y-intercept, the point $(0, b)$.
Read $m$ as the coefficient of $x$ and $b$ as the constant, but only once the equation is solved for $y$.
Plot a line by marking $(0, b)$ first, then stepping by the slope's rise over run.
Write the equation from two points by finding $m$, then solving for $b$; from a graph, read $b$ off the crossing and count rise over run for $m$.
Any non-vertical line rearranges into $y = mx + b$ by isolating $y$.
Practice These Problems to Solidify Your Understanding
State the slope and y-intercept of $y = -2x + 7$.
Rearrange $4x + 2y = 10$ into slope-intercept form and state $m$ and $b$.
Write the equation of the line through $(0, 4)$ and $(2, 0)$.
Answer to Question 1: $m = -2$, $b = 7$. Answer to Question 2: $y = -2x + 5$, so $m = -2$, $b = 5$. Answer to Question 3: $y = -2x + 4$. If Question 2 gave $m = 4$, you read the equation before solving for $y$; isolate $y$ 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.
Was this article helpful?
Your feedback helps us write better content
