Sub topic 5
Slope-Intercept Form: \(y = mx + b\)
Prerequisites and the Working Model
Assume you can work with fractions, negative numbers, and linear equations. You should also know that slope is the change in \(y\) divided by the change in \(x\).
The slope-intercept form of a line is
\[ y = mx + b \]
Here:
- \(m\) is the slope, or the rate at which \(y\) changes as \(x\) changes.
- \(b\) is the \(y\)-intercept, the value of \(y\) when \(x=0\).
The form is useful because it gives both important features of a line immediately. For example, in \(y=3x-1\), the slope is \(3\), and the \(y\)-intercept is \(-1\).
Reading and Using \(y = mx + b\)
To graph \(y=3x-1\), begin at the \(y\)-intercept \((0,-1)\). The slope \(3\) can be written as \(\frac{3}{1}\), so move up 3 units and right 1 unit. This gives another point, \((1,2)\). Repeating this step produces the line.
A negative slope moves downward as \(x\) increases. For \(y=-\frac{2}{3}x+4\), begin at \((0,4)\), then move down 2 units and right 3 units.
| Equation | Slope \(m\) | \(y\)-intercept \(b\) |
|---|---|---|
| \(y=3x-1\) | \(3\) | \(-1\) |
| \(y=-\frac{2}{3}x+4\) | \(-\frac{2}{3}\) | \(4\) |
| \(y=5\) | \(0\) | \(5\) |
A horizontal line such as \(y=5\) has slope \(0\). It can be viewed as \(y=0x+5\).
def y_value(x, m, b):
return m * x + b
m, b = -2 / 3, 4
for x in [0, 3, 6]:
print(x, y_value(x, m, b))Finding the Equation from Information
If you know the slope and the \(y\)-intercept, substitute them directly into \(y=mx+b\).
If you know the slope and one point \((x1,y1)\), substitute the point to find \(b\):
\[ y1=mx1+b \]
For a line with slope \(3\) through \((1,2)\),
\[ 2=3(1)+b \]
so \(b=-1\), and the equation is \(y=3x-1\).
If you know two points, first calculate the slope:
\[ m=\frac{y2-y1}{x2-x1} \]
Then use either point to solve for \(b\). This avoids trying to guess the intercept from a graph.
x1, y1 = 1, 2
x2, y2 = 3, 8
m = (y2 - y1) / (x2 - x1)
b = y1 - m * x1
print(f"y = {m:g}x + {b:g}")Common Errors and GRE Use
Do not confuse the \(x\)-coordinate of a point with the \(y\)-intercept. The \(y\)-intercept always occurs where \(x=0\). To find it from an equation, set \(x=0\). To find the \(x\)-intercept, set \(y=0\), which may require solving for \(x\).
When comparing lines, compare slopes before intercepts. Lines with the same slope are parallel unless they are the same line. A different intercept means the lines are distinct.
Exercise
A line has slope -2 and passes through (3, 1). What is its equation?
Show answer
Use 1 = -2(3) + b, so b = 7. The equation is y = -2x + 7.