Equations of Lines and Slope
2. Slope-Intercept Form
Learning outcomes
- I can identify the slope and y-intercept in an equation written in slope-intercept form.
- I can graph a line from its slope and y-intercept.
- I can write an equation in slope-intercept form from a graph.
- I can describe how changing the slope affects the graph of a line.
- I can describe how changing the y-intercept affects the graph of a line.
Slope-Intercept Form
Slope-intercept form is one of the most useful ways to write the equation of a straight line because it immediately tells us two important features of the graph:
y = mx + b
where:
- m = slope
- b = y-intercept
The slope tells us the line's steepness and direction, while the y-intercept tells us where the line crosses the y-axis.
For example:
y = 3x + 2
has:
slope = 3
y-intercept = 2, or the point (0, 2)
Understanding y = mx + b
Consider:
y = 2x + 5
Compare this with:
y = mx + b
We can identify:
m = 2
b = 5
Therefore:
- the slope is 2
- the line rises from left to right
- y increases by 2 whenever x increases by 1
- the line crosses the y-axis at (0, 5)
Slope-intercept form gives us enough information to graph the line without making a complete table of values.
The Slope
In:
y = mx + b
the coefficient of x is the slope.
For example:
y = 4x + 7
has:
m = 4
Since:
4 = 4/1
we can interpret the slope as:
right 1, up 4
The positive slope means the line rises from left to right.
The y-Intercept
The y-intercept is the point where the graph crosses the y-axis.
Every point on the y-axis has:
x = 0
If:
y = mx + b
substitute x = 0:
y = m(0) + b
Therefore:
y = b
So the y-intercept is:
(0, b)
This explains why b represents the y-intercept.
Identifying Slope and y-Intercept
Consider:
y = 5x − 3
The coefficient of x is:
5
Therefore:
m = 5
The constant is:
−3
Therefore:
b = −3
The y-intercept is:
(0, −3)
Be Careful with Negative Signs
Consider:
y = −4x + 6
The slope is:
m = −4
The y-intercept is:
b = 6
Now consider:
y = 4x − 6
The slope is:
m = 4
The y-intercept is:
b = −6
The negative sign can belong to either m or b, so read the equation carefully.
Equations with No Written Constant
Consider:
y = 3x
This can be written as:
y = 3x + 0
Therefore:
m = 3
b = 0
The y-intercept is:
(0, 0)
The line passes through the origin.
Equations with No x-Term
Consider:
y = 7
This can be thought of as:
y = 0x + 7
Therefore:
m = 0
b = 7
The graph is a horizontal line crossing the y-axis at:
(0, 7)
Fractional Slopes
Suppose:
y = (2/3)x + 1
Then:
m = 2/3
b = 1
The slope tells us:
rise = 2
run = 3
Starting from the y-intercept, we can move:
right 3, up 2
to locate another point.
Negative Fractional Slopes
Consider:
y = −(3/4)x + 5
Then:
m = −3/4
b = 5
Starting at:
(0, 5)
move:
right 4, down 3
This gives another point on the line.
The negative slope means the line falls from left to right.
Graphing from Slope-Intercept Form
To graph:
y = mx + b
use this method:
- Identify m.
- Identify b.
- Plot the y-intercept (0, b).
- Write the slope as a fraction.
- Use the numerator as the rise.
- Use the denominator as the run.
- Plot another point.
- Repeat the slope movement if useful.
- Draw a straight line through the points.
- Extend the line in both directions.
This method is usually much faster than creating a large table of values.
Worked Example: Graphing a Positive Slope
Graph:
y = 2x + 1
Identify:
m = 2
b = 1
First plot the y-intercept:
(0, 1)
Write the slope as:
2/1
From (0, 1):
right 1
up 2
This gives:
(1, 3)
Repeat:
right 1
up 2
This gives:
(2, 5)
Draw a straight line through the points.
Checking with Substitution
We can verify that our points satisfy:
y = 2x + 1
For (1, 3):
3 = 2(1) + 1
3 = 3
Correct.
For (2, 5):
5 = 2(2) + 1
5 = 5
Correct.
Substitution is a useful way to check points on a graph.
Worked Example: Graphing a Negative Slope
Graph:
y = −3x + 4
Identify:
m = −3
b = 4
Plot:
(0, 4)
Write:
m = −3/1
From (0, 4):
right 1
down 3
This gives:
(1, 1)
Repeat:
right 1
down 3
This gives:
(2, −2)
The resulting line falls from left to right.
Graphing a Fractional Slope
Graph:
y = (1/2)x − 3
Identify:
m = 1/2
b = −3
Start at:
(0, −3)
Use the slope:
right 2
up 1
This gives:
(2, −2)
Repeat:
right 2
up 1
This gives:
(4, −1)
Then draw the line.
Moving Backward Along the Line
Slope can also be used in reverse.
Suppose:
m = 2/3
Normally we might move:
right 3
up 2
But we can also move:
left 3
down 2
because:
−2/−3 = 2/3
Both movements stay on the same line.
This is useful when the graph has limited space.
Writing an Equation from a Graph
A graph can also be converted into slope-intercept form.
To write the equation:
- Find the y-intercept.
- Determine the slope.
-
Substitute both values into:
y = mx + b
For example, suppose a graph crosses the y-axis at:
(0, 3)
and rises 2 units for every 1 unit moved right.
Then:
m = 2
b = 3
Therefore:
y = 2x + 3
Finding Slope from Two Points on a Graph
Sometimes the slope is not immediately obvious.
Choose two points on the line.
Suppose:
(0, 2) and (4, 10)
Calculate:
m = (10 − 2)/(4 − 0)
m = 8/4
m = 2
The y-intercept is already visible:
b = 2
Therefore:
y = 2x + 2
Worked Example: Equation from a Graph
Suppose a line crosses the y-axis at:
(0, 6)
and also passes through:
(2, 2)
Calculate slope:
m = (2 − 6)/(2 − 0)
m = −4/2
m = −2
The y-intercept is:
b = 6
Therefore:
y = −2x + 6
When the y-Intercept Is Negative
Suppose a graph crosses the y-axis at:
(0, −4)
and has slope:
3
Then:
m = 3
b = −4
Therefore:
y = 3x − 4
Do not write:
y = 3x + 4
The sign of the y-intercept must match the graph.
Finding an Equation from Two Points
If one point is the y-intercept, the process is especially easy.
Suppose a line passes through:
(0, −2) and (3, 4)
Calculate:
m = (4 − (−2))/(3 − 0)
m = 6/3
m = 2
Since:
(0, −2)
is the y-intercept:
b = −2
Therefore:
y = 2x − 2
What if the y-Intercept Is Not Given?
Suppose a line passes through:
(2, 5) and (4, 9)
First find the slope:
m = (9 − 5)/(4 − 2)
m = 4/2
m = 2
Now use:
y = mx + b
Substitute one known point:
5 = 2(2) + b
5 = 4 + b
b = 1
Therefore:
y = 2x + 1
This equation can then be checked using the other point.
Changing the Slope
Consider these equations:
y = x + 2
y = 2x + 2
y = 4x + 2
All have:
b = 2
Therefore, all three lines cross the y-axis at:
(0, 2)
But their slopes are different.
As the positive slope increases:
the line becomes steeper
Positive Slope Changes
Compare:
m = 1/2
m = 1
m = 3
All are positive.
All lines rise from left to right.
However:
m = 3
is the steepest.
The larger the absolute value of the slope:
the steeper the line
Negative Slope Changes
Compare:
m = −1
m = −3
m = −6
All lines fall from left to right.
The line with:
m = −6
is the steepest because:
|−6| = 6
The negative sign tells us direction.
The absolute value tells us steepness.
Changing the Sign of the Slope
Compare:
y = 3x + 2
and:
y = −3x + 2
Both have the same y-intercept:
(0, 2)
Both have the same steepness because:
|3| = |−3|
But they move in opposite directions.
The first rises.
The second falls.
When the Slope Is Zero
Consider:
y = 0x + 4
This simplifies to:
y = 4
The graph is horizontal.
Therefore:
m = 0
A zero slope means y does not change as x changes.
Can a Vertical Line Be Written in Slope-Intercept Form?
A vertical line has an undefined slope.
For example:
x = 3
is a vertical line.
It cannot be written in the form:
y = mx + b
because there is no defined value of m.
Therefore, slope-intercept form describes nonvertical straight lines, including horizontal lines, but not vertical lines.
Changing the y-Intercept
Now consider:
y = 2x + 1
y = 2x + 4
y = 2x − 3
All three lines have:
m = 2
Therefore, they have the same steepness and direction.
But they cross the y-axis at different locations.
What the y-Intercept Does to the Graph
Changing b moves the line:
up or down
without changing its slope.
Increasing b shifts the line upward.
Decreasing b shifts the line downward.
For example:
y = 2x + 5
lies above:
y = 2x + 1
for every x-value.
The lines remain parallel because their slopes are equal.
Same Slope, Different y-Intercepts
Consider:
y = 3x + 5
and:
y = 3x − 2
Both have:
m = 3
Therefore, they are distinct parallel lines.
Their y-intercepts are:
(0, 5)
and:
(0, −2)
Changing the y-intercept changes the vertical position of the line without changing its direction or steepness.
Same y-Intercept, Different Slopes
Consider:
y = x + 4
and:
y = −2x + 4
Both cross the y-axis at:
(0, 4)
But:
first line: m = 1
second line: m = −2
Therefore, the lines have different directions and steepness.
They intersect at their shared y-intercept.
Comparing m and b
The two parameters have different jobs.
| Parameter | Controls | Effect |
|---|---|---|
| m | Slope | Changes steepness and direction |
| b | y-intercept | Moves line vertically |
| Larger | m | |
| m > 0 | Direction | Line rises |
| m < 0 | Direction | Line falls |
| m = 0 | Direction | Horizontal line |
| Larger b | Vertical position | Moves line upward |
| Smaller b | Vertical position | Moves line downward |
Parallel Lines and Slope-Intercept Form
Consider:
y = 4x + 1
y = 4x − 5
Both have:
m = 4
but different y-intercepts.
Therefore, the lines are:
parallel
For distinct nonvertical lines:
same slope + different y-intercepts → parallel lines
Intersecting Lines
Consider:
y = 2x + 1
and:
y = 5x + 1
The slopes are different.
Therefore, the lines are not parallel.
They will intersect at exactly one point.
In this case they share the same y-intercept, so they intersect at:
(0, 1)
Slope-Intercept Form in Real-World Situations
Slope-intercept form is especially useful for situations involving:
constant rates of change
The general model:
y = mx + b
can be interpreted as:
output = rate × input + starting value
This is one of the most useful interpretations of slope-intercept form.
Real-World Example: Taxi Fare
Suppose a taxi charges:
- $4 starting fee
- $2 for every kilometre travelled
Let:
x = kilometres travelled
y = total cost
The equation is:
y = 2x + 4
Here:
m = 2
means:
$2 per kilometre
and:
b = 4
means:
$4 starting cost
Real-World Example: Savings
Suppose a person already has:
$100
and saves:
$25 each week
Let:
x = number of weeks
y = total savings
Then:
y = 25x + 100
The slope:
25
means savings increase by $25 each week.
The y-intercept:
100
means the person started with $100 at week 0.
Real-World Example: Water Tank
A tank initially contains:
500 L
Water enters at:
20 L/min
Let:
x = time in minutes
y = volume in litres
Then:
y = 20x + 500
Slope:
20 L/min
y-intercept:
500 L
The y-intercept represents the starting amount.
Real-World Example: Decreasing Quantity
A tank begins with:
900 L
and loses:
30 L/min
The equation is:
y = −30x + 900
The negative slope indicates that the amount decreases.
The y-intercept represents:
900 L at time 0
Interpreting the y-Intercept Carefully
Although b is always mathematically the value of y when x = 0, it may not always have a meaningful real-world interpretation.
Suppose x represents:
age of an adult
and the model is based only on ages 20–60.
The y-intercept would correspond to:
age 0
which is outside the model's intended domain.
Therefore, always ask:
Does x = 0 make sense in this situation?
Writing an Equation from a Real-World Description
Suppose a gym charges:
$30 membership fee
plus:
$8 per visit
Let:
x = number of visits
y = total cost
Rate:
m = 8
Starting amount:
b = 30
Therefore:
y = 8x + 30
Slope-intercept form makes the relationship between the rate and starting value very clear.
Writing an Equation from a Table
Consider:
| x | y |
|---|---|
| 0 | 5 |
| 1 | 8 |
| 2 | 11 |
| 3 | 14 |
The y-values increase by:
3
for every increase of 1 in x.
Therefore:
m = 3
When x = 0:
y = 5
Therefore:
b = 5
The equation is:
y = 3x + 5
A Table Without x = 0
Consider:
| x | y |
|---|---|
| 2 | 9 |
| 4 | 15 |
| 6 | 21 |
Calculate slope:
m = (15 − 9)/(4 − 2)
m = 6/2
m = 3
Use one point in:
y = mx + b
9 = 3(2) + b
9 = 6 + b
b = 3
Therefore:
y = 3x + 3
Checking an Equation Against a Graph
Suppose you think a graph represents:
y = −2x + 5
Check two features.
First:
Does the graph cross the y-axis at:
(0, 5)?
Second:
Does the graph move:
right 1, down 2?
If both are true, the equation is consistent with the graph.
Checking an Equation with a Point
Suppose the proposed equation is:
y = 3x − 2
and the graph contains:
(4, 10)
Substitute:
10 = 3(4) − 2
10 = 12 − 2
10 = 10
Therefore, the point lies on the line.
Graph Transformations Using m and b
The equation:
y = mx + b
can be thought of as a family of straight lines.
Changing m changes:
- steepness
- direction
Changing b changes:
- vertical position
- y-intercept
This allows us to predict graph changes without plotting many points.
Comparing Several Equations
Consider:
A: y = 2x + 3
B: y = 5x + 3
C: y = −2x + 3
D: y = 2x − 4
Compare A and B:
same y-intercept, different slopes
B is steeper.
Compare A and C:
same y-intercept, opposite slope signs
They rise and fall in opposite directions.
Compare A and D:
same slope, different y-intercepts
They are parallel.
From Graph to Equation: A Reliable Method
When writing an equation from a graph:
- Locate the y-axis.
- Find where the line crosses it.
- Record that value as b.
- Choose another clear point on the line.
- Calculate rise and run.
- Find m = rise/run.
- Determine the sign of m.
-
Write:
y = mx + b
- Check the signs carefully.
- Substitute a point to verify the equation.
From Equation to Graph: A Reliable Method
When graphing:
y = mx + b
- Identify m.
- Identify b.
- Plot (0, b).
- Write m as a fraction.
- Use the numerator for vertical movement.
- Use the denominator for horizontal movement.
- Plot a second point.
- Repeat if useful.
- Draw the straight line.
- Check whether its direction matches the sign of m.
If m > 0:
the graph should rise.
If m < 0:
the graph should fall.
If m = 0:
the graph should be horizontal.
Common Mistakes
Confusing m and b
In y = mx + b:
m = slope
b = y-intercept.
Giving only b instead of the y-intercept point
If b = 4, the y-intercept is:
(0, 4)
Plotting the y-intercept on the x-axis
The y-intercept must lie on the y-axis.
Ignoring the negative sign on the slope
m = −3 means the line falls from left to right.
Using slope backward
For m = 2/3:
rise = 2
run = 3
not rise = 3 and run = 2.
Thinking a negative y-intercept means negative slope
Slope and y-intercept are independent.
For example:
y = 4x − 7
has positive slope and negative y-intercept.
Thinking changing b changes steepness
Changing b moves the line vertically. It does not change slope.
Thinking changing m only moves the line up or down
Changing m changes the line's steepness and possibly its direction.
Thinking every straight line can be written in slope-intercept form
Vertical lines such as x = 4 have undefined slope and cannot be written as y = mx + b.
Assuming b always has a meaningful physical interpretation
In a model, x = 0 may lie outside the relevant domain.
Key Terms
Slope-intercept form — form of a linear equation written as y = mx + b.
Slope (m) — rate of change and measure of a line's steepness and direction.
y-intercept (b) — y-value where the line crosses the y-axis.
y-intercept point — coordinate (0, b).
Rise — vertical change between points.
Run — horizontal change between points.
Positive slope — slope greater than zero; graph rises from left to right.
Negative slope — slope less than zero; graph falls from left to right.
Zero slope — slope of a horizontal line.
Undefined slope — slope of a vertical line.
Linear equation — equation whose graph is a straight line.
Linear relationship — relationship with a constant rate of change.
Rate of change — amount one variable changes relative to another.
Parallel lines — lines in the same plane that never meet; distinct nonvertical parallel lines have equal slopes.
Origin — point (0, 0).
Coefficient — numerical factor multiplying a variable.
Constant — number without a variable attached.
Initial value — value of the dependent variable when the independent variable is zero, when meaningful in context.
Key Takeaways
- Slope-intercept form is y = mx + b.
- The value m represents slope.
- The value b represents the y-intercept.
- The y-intercept is the point (0, b).
- Positive slopes rise from left to right.
- Negative slopes fall from left to right.
- Larger absolute slope values produce steeper lines.
- A slope of zero produces a horizontal line.
- Vertical lines have undefined slope and cannot be written in slope-intercept form.
- To graph y = mx + b, plot the y-intercept first and then use the slope.
- A fractional slope can be interpreted using rise over run.
- A graph can be converted to an equation by finding its slope and y-intercept.
- If the y-intercept is not directly given, b can be calculated using a known point and slope.
- Changing m changes the line's steepness and direction.
- Changing b moves the line vertically without changing its slope.
- Distinct lines with the same slope and different y-intercepts are parallel.
- Lines with different slopes intersect at exactly one point.
- In real-world models, m often represents a rate.
- In real-world models, b often represents an initial or starting value.
- The y-intercept is not always meaningful if x = 0 lies outside the model's relevant domain.
- Slope-intercept form provides a direct connection between equations, graphs, tables, and real-world linear relationships.
Check Your Understanding
- In the equation y = 4x + 7, identify the slope and y-intercept.
- Identify m and b in y = −3x − 5. State whether the line rises or falls from left to right.
- Find the slope and y-intercept of y = (2/5)x + 4.
- Describe how you would graph y = 3x − 2 using only its slope and y-intercept.
- Describe how you would graph y = −(2/3)x + 5.
- A line crosses the y-axis at (0, 4) and has slope 3. Write its equation in slope-intercept form.
- A line crosses the y-axis at (0, −6) and passes through (2, 0). Calculate its slope and write its equation.
- A line passes through (2, 7) and (4, 13). Calculate the slope, determine the y-intercept, and write the equation in slope-intercept form.
- Compare y = 2x + 1 and y = 6x + 1. What remains the same, and what changes?
- Compare y = −3x + 5 and y = −3x − 4. Describe the relationship between their graphs.
- Explain what happens to the graph of y = mx + b when b increases while m remains constant.
- Explain what happens as the absolute value of m increases while b remains constant.
- A taxi charges a $5 starting fee and $3 per kilometre. Write an equation for total cost y after travelling x kilometres. Explain the meaning of both m and b.
- Explain why the vertical line x = 6 cannot be written in slope-intercept form.
- A student says, "Changing the y-intercept makes a line steeper because the line moves higher on the graph." Evaluate this statement. Explain the different effects of changing m and changing b.