A line equation describes every point on a straight line, not just the two points used to draw it. Different forms make different information visible: slope-intercept form shows a rate and an axis crossing, point-slope form starts from a known point, and standard form includes vertical lines.
Choose the form that matches the information given, then verify the finished equation against that information. Rearranging an equation does not change its line when the algebraic steps are equivalent.
On this page
Three useful forms
For a non-vertical line, slope-intercept form is
Here is the slope and is the -intercept. A line of slope through has point-slope form
A form that also includes vertical lines is
The last condition means and cannot both be zero. If , rearrangement gives slope and -intercept . If , then and the line is vertical: . These line representations are consistent with OpenStax’s treatment of linear functions.
Given one point and a slope
Find the line through with slope . Insert the data into point-slope form:
Distribute and add 5:
To remove fractions, multiply the equation by 2 and rearrange:
All three equations describe the same line. The original point checks: . The slope from standard form is , matching the given rate.
Three forms describe the same line
Diagram explanation and exact data
The equation is y − 5 = −3(x − 2)/2, or y = −3x/2 + 8, or 3x + 2y = 16. Intercepts and the given point are exact.
| Feature | Exact value |
|---|---|
| Given point | |
| Slope | |
| x-intercept | |
| y-intercept |
The geometric reasoning behind point-slope form is straightforward. Every other point on this non-vertical line has the same ratio . Multiplying by produces the equation. The equation also includes the starting point itself, where both differences are zero, even though the ratio would be undefined there.
Given two distinct points
Find the line through and . First calculate the slope:
Use either point in point-slope form. Using gives
Check both points: at , the equation gives ; at , it gives . Checking both catches mistakes that a single check may miss.
When the points have the same horizontal coordinate
The points and determine the vertical line . Do not divide by zero while trying to force this into .
If the two supplied points are identical, they do not determine a unique line. A slope or another distinct point is needed. “Two points determine a line” assumes that the points are distinct.
Given intercepts
Suppose the intercepts are and . Since both intercept values are non-zero, start with
Multiplying by 12 gives . Solving for gives . The negative slope fits a line falling from towards .
For a line through the origin, both axis intercepts coincide. Use another point or a slope instead of trying to put a zero intercept in a denominator.
Whole lines, segments and restricted models
The equation describes an entire infinite line. To describe only the segment from to , include the restriction
The endpoint inequalities are part of the description. Without them, points beyond the segment still satisfy the equation. A vertical segment can instead be specified by a fixed and an interval for .
A model may impose further restrictions. For example, a linear formula for the length of material remaining after cuts should not be extended to negative lengths just because the algebraic line continues.
Check more than appearance
Two drawings can look similar while representing different equations. A dependable check uses the exact slope and a known point. For two-point data, substitute both endpoints. For standard form, multiplying every coefficient and the constant by the same non-zero number produces an equivalent equation.
For instance, and are the same line. Multiplying only the left side changes the equation and generally changes the line. An equivalent line equation is a statement about the whole solution set, not just a cosmetic change of notation.
Practice questions
- Find the line through with slope .
- Find the line through and .
- Find the line through and .
Check your answers
- , so . Equivalently, .
- The slope is . Thus , or .
- Both points have , so the equation is . Its slope is undefined.
Related topics
Use Parallel and Perpendicular Lines to construct lines from a directional relationship. Distance from a Point to a Line uses standard form to measure the shortest separation.
