Connect the steps
Slope-intercept form: find y = mx + b
Use a slope and a point to find the intercept and line equation.
A nonvertical straight line can be written as y = mx + b. Here m is the slope and b is the y-intercept: the y coordinate where the line crosses the vertical axis, when x = 0.
From two points to one equation
Take A = (1, 2) and B = (5, 4). First calculate the slope: m = (4 − 2)/(5 − 1) = 1/2. Then substitute either point into b = y − mx. Using A gives b = 2 − (1/2) × 1 = 3/2.
Use B to verify the result: (1/2) × 5 + 3/2 = 5/2 + 3/2 = 4. Both points satisfy the equation, as they should.
Interpret the two numbers separately
The slope describes a rate of change. The intercept describes the value at x = 0. A line can have a positive slope and a negative intercept, or a negative slope and a positive intercept. The sign of b does not determine whether a line rises or falls.
Horizontal lines fit this form
For points (-2, 3) and (4, 3), the slope is 0. Substitution gives b = 3. The equation is y = 0x + 3, usually shortened to y = 3. Every x coordinate has the same y value.
Vertical lines do not
For (2, -1) and (2, 5), the equation is x = 2. There is no finite slope m that expresses this as y = mx + b. Depending on x, a vertical line has many y values rather than one, so it is not the graph of a function y of x.
Keep fractional coefficients unambiguous
Write y = (2/3)x − 1 when typing a fractional coefficient. Parentheses make it clear that the fraction multiplies x. The calculator keeps exact fractions in the equation, even when their decimals repeat.
For another useful arrangement, see point-slope form. For exceptions, read zero versus undefined slope. You can check both coordinates with the calculator.
Make the next step yours.
Try your own numbers in the calculator, or check your understanding with a short practice set.