Slope and Linear Equations: How to Find Slope and Write y = mx + b
A 7th-and-8th-grade guide to slope: the rise-over-run definition, the slope formula between two points, slope-intercept form y = mx + b, and how to read slope from a graph.
What is slope?
Slope measures how steep a line is — how fast the -value changes as the -value changes. The classic definition is
where rise is the vertical change and run is the horizontal change between any two points on the line.
We almost always call slope . A bigger means a steeper line; the sign of tells you the direction:
- : the line goes up from left to right.
- : the line goes down from left to right.
- : the line is horizontal ( never changes).
- undefined: the line is vertical (run is zero, so we cannot divide).
The slope formula between two points
Given two points and on a line, the slope is
The numerator is the rise; the denominator is the run. The order of the points does not matter as long as you are consistent on top and bottom.
Example 1. Find the slope of the line through and .
The line rises units for every unit you move right.
Example 2. Find the slope of the line through and .
A slope of means the line falls unit for every unit you move right.
Slope-intercept form:
The most useful form of a linear equation is slope-intercept form:
where:
- is the slope, and
- is the -intercept — the -value where the line crosses the -axis (the point ).
Once a line is in this form, you can read off both pieces of information instantly.
Example 3. Identify the slope and -intercept of .
The line has slope and crosses the -axis at , so .
Writing a line from two points
Given two points, you can produce the slope-intercept equation in three steps:
- Compute the slope using the formula above.
- Plug one point into and solve for .
- Write the equation with the values you found.
Example 4. Find the equation of the line through and .
- Slope: .
- Plug into : , so .
- The line is .
You can sanity-check by plugging in the second point: . ✓
Graphing a line from
When the equation is already in slope-intercept form, graphing is fast:
- Plot the -intercept .
- Use the slope as rise/run from that point to find a second point.
- Draw the line through the two points.
Example 5. Graph .
- Start at .
- Slope means "rise , run ." So the next point is .
- Draw the line through and .
For a negative slope, you can either go down-right or up-left — both produce the same line.
Other forms you will see
You may also see lines written in these forms; each is just in disguise.
- Point-slope form: , where is any point on the line. Useful when you know a point and a slope but not yet .
- Standard form: , with , , integers. To convert to slope-intercept form, solve for .
Example 6. Convert to slope-intercept form.
Solve for :
So the slope is and the -intercept is .
Common mistakes
- Subtracting in different orders top and bottom. — both subtractions must use the same order, or the sign of the slope flips.
- Reading the -intercept off a wrong form. is the constant term in , not in . Always solve for first.
- Mixing up rise and run. Rise is the change in (up/down); run is the change in (left/right). On the formula, rise is the numerator.
- Calling a vertical line "slope ." Vertical lines have undefined slope (the run is zero). Horizontal lines are the ones with slope .
Practice Yourself
Try each one on paper first, then click Show answer to check your work.
- 1Practice problem 1
Find the slope of the line through and .
Show answerHide answer
.
- 2Practice problem 2
Identify the slope and -intercept of .
Show answerHide answer
Slope (line falls units for every units right). -intercept is , so .
- 3Practice problem 3
Write the slope-intercept equation of the line through with slope .
Show answerHide answer
The -intercept is given as , so . The equation is .
- 4Practice problem 4
Convert to slope-intercept form. What are the slope and -intercept?
Show answerHide answer
Solve for : . Slope , -intercept .
- 5Practice problem 5
Write the equation of the line through and in slope-intercept form.
Show answerHide answer
Slope: . Plug into : , so . The line is .
Related Topics
Frequently Asked Questions
What does "rise over run" mean?
Rise is the vertical change between two points on the line; run is the horizontal change. Slope equals rise divided by run, which measures how many units up the line goes for every unit it goes right.
What is the difference between slope-intercept form and point-slope form?
Slope-intercept form shows the slope and where the line meets the -axis. Point-slope form shows the slope and one specific point. They describe the same line — just the most convenient piece of info up front.
What does it mean if the slope is zero?
A slope of zero means the line is horizontal — stays constant no matter what does. The equation looks like .
Why is a vertical line's slope undefined?
Because the run (the change in ) is zero, and dividing by zero is not defined. Vertical lines are written as constant.
Does the order of the two points matter in the slope formula?
No, as long as you keep the order consistent on top and bottom. and give the same slope.
Want to keep going?
Try a different problem with the AI Math Solver, browse the practice library, or return to Middle School Math.