Algebraโฑ 5 min read

Slope-Intercept Form

y = mx + b

What is the Slope-Intercept Form?

Slope-intercept form immediately tells you two key facts about a line just by reading its equation: how steep it is (m) and where it crosses the y-axis (b). That makes it the most convenient form for graphing a line quickly.

If you're instead given two points on the line rather than m and b directly, find the slope first with m = (yโ‚‚ โˆ’ yโ‚) / (xโ‚‚ โˆ’ xโ‚), then substitute one point into y = mx + b to solve for b.

What Each Variable Means

y
Dependent variableThe output value, plotted on the vertical axis.
x
Independent variableThe input value, plotted on the horizontal axis.
m
SlopeThe line's steepness โ€” rise over run. Positive slopes go up left-to-right; negative slopes go down.
b
y-interceptThe value of y when x = 0 โ€” where the line crosses the y-axis.

When to Use It

  • Graphing a line quickly from its equation
  • Writing the equation of a line when the slope and y-intercept are known or easy to find
  • Comparing two lines' steepness or predicting where they'll cross the y-axis
Advertisement

Step-by-Step Example

Problem: A line has slope 2 and y-intercept โˆ’3. Write its equation and find y when x = 4.

1
Identify m and b

Read the slope and y-intercept from the problem.

m = 2, b = -3
2
Write the equation

Substitute m and b into y = mx + b.

y = 2x - 3
3
Substitute x = 4

Plug in the given x value.

y = 2(4) - 3 = 8 - 3
โœ“
Answer: y = 5 โ€” the point (4, 5) lies on the line

Interactive Calculator

Result will appear here

Common Mistakes

  • Mistake: Confusing the slope and y-intercept when reading an equation.

    Fix: In y = mx + b, m is always the coefficient of x (the slope), and b is the standalone constant (the y-intercept) โ€” the order never changes.

  • Mistake: Forgetting the sign of a negative y-intercept.

    Fix: y = mx + b with b = -3 must be written as y = mx โˆ’ 3, not y = mx + 3.

Practice Questions

  1. Write the equation of a line with slope โˆ’1 and y-intercept 5, then find y when x = 2.

  2. A line passes through (0, 4) and (2, 8). Find its slope-intercept equation.

    Hint: The y-intercept is given directly by the point (0, 4); find the slope from the two points first.

Frequently Asked Questions

What if the line is vertical?

A vertical line (x = constant) has an undefined slope and cannot be written in slope-intercept form at all โ€” it isn't a function of x.

How do I find the slope from two points?

m = (yโ‚‚ โˆ’ yโ‚) / (xโ‚‚ โˆ’ xโ‚). Once you have m, substitute either point into y = mx + b and solve for b.