Slope-Intercept Form: Formula, Rules & Examples

Slope-intercept form is a way to write a linear equation so that the line’s slope and y-intercept can be read directly from the equation.
The formula is:
y = mx + b
where:
- m = slope of the line
- b = y-intercept
- x and y = coordinates of points on the line
For example:
y = 3x + 4
has:
m = 3
and:
b = 4
So the line has slope 3 and crosses the y-axis at:
(0, 4)
Slope-intercept form is one of the most useful representations of a straight line in algebra because it makes both the line’s rate of change and vertical position immediately visible.
What Is Slope-Intercept Form?
Slope-intercept form is:
y = mx + b
It represents any nonvertical straight line.
The equation separates two important characteristics of the line:
m = slope
and:
b = y-intercept
The slope tells you how much y changes when x changes.
The y-intercept tells you where the line crosses the y-axis.
For:
y = -2x + 7
the slope is:
m = -2
and the y-intercept is:
b = 7
Therefore the line crosses the y-axis at:
(0, 7)
and falls 2 units vertically for every 1-unit increase in x.
Slope-Intercept Form Formula
The standard slope-intercept formula is:
y = mx + b
This should not be confused with standard form of a line, which is commonly written:
Ax + By = C
Both equations can describe the same line.
Slope-intercept form emphasizes the slope and y-intercept, while standard form organizes the x-term and y-term on the same side.
What Does m Mean?
In:
y = mx + b
the value m represents the slope.
Slope is the rate of vertical change compared with horizontal change:
m = change in y / change in x
Using two points:
m = (y₂ – y₁) / (x₂ – x₁)
provided:
x₂ ≠ x₁
Slope is also commonly described as:
m = rise / run
For example, if a line rises 6 units while moving 3 units to the right:
m = 6/3
m = 2
Positive Slope
If:
m > 0
the line rises from left to right.
For example:
y = 2x + 1
has:
m = 2
As x increases by 1, y increases by 2.
Starting from the y-intercept:
(0, 1)
one possible next point is:
(1, 3)
because:
3 – 1 = 2
Negative Slope
If:
m < 0
the line falls from left to right.
For example:
y = -3x + 5
has:
m = -3
For each increase of 1 in x, y decreases by 3.
From:
(0, 5)
another point is:
(1, 2)
because:
2 – 5 = -3
Zero Slope
A horizontal line has:
m = 0
For example:
y = 6
can be written:
y = 0x + 6
Therefore:
m = 0
b = 6
The y-value stays constant no matter how x changes.
Undefined Slope
A vertical line has undefined slope.
For example:
x = 4
cannot be written in ordinary slope-intercept form because there is no single finite number m that represents its slope.
Using the two-point slope formula on two vertical-line points produces:
x₂ – x₁ = 0
which would require division by zero.
Therefore vertical lines are an important exception to the formula:
y = mx + b
What Does b Mean?
The value b is the y-intercept.
The y-intercept occurs where:
x = 0
For:
y = 5x – 8
set x = 0:
y = 5(0) – 8
y = -8
Therefore the line crosses the y-axis at:
(0, -8)
This is why b can be read directly from slope-intercept form.
Example 1: Identify the Slope and Y-Intercept
Consider:
y = 4x + 9
Compare with:
y = mx + b
Therefore:
m = 4
b = 9
The slope is 4, and the y-intercept is:
(0, 9)
Example 2: Negative Y-Intercept
Consider:
y = 2x – 7
The equation can be viewed as:
y = 2x + (-7)
Therefore:
m = 2
b = -7
The line crosses the y-axis at:
(0, -7)
The minus sign belongs to the intercept.
Example 3: Fractional Slope
Consider:
y = (3/4)x + 2
The slope is:
m = 3/4
This can be interpreted as:
rise = 3
run = 4
Starting at:
(0, 2)
move 4 units right and 3 units up to obtain:
(4, 5)
Check:
y = (3/4)(4) + 2
y = 3 + 2
y = 5
How to Graph Slope-Intercept Form
For:
y = mx + b
begin with the y-intercept:
(0, b)
Then use the slope to locate another point.
Suppose:
y = 2x + 3
The y-intercept is:
(0, 3)
The slope is:
2 = 2/1
From (0, 3), move:
1 unit right
and:
2 units up
This gives:
(1, 5)
Draw the straight line through the two points.
Graphing a Negative Slope
Consider:
y = -(2/3)x + 4
Start with:
(0, 4)
The slope:
-2/3
can be interpreted as moving:
3 units right
and:
2 units down
This gives:
(3, 2)
Check:
y = -(2/3)(3) + 4
y = -2 + 4
y = 2
Finding Slope From Two Points
Suppose a line passes through:
(2, 5)
and:
(6, 13)
Use:
m = (y₂ – y₁)/(x₂ – x₁)
Substitute:
m = (13 – 5)/(6 – 2)
m = 8/4
m = 2
The line therefore has slope:
m = 2
You still need b before the equation can be written in slope-intercept form.
Finding the Slope-Intercept Equation From Two Points
Suppose a line passes through:
(2, 5)
and:
(6, 13)
We already found:
m = 2
Now use:
y = mx + b
Substitute one known point, such as (2, 5):
5 = 2(2) + b
5 = 4 + b
b = 1
Therefore:
y = 2x + 1
Check the second point:
13 = 2(6) + 1
13 = 13
The equation is correct.
Finding b From a Point and Slope
Suppose:
m = -3
and the line passes through:
(4, -5)
Start with:
y = mx + b
Substitute:
-5 = -3(4) + b
-5 = -12 + b
Add 12:
b = 7
Therefore:
y = -3x + 7
The required algebra is an ordinary equation-solving step; the general balancing rules are covered under solving equations.
Converting Standard Form to Slope-Intercept Form
Suppose:
2x + 3y = 12
Solve for y.
Subtract 2x:
3y = -2x + 12
Divide every term by 3:
y = -(2/3)x + 4
Therefore:
m = -2/3
and:
b = 4
The same line can therefore be written as:
2x + 3y = 12
or:
y = -(2/3)x + 4
The first is standard form; the second is slope-intercept form.
Example: Convert 5x – 2y = 10
Start with:
5x – 2y = 10
Subtract 5x:
-2y = -5x + 10
Divide every term by -2:
y = (5/2)x – 5
Therefore:
m = 5/2
b = -5
The line crosses the y-axis at:
(0, -5)
Converting Slope-Intercept Form to Standard Form
Start with:
y = 3x – 5
Move 3x to the left:
-3x + y = -5
An equivalent form is:
3x – y = 5
The preferred conventions for coefficients and signs can vary, but both equations describe the same line.
The dedicated standard form of a line guide covers that representation in more detail.
Finding the X-Intercept From Slope-Intercept Form
Slope-intercept form reveals the y-intercept immediately, but the x-intercept usually requires a calculation.
At the x-intercept:
y = 0
Consider:
y = 2x – 8
Set y = 0:
0 = 2x – 8
2x = 8
x = 4
Therefore the x-intercept is:
(4, 0)
The y-intercept is:
(0, -8)
Special Case: b = 0
If:
b = 0
then:
y = mx
The line passes through the origin:
(0, 0)
For example:
y = 5x
has slope 5 and y-intercept 0.
This is also the characteristic algebraic structure of a direct variation relationship.
Finding an Equation From a Graph
To write slope-intercept form from a graph, first identify the y-intercept.
Suppose the graph crosses the y-axis at:
(0, -2)
so:
b = -2
Now choose another clear point, such as:
(3, 4)
Calculate the slope:
m = (4 – (-2))/(3 – 0)
m = 6/3
m = 2
Therefore:
y = 2x – 2
Finding an Equation From a Table
Suppose a table contains:
| x | y |
|---|---|
| 0 | 3 |
| 1 | 5 |
| 2 | 7 |
| 3 | 9 |
The y-value increases by 2 whenever x increases by 1.
Therefore:
m = 2
At x = 0:
y = 3
so:
b = 3
The equation is:
y = 2x + 3
Substitution confirms all four rows.
Slope as a Rate of Change
Slope is not merely a graphing instruction. It measures the constant rate of change of a linear relationship.
Suppose:
C = 25x + 40
where C represents cost and x represents a quantity.
The coefficient:
25
means the cost increases by 25 units for each one-unit increase in x.
The constant:
40
is the value when:
x = 0
The same structure is mathematically equivalent to:
y = mx + b
Negative Rate of Change
Consider:
V = -4t + 100
The slope is:
-4
so V decreases by 4 units for every one-unit increase in t.
At:
t = 0
the value is:
V = 100
Thus the intercept represents the starting value, while the slope represents the constant change per unit.
Parallel Lines in Slope-Intercept Form
Two distinct nonvertical parallel lines have the same slope.
For example:
y = 3x + 2
and:
y = 3x – 7
both have:
m = 3
but different y-intercepts.
They therefore rise at the same rate and never intersect.
Slope-intercept form makes this relationship immediately visible.
Perpendicular Slopes
For two nonvertical, nonhorizontal perpendicular lines, their slopes are negative reciprocals.
If one line has:
m = 2/3
a perpendicular line has:
m = -3/2
Their product is:
(2/3)(-3/2) = -1
The horizontal-vertical case is handled separately because a vertical line has undefined slope.
Comparing Two Lines
Consider:
Line A: y = 4x + 1
Line B: y = -2x + 1
Both have the same y-intercept:
b = 1
so both pass through:
(0, 1)
Their slopes differ:
m₁ = 4
m₂ = -2
Therefore one rises and the other falls as x increases.
Slope-intercept form makes this comparison possible without graphing every point.
Fractions in Slope-Intercept Form
A fractional slope is still an ordinary constant.
For example:
y = (5/7)x – 3
is a linear equation with:
m = 5/7
and:
b = -3
A fraction by itself does not make the equation a rational expression. Rational expressions involve quotients of polynomial expressions, particularly when a variable occurs in the denominator.
For comparison:
y = 5/x – 3
is not slope-intercept form because the coefficient of x is not a constant and the graph is not a straight line.
Radical Values for the Slope
The slope can also be an irrational number.
For example:
y = √2x + 5
means:
m = √2
b = 5
The presence of √2 as a constant does not make the equation nonlinear.
The simplification rules for constants involving roots belong to radical expressions.
What matters for slope-intercept form is that x appears to the first power and is multiplied by a constant slope.
When Rearranging Produces Rational Expressions
A line written in standard form may require ordinary fraction simplification when solving for y.
For example:
3x + 7y = 10
gives:
7y = -3x + 10
and:
y = (-3/7)x + 10/7
These are constant fractions, so the result remains linear.
By contrast, if rearrangement leaves an unknown in a denominator, the expression may no longer describe a line and can require the rules for a rational equation or rational expression instead.
Slope-Intercept Form and Function Notation
A line can also be written using function notation:
f(x) = mx + b
For example:
f(x) = 2x – 5
is equivalent to:
y = 2x – 5
Then:
f(3) = 2(3) – 5
f(3) = 1
which corresponds to the point:
(3, 1)
on the line.
Is Every Linear Equation in Slope-Intercept Form?
No.
The equation:
3x + 2y = 8
is linear but is not yet in slope-intercept form.
Solving for y gives:
2y = -3x + 8
y = -(3/2)x + 4
Now it is in slope-intercept form.
A vertical line such as:
x = 3
is linear but cannot be expressed as y = mx + b because its slope is undefined.
Common Slope-Intercept Form Mistakes
Confusing m and b
In:
y = -4x + 7
the slope is:
-4
and the y-intercept is:
7
not the other way around.
Dropping a Negative Sign
For:
y = -2x – 6
both the slope and intercept are negative:
m = -2
b = -6
Reading a Fractional Slope Backward
For:
m = 3/5
the usual interpretation is:
rise = 3
run = 5
not rise 5 and run 3.
Forgetting That b Is a Coordinate Value
If:
b = 4
the y-intercept point is:
(0, 4)
not (4, 0).
Dividing Only One Term When Solving for y
From:
2x + 4y = 12
after subtracting 2x:
4y = -2x + 12
divide both terms on the right by 4:
y = -(1/2)x + 3
Trying to Write a Vertical Line as y = mx + b
Vertical lines have undefined slope, so ordinary slope-intercept form does not apply.
Worked Slope-Intercept Form Example
Find the slope-intercept equation of the line passing through:
(-2, 5)
and:
(4, -7)
First calculate the slope:
m = (y₂ – y₁)/(x₂ – x₁)
m = (-7 – 5)/(4 – (-2))
m = -12/6
m = -2
Now write:
y = -2x + b
Use the point (-2, 5):
5 = -2(-2) + b
5 = 4 + b
b = 1
Therefore:
y = -2x + 1
Check the second point:
-7 = -2(4) + 1
-7 = -8 + 1
-7 = -7
So the equation is:
y = -2x + 1
Its slope is -2 and its y-intercept is:
(0, 1)
Frequently Asked Questions
What is slope-intercept form?
Slope-intercept form is:
y = mx + b
where m is the slope and b is the y-intercept.
What does m represent?
m represents the slope, or constant rate of change:
m = (y₂ – y₁)/(x₂ – x₁)
What does b represent?
b is the y-coordinate where the line crosses the y-axis. The y-intercept point is:
(0, b)
How do you find the slope from two points?
Use:
m = (y₂ – y₁)/(x₂ – x₁)
provided x₂ – x₁ is not zero.
How do you find b if you know a point and the slope?
Substitute the known x, y, and m values into:
y = mx + b
then solve for b.
How do you graph y = mx + b?
Plot the y-intercept (0, b), then use the slope as rise/run to locate another point. Draw the straight line through the points.
What does a negative slope mean?
A negative slope means the line decreases as x increases.
What does a zero slope mean?
A zero slope produces a horizontal line:
y = b
Can a vertical line be written in slope-intercept form?
No. A vertical line has undefined slope and is written in a form such as:
x = a
How do you convert standard form to slope-intercept form?
Solve the standard-form equation for y. For example:
2x + 3y = 12
becomes:
y = -(2/3)x + 4
How do you find the x-intercept from slope-intercept form?
Set:
y = 0
and solve for x.
Is y = (2/3)x + 4 a linear equation?
Yes. The fractional slope 2/3 is a constant, so the equation remains linear and is already in slope-intercept form.



