A question gives you a slope and one point, or two points, or a graph with its intercepts marked, and asks for the equation of the line. Each kind of information fits one form of the equation best. Pick the form that uses what you were given, then rearrange into whatever form the answer choices use.
See also Drawing Lines from Slope and Intercepts in Foundations for Calculus and Linear Functions and Constant Rate of Change in Precalculus.
Key terms
Slope-intercept form
Definition A nonvertical line in the -plane with slope that crosses the -axis at has the equation
The number is the -intercept. Every nonvertical line has exactly one equation of this form, so two equations in slope-intercept form describe the same line only when they have the same and the same .
In plain words Start at height on the -axis, and for every step of 1 to the right, go up (or down, when is negative).
Example The line with slope and -intercept is . At it gives , so the point lies on it, and indeed from one step right and three steps up lands on .
Point-slope form
Definition The nonvertical line with slope through the point has the equation
A point is on this line exactly when it satisfies the equation. The reason is the slope formula. For the equation says , and the point itself satisfies it too.
In plain words You know one point and how steep the line is. Plug the point and the slope straight in, with minus signs in front of the coordinates.
Example The line through with slope is . Expanding gives , so
The point still checks out, since . Watch the signs with a negative coordinate. Through the form reads .
Two-point equation
Definition The line through two points and with has the equation
It is point-slope form with the slope computed from the two points. It does not matter which point you call the first one, because both give the same line. When the slope is undefined and the line is vertical, which is covered below.
In plain words Two points fix a line. Find the slope from them, then use either point in point-slope form.
Example Take and . The slope is
Using gives , which simplifies to . Check the other point. At the line gives , which matches.
Standard form
Definition The standard form of a line is
where , and are real constants and and are not both . When the line has slope and -intercept . When its -intercept is . When the line is vertical. Multiplying the whole equation by any nonzero number gives another standard form of the same line, so answer choices often clear fractions and use integers.
In plain words Both variables sit on the left and the constant sits on the right. This form makes intercepts quick to find, since you just set the other variable to .
Example For , setting gives and setting gives . The intercepts are and , and the slope is
Going the other way, the line from above becomes after adding to both sides.
Vertical and horizontal lines
Definition A vertical line consists of all points with the same -coordinate , and its equation is
Its slope is undefined, so it has no equation of the form and no point-slope equation. In standard form it has . A horizontal line consists of all points with the same -coordinate , its equation is , and its slope is .
In plain words If two points share an -coordinate, the run is zero, the slope formula breaks, and the answer is simply equals that number.
Example The points and give a run of , so there is no slope to compute. The line through them is . Every point on it has -coordinate , whatever its . The points and lie on the horizontal line .
Equivalent forms of one line
Definition Two equations in and are equivalent when they have exactly the same solution set, that is the same set of points . Adding the same expression to both sides, or multiplying both sides by the same nonzero number, turns an equation into an equivalent one. So point-slope, slope-intercept and standard form of a line are different names for one set of points.
In plain words Rearranging does not move the line. If your rearranged equation is right, every point of the original line still satisfies it. A fast way to catch a slip is to test the given point in your final equation.
Example These three equations describe the same line, the one through with slope .
Test in the last one. The left side is , as it should be. A version with a sign slip, such as , fails the test right away, since .
Equations from a graph or intercepts
Definition If a line crosses the -axis at and the -axis at with , then its slope is
and its slope-intercept form is . From any graph, read two points whose coordinates are exact, usually intercepts or grid crossings, and use the two-point equation.
In plain words Intercepts are two free points. The -intercept even hands you directly, so only the slope is left to find.
Example A graph shows a line through and . The slope is
and the -intercept is , so the line is . Multiplying by and rearranging gives the standard form . Both intercepts check, since and . In the Desmos graphing calculator you can type the equation and see that the graph passes through both marked points.
Check yourself
- A line in the -plane passes through and . Which equation defines the line? (A) (B) (C) (D)
Show the answer
The answer is (A). The slope is
and gives . Both points check, since and . Choice (B) comes from writing instead of , and it gives at . Choice (C) uses run over rise and misses . Choice (D) comes from pairing with in , and it misses both points.
- In the -plane, a line has -intercept and -intercept . An equation of the line can be written as . What is the value of ?
Show the answer
The line passes through and , so
Enter , or a decimal such as or . A negative answer usually means the order of the coordinates was mixed up in the numerator or the denominator.
- Line has slope and passes through . Which equation defines ? (A) (B) (C) (D)
Show the answer
The answer is (A). Point-slope form gives . Multiplying by gives , so . Its slope is , and the point checks, since . Choices (B) and (C) also pass through , but their slopes are and . Choice (D) has the right slope but comes from moving the across as instead of , and it gives at the point.