Free Algebra Guide

Slope-Intercept Form: y = mx + b

Learn what m and b mean, how to identify slope and y-intercept, how to graph y = mx + b, and how to write linear equations in slope-intercept form.

Slope-intercept form is one of the most useful ways to write a linear equation. When an equation is written as y = mx + b, you can quickly identify the line's slope and y-intercept. Those two pieces of information tell you how the line changes and where it crosses the y-axis.

More importantly, slope-intercept form connects three different ways of thinking about a linear relationship: its equation, its graph, and its rate of change. Learning to move between those representations is a major Algebra 1 skill.

The Structure of a Linear Equation

What Is Slope-Intercept Form?

Slope-intercept form is a way of writing a linear equation so that the slope and y-intercept are immediately visible.

Slope-Intercept Form y = mx + b

Each part of the equation has a specific meaning. The variable x is the input, y is the output, m is the slope, and b is the y-intercept.

m

Slope

The slope tells you the rate of change and whether the line rises, falls, or remains horizontal as x increases.

b

Y-Intercept

The y-intercept tells you where the line crosses the y-axis. Its coordinate is always (0, b).

Example: y = 3x − 4

Compare the equation y = 3x − 4 with y = mx + b.

The coefficient of x is 3, so m = 3. The constant is −4, so b = −4. Therefore the line has slope 3 and crosses the y-axis at (0, −4).

Part Meaning In y = 3x − 4 What It Tells You
m Slope 3 Rise 3 for every run of 1
b Y-intercept −4 Cross the y-axis at (0, −4)
The key idea: in y = mx + b, m tells you how the line moves and b tells you where the line starts on the y-axis.

Rate of Change

What Does m Mean in y = mx + b?

The value of m is the slope of the line. Slope tells you how much y changes when x changes.

If the slope is positive, the line rises from left to right. If the slope is negative, the line falls. If the slope is 0, the line is horizontal.

Positive Slope
m = 2

Rise 2 units for every run of 1 unit.

Negative Slope
m = −3

Fall 3 units for every run of 1 unit.

Fractional Slope
m = 2 5

Rise 2 units for every run of 5 units.

Zero Slope
m = 0

The y-value does not change as x changes.

Think of m as a Rate

If m = 4, then each increase of 1 in x produces an increase of 4 in y. If m = −2, each increase of 1 in x produces a decrease of 2 in y.

Where the Line Crosses the Y-Axis

What Does b Mean in y = mx + b?

The value of b is the y-intercept. It tells you where the line crosses the y-axis.

Every point on the y-axis has an x-coordinate of 0. That is why the y-intercept is always written as the ordered pair (0, b).

Example y = 2x + 5
b = 5 → y-intercept = (0, 5)
1. Find the constant
Look for the number that is not multiplied by x.
2. That number is b
In y = 2x + 5, b = 5.
3. Turn b into a point
Since the y-axis has x = 0, the point is (0, 5).

Why Does b Equal the Y-Intercept?

Substitute x = 0 into y = mx + b:

y = m(0) + b = b

So whenever x = 0, y = b. That gives the point (0, b).

Read the Equation

How to Identify m and b

When a linear equation is already written in slope-intercept form, identifying m and b is usually very quick. Compare the equation directly with y = mx + b.

Example 1 y = 4x − 7
m = 4    b = −7
Example 2 y = −x + 3
m = −1    b = 3
Example 3 y = 2 3 x − 5
m = 2/3    b = −5

Watch for Invisible Coefficients

In y = x + 6, the coefficient of x is 1, so m = 1.

In y = −x + 6, the coefficient is −1, so m = −1.

Equation m b Y-Intercept
y = 5x + 2 5 2 (0, 2)
y = −3x + 4 −3 4 (0, 4)
y = x − 8 1 −8 (0, −8)
y = −x −1 0 (0, 0)

Start at b, Then Use m

How to Graph Slope-Intercept Form

Slope-intercept form makes graphing especially convenient because the equation tells you exactly where to begin and how to move.

Consider the equation y = 2x − 3.

Equation y = 2x − 3
Y-Intercept (0, −3)
Slope 2 = 2/1
1. Plot the y-intercept
Since b = −3, begin at (0, −3).
2. Rewrite the slope as rise/run
m = 2 can be written as 2/1.
3. Use the rise
Move up 2 units.
4. Use the run
Move right 1 unit. You reach (1, −1).
5. Draw the line
Draw a straight line through the two points and extend it in both directions.
Graphing y = mx + b is easiest when you remember: start at b, then move using m.

Substitute Into y = mx + b

How to Write an Equation From m and b

If you know the slope and y-intercept, you can write the equation by substituting those values directly into y = mx + b.

Given m = 3     b = −2
1. Start with the formula
Write y = mx + b.
2. Replace m
Substitute 3 for m: y = 3x + b.
3. Replace b
Substitute −2 for b: y = 3x + (−2).
4. Simplify the signs
The final equation is y = 3x − 2.

Be Careful With Negative b

If b is negative, do not write + −2 in the final equation. Simplify the signs so y = 3x + (−2) becomes y = 3x − 2.

Read b First, Then Find m

How to Write a Slope-Intercept Equation From a Graph

When you are given a graph instead of an equation, you can work backward. Find the y-intercept and the slope, then place those values into y = mx + b.

1. Find the y-intercept
Look for the point where the line crosses the y-axis.
2. Record b
If the line crosses at (0, 4), then b = 4.
3. Find another point
Choose a second clear grid point on the line.
4. Calculate rise over run
Suppose you move down 2 and right 1. Then m = −2.
5. Write the equation
Substitute m = −2 and b = 4: y = −2x + 4.

Why Find b First?

The y-intercept is often the easiest exact point to read from a graph. Once you know b, you only need the slope to finish the equation.

Read the Slope as Rise Over Run

Fractional and Negative Slopes in y = mx + b

The slope in slope-intercept form does not have to be a whole number. Fractions are often especially useful because they show the rise and run directly.

Fractional Positive Slope
y = 2 3 x + 1

Start at (0, 1), then rise 2 and run 3.

Fractional Negative Slope
y = − 3 4 x + 5

Start at (0, 5), then fall 3 and run 4.

A Negative Sign Can Be Placed in Different Parts

The slope −3/4 can be interpreted as:

  • down 3 and right 4, or
  • up 3 and left 4.

Invisible Values and Horizontal Lines

Special Cases in Slope-Intercept Form

Some slope-intercept equations look slightly different because a coefficient or constant is not written explicitly.

Equation m b Meaning
y = x + 3 1 3 The invisible coefficient of x is 1
y = −x + 3 −1 3 The invisible coefficient is −1
y = 4x 4 0 The line crosses at the origin
y = 6 0 6 Horizontal line through (0, 6)

Vertical Lines Are Not in Slope-Intercept Form

A vertical line such as x = 4 has undefined slope. Because slope-intercept form uses a finite slope m, vertical lines cannot be written as y = mx + b.

Put the Ideas Together

Worked Slope-Intercept Form Examples

Identify m and b

y = 5x − 2

  1. Compare with y = mx + b.
  2. The coefficient of x is 5.
  3. Therefore m = 5.
  4. The constant is −2, so b = −2.
  5. The y-intercept is (0, −2).
Write an Equation

m = −3, b = 7

  1. Start with y = mx + b.
  2. Substitute m = −3.
  3. Substitute b = 7.
  4. y = −3x + 7.
Fractional Slope

m = 2/5, b = −1

  1. Start at the y-intercept (0, −1).
  2. Use slope 2/5.
  3. Rise 2 and run 5.
  4. The equation is y = (2/5)x − 1.
From a Graph

Crosses at (0, 4), slope = −2

  1. The y-intercept gives b = 4.
  2. The slope gives m = −2.
  3. Substitute into y = mx + b.
  4. y = −2x + 4.
Zero Intercept

y = 3x

  1. The coefficient gives m = 3.
  2. No constant is written.
  3. Therefore b = 0.
  4. The line passes through the origin.
Horizontal Line

y = −4

  1. There is no x-term.
  2. Therefore m = 0.
  3. The constant gives b = −4.
  4. The graph is a horizontal line through (0, −4).

Watch for These Errors

Common Slope-Intercept Form Mistakes

Mixing Up m and b

In y = mx + b, m is the slope and b is the y-intercept. The coefficient of x is not the y-intercept.

Forgetting the Sign of b

In y = 2x − 5, b = −5, not 5. The line crosses the y-axis at (0, −5).

Missing an Invisible 1

In y = x + 4, m = 1. In y = −x + 4, m = −1.

Treating b as an X-Intercept

The value b gives the y-intercept, not the x-intercept. The corresponding point is always (0, b).

Using Run Over Rise

The slope is rise over run. For a slope of 2/3, move vertically 2 units and horizontally 3 units.

Starting With the Slope Before Plotting b

When graphing y = mx + b, plot the y-intercept first. Then use the slope from that point.

Thinking Every Line Has Slope-Intercept Form

Vertical lines such as x = 3 have undefined slope and cannot be written in the form y = mx + b.

A Reliable Process

A Reliable Strategy for Slope-Intercept Form

1. Look for y = mx + b
Determine whether the equation is already written in slope-intercept form.
2. Identify m
Find the coefficient multiplying x. That value is the slope.
3. Identify b
Find the constant term. That value gives the y-intercept (0, b).
4. Interpret the slope
Read m as rise over run and check whether the line should rise, fall, or remain horizontal.
5. Graph or write the equation
If graphing, start at b and move using m. If writing an equation, substitute both values into y = mx + b.
6. Check the result
Verify that the graph crosses the y-axis at the correct point and that its direction agrees with the sign of the slope.
A quick check catches many mistakes: does the line cross at (0, b), and does its direction match the sign of m?

Practice Slope-Intercept Form

Practice identifying m and b, interpreting slope and y-intercept, building equations, and matching equations to graphs with step-by-step feedback.

Open the Slope-Intercept Form Tool

Personalized Math Support

Need Help Making Sense of the Math?

If a concept still feels confusing, you do not have to work through it alone. Tell me what you are studying and where you are getting stuck, and I will help you determine the best next step.

Support Free Math Resources

Find this resource helpful?

RaulTheTutor.com provides free interactive tools, guides, reference resources, and practice materials for students, parents, and teachers. If this resource helped you, consider making an optional contribution to support the development of more free math resources.

Support Free Math Resources