Slope-Intercept Form
The slope-intercept form of a linear equation is probably the most useful way to write a line. It immediately tells you the two most important features of the line: its slope and where it crosses the \(y\)-axis.
The form is:
$$y = mx + b$$
where \(m\) is the slope and \(b\) is the \(y\)-intercept.
Why is this useful? Because once you know the slope and \(y\)-intercept, you can graph the line in seconds, and you can understand what the equation means in real-world contexts.
What the Variables Mean
\(m\) is the slope. It tells you how steep the line is and which direction it goes. A positive \(m\) means the line goes up from left to right. A negative \(m\) means it goes down.
\(b\) is the \(y\)-intercept. It's the \(y\)-coordinate of the point where the line crosses the \(y\)-axis. In other words, it's the value of \(y\) when \(x = 0\).
Example: In the equation \(y = 3x + 2\), the slope is 3 and the \(y\)-intercept is 2. The line rises 3 units for every 1 unit to the right, and it crosses the \(y\)-axis at \((0, 2)\).
Example: In \(y = -\frac{1}{2}x + 5\), the slope is \(-\frac{1}{2}\) and the \(y\)-intercept is 5. The line goes down, dropping 1 unit for every 2 units to the right, and crosses the \(y\)-axis at \((0, 5)\).
Graphing from Slope-Intercept Form
This is where slope-intercept form really shines. You can graph a line in two quick steps.
Step 1: Plot the \(y\)-intercept. That's the point \((0, b)\).
Step 2: Use the slope to find another point. Remember, slope is rise over run. From the \(y\)-intercept, move up or down (rise) and right (run) according to the slope, then plot that second point.
Step 3: Draw a line through the two points.
Example: Graph \(y = 2x + 1\).
Step 1: The \(y\)-intercept is 1, so plot \((0, 1)\).
Step 2: The slope is 2, which is \(\frac{2}{1}\). From \((0, 1)\), move up 2 and right 1. You're now at \((1, 3)\). Plot that point.
Step 3: Draw a line through \((0, 1)\) and \((1, 3)\).
Example: Graph \(y = -\frac{3}{4}x + 2\).
Step 1: Plot \((0, 2)\).
Step 2: The slope is \(-\frac{3}{4}\), which means down 3 and right 4. From \((0, 2)\), move down 3 to \(y = -1\), then right 4 to \(x = 4\). You're at \((4, -1)\). Plot it.
Step 3: Draw the line.
You could also think of \(-\frac{3}{4}\) as \(\frac{3}{-4}\), which means up 3 and left 4. From \((0, 2)\), move up 3 and left 4 to get \((-4, 5)\). Same line, different second point.
Writing Equations in Slope-Intercept Form
If you're given the slope and \(y\)-intercept, writing the equation is trivial—just plug them into \(y = mx + b\).
Example: Write the equation of a line with slope 4 and \(y\)-intercept -3.
$$y = 4x - 3$$
Example: Write the equation of a line with slope \(-\frac{2}{5}\) and \(y\)-intercept 7.
$$y = -\frac{2}{5}x + 7$$
Finding the Equation from a Graph
If you have a graph, you can read off the \(y\)-intercept (where the line crosses the \(y\)-axis) and calculate the slope using rise over run.
Example: A line crosses the \(y\)-axis at \((0, -2)\) and also passes through \((3, 4)\).
The \(y\)-intercept is -2, so \(b = -2\).
Find the slope: $$m = \frac{4 - (-2)}{3 - 0} = \frac{6}{3} = 2$$
The equation is \(y = 2x - 2\).
Converting from Standard Form
Sometimes you'll see an equation in standard form, like \(3x + 2y = 12\). To convert it to slope-intercept form, solve for \(y\).
Example: Convert \(3x + 2y = 12\) to slope-intercept form.
Subtract \(3x\) from both sides: $$2y = -3x + 12$$
Divide everything by 2: $$y = -\frac{3}{2}x + 6$$
Now it's in slope-intercept form. The slope is \(-\frac{3}{2}\) and the \(y\)-intercept is 6.
Example: Convert \(5x - y = 10\) to slope-intercept form.
Subtract \(5x\): $$-y = -5x + 10$$
Multiply by -1: $$y = 5x - 10$$
Slope is 5, \(y\)-intercept is -10.
Writing Equations from Two Points
If you know two points on a line, you can find the slope with the slope formula, then use one of the points to find \(b\).
Example: Write the equation of the line through \((2, 3)\) and \((6, 11)\).
Step 1: Find the slope. $$m = \frac{11 - 3}{6 - 2} = \frac{8}{4} = 2$$
Step 2: Use \(y = mx + b\) with one of the points to find \(b\). Let's use \((2, 3)\). $$3 = 2(2) + b$$ $$3 = 4 + b$$ $$b = -1$$
Step 3: Write the equation. $$y = 2x - 1$$
You can verify this works for the other point too: \(11 = 2(6) - 1 = 12 - 1 = 11\). Check!
Special Cases
Horizontal lines have the form \(y = b\) (slope is 0). Example: \(y = 3\).
Vertical lines can't be written in slope-intercept form because their slope is undefined. They're written as \(x = c\). Example: \(x = -2\).
Slope-Intercept Form in Real Life
The slope-intercept form shows up constantly in real-world problems because it naturally represents a starting value (\(b\)) and a rate of change (\(m\)).
Example: A phone plan costs $20 per month plus $0.10 per text message. Write an equation for total cost \(C\) based on the number of texts \(t\).
The starting cost (when \(t = 0\)) is $20. That's the \(y\)-intercept: \(b = 20\).
The cost increases by $0.10 for each text. That's the slope: \(m = 0.10\).
Equation: \(C = 0.10t + 20\)
Example: A candle is 8 inches tall and burns at a rate of 0.5 inches per hour. Write an equation for the candle's height \(h\) after \(t\) hours.
The starting height is 8 inches: \(b = 8\).
It decreases by 0.5 inches per hour: \(m = -0.5\) (negative because it's decreasing).
Equation: \(h = -0.5t + 8\)
After 4 hours: \(h = -0.5(4) + 8 = -2 + 8 = 6\) inches.
Try These Out
-
What are the slope and \(y\)-intercept of \(y = -4x + 7\)?
-
Graph \(y = \frac{1}{3}x - 2\).
-
Write the equation of a line with slope 5 and \(y\)-intercept -1.
-
Convert \(4x + y = 8\) to slope-intercept form.
-
Write the equation of the line through \((1, 2)\) and \((3, 8)\).
-
A taxi charges $3 plus $2 per mile. Write an equation for cost \(C\) based on miles \(m\).
Solutions:
-
Slope is -4, \(y\)-intercept is 7.
-
Plot \((0, -2)\). Slope is \(\frac{1}{3}\), so from \((0, -2)\) go up 1 and right 3 to \((3, -1)\). Draw the line.
-
\(y = 5x - 1\)
-
Solve for \(y\): \(y = -4x + 8\)
-
Slope: \(m = \frac{8-2}{3-1} = \frac{6}{2} = 3\). Use \((1, 2)\): \(2 = 3(1) + b\), so \(b = -1\). Equation: \(y = 3x - 1\)
-
\(C = 2m + 3\)
What Goes Wrong
Confusing \(m\) and \(b\) is the most basic error. The slope always multiplies \(x\). The \(y\)-intercept is the standalone constant term. In \(y = 3x - 5\), the slope is 3 (not -5) and the \(y\)-intercept is -5 (not 3).
Graphing with the slope backwards—using run over rise instead of rise over run—will put your second point in the wrong place. Slope is always \(\frac{\text{rise}}{\text{run}}\), which means vertical change over horizontal change.
Losing track of negative signs is surprisingly common. In \(y = 3x - 5\), the \(y\)-intercept is negative 5, not positive 5. That minus sign matters.
When converting from standard form, some students forget to divide every term. If you have \(2y = -4x + 6\) and you divide by 2, both the \(-4x\) and the \(6\) get divided: \(y = -2x + 3\).
Using the wrong point when finding \(b\) from a point leads to incorrect equations. When you substitute into \(y = mx + b\), make sure the \(y\)-value goes on the left and the \(x\)-value goes where \(x\) is. It sounds obvious, but it's easy to flip them.