demaerre/iStock/GettyImages
Every straight line on a Cartesian plane can be expressed algebraically. While several forms exist, the slope‑intercept form y = mx + b is often the first introduced in classrooms because it directly displays the line’s slope m and its y‑intercept b. When you’re only given two points on the line, you can still derive the complete equation by following a straightforward process.
Suppose you need the equation of the line that passes through the points (-3, 5) and (2, -5).
The slope is the ratio of the vertical change (rise) to the horizontal change (run) between the points: m = (y₂ – y₁)/(x₂ – x₁). Using the given points,
\(m = \frac{-5 - 5}{2 - (-3)} = \frac{-10}{5} = -2\)
Thus the line declines two units in y for every one unit it advances in x.
With the slope known, the point‑slope equation becomes y = -2x + b. The only unknown left is the y‑intercept b.
Substitute one of the original points into the equation. Using (-3, 5):
\(5 = -2(-3) + b \;\Rightarrow\; 5 = 6 + b \;\Rightarrow\; b = -1\)
Replacing b with its value yields the complete line equation:
\(y = -2x - 1\)
That’s the slope‑intercept form for the line through the two given points.