Sub topic 7
Slope-intercept form: \(y = mx + b\)
Assume you can plot ordered pairs, work with signed numbers and fractions, and solve two-step linear equations. This chapter uses the slope formula and the coordinate plane.
Reading \(y = mx + b\)
The slope-intercept form is
\[ y = mx + b \]
It describes a line using two important values:
- \(m\) is the slope, or the change in \(y\) for each increase of 1 in \(x\).
- \(b\) is the \(y\)-intercept, the point where the line crosses the \(y\)-axis.
Because every point on the line has \(x = 0\) at the \(y\)-axis, substitute \(x=0\):
\[ y=m(0)+b=b \]
Therefore, the \(y\)-intercept is the point \((0,b)\).
| Part | Meaning | Example in \(y=-3x+5\) |
|---|---|---|
| \(m\) | slope | \(-3\) |
| \(b\) | \(y\)-intercept | \(5\) |
| Starting point | point on the \(y\)-axis | \((0,5)\) |
The equation \(y=-3x+5\) means that the line starts at \((0,5)\) and falls 3 units for every 1 unit moved right.
Graphing from slope-intercept form
To graph \(y=mx+b\):
- Plot the \(y\)-intercept \((0,b)\).
- Rewrite the slope as a fraction, if needed. The numerator is the rise, and the denominator is the run.
- From the intercept, move according to the rise and run.
- Plot another point and draw the line through the points.
For \(y=\frac{2}{3}x-1\), first plot \((0,-1)\). Then move up 2 and right 3 to reach \((3,1)\). You can also move down 2 and left 3 to find another point.
Writing an equation from a slope and a point
If the slope \(m\) and \(y\)-intercept \(b\) are given, substitute them directly. For example, slope \(4\) and intercept \(-2\) produce
\[ y=4x-2 \]
If you know a slope and a point that is not the \(y\)-intercept, use the point to find \(b\). Suppose \(m=2\) and the line passes through \((3,7)\). Substitute \(x=3\) and \(y=7\):
\[ 7=2(3)+b \]
\[ 7=6+b \]
\[ b=1 \]
The equation is
\[ y=2x+1 \]
Check it by substituting \(x=3\): \(y=2(3)+1=7\).
def line_through(x1, y1, x2, y2):
if x1 == x2:
raise ValueError("A vertical line has no slope-intercept form")
m = (y2 - y1) / (x2 - x1)
b = y1 - m * x1
return m, b
m, b = line_through(1, 3, 3, 7)
print(f"y = {m}x + {b}") # y = 2.0x + 1.0Common errors
- Do not confuse \(b\) with the \(x\)-intercept. The value \(b\) gives the \(y\)-intercept.
- Preserve the sign. In \(y=-\frac12x+4\), the slope is negative.
- A whole-number slope such as \(3\) means \(\frac31\), so move up 3 and right 1.
- A vertical line cannot be written as \(y=mx+b\), because its slope is undefined.
Exercise
Write the equation of the line with slope -2 that passes through (4, 3). Then identify its y-intercept.
Show answer
Substitute into y = mx + b: 3 = -2(4) + b, so b = 11. The equation is y = -2x + 11, and the y-intercept is (0, 11).