Finding the Equation of a Line
Learning goals
- Write point-slope form from a point and a slope
- Find the slope first when given two points
- Convert to standard form with integer coefficients
- Express a horizontal line as and a vertical as
- Check by substituting the given points back in
A point and a direction fix a line
Think about what it takes to nail down a single straight line. One point is not enough: infinitely many lines pass through any given point, fanning out in every direction like the spokes of a wheel. A direction alone is not enough either: all the lines with a given slope tilt the same way, a whole family of them sliding across the plane. But pin both at once, one point the line must pass through and one slope it must have, and exactly one line survives. It has to go through that point, and from there only one tilt is allowed, so there is nothing left to choose.
Both halves of that argument are things you can do to the figure below. The figure sets a line’s slope and its crossing point separately, so either one can be held while the other moves.
Fix the crossing at and leave it alone while you walk the rise from up to . Every line you produce passes through that same point on the vertical axis. The lines fan out through that point exactly as described: one point does not fix a line. Now set the rise back to over a run of and walk the crossing instead, from up to . This time the tilt never changes and the whole family slides up the plane, each line parallel to the last: a slope does not fix a line either. Only when you stop moving both does a single line survive. One caveat, since the figure is narrower than the lesson: its point is always the crossing point on the vertical axis. The form in the next section, by contrast, accepts any point at all.
Line explorer
y = (2/3)x + 3. Rise 2 over run 3 is a slope of 2/3, so from any point on the line, 3 to the right and 2 up lands back on it. And it crosses the vertical axis at 3.
Two points pin a line for the same reason. Two points hand you the slope through the previous lesson’s formula, and once you have a slope and a point you are back to the first case. So every “find the equation” task in this lesson is really the point-and-slope task, sometimes with a quick slope calculation in front.
What does “the equation of the line” mean here? From the graphing lesson, the equation of a line is the rule its points obey. A pair satisfies that equation exactly when the point sits on the line. The job now is to turn “passes through this point with this slope” into such a rule.
Point-slope form
Suppose you know one point on a line and the line’s slope. Call the known point and the slope . To capture every other point at once, give it a name: let stand for an arbitrary point on the line. The slope between the known point and this general point is something you can write down with the slope formula. Because a line has only one slope, that expression has to equal the slope . Setting it equal to and clearing the fraction produces the equation.
Deriving point-slope form from the slope formula#
Let the line have slope and pass through the fixed point . Take any other point on the line. Using the two points and , the slope formula gives the slope as the rise over the run . Since every pair of points on the line reports the same slope , this ratio equals :
This already ties and together, but the fraction is awkward, so multiply both sides by the run to clear it:
This is point-slope form. Every point on the line satisfies it, because that is exactly how it was built. It passes the reverse test too: any pair that satisfies it lies on the line, since dividing back by restores the slope condition. One case deserves its own check, the fixed point itself. Substituting and gives on the left and on the right. That gives , so is included, even though the original fraction had a zero denominator there. So the single equation is satisfied by exactly the points of the line: it is the line’s equation.
The name tells you how to read it. The two numbers and come from the point, and is the slope. To use it, substitute your point and your slope, and stop. You do not have to simplify: is already a complete, correct equation of the line.
Worked example 1 Write the equation of the line through with slope
Point-slope form needs a point and a slope, and you have both: and . Substitute them into :
That is the equation, and you may leave it exactly like this. If you want the line’s rule in the shortest form, distribute and simplify:
Both forms describe the same line. As a check, the point satisfies , since .
Worked example 2 Write the equation of the line through with slope
Substitute into point-slope form again, this time watching the signs. Here and . Because is negative, becomes :
The equation is complete. The most common slip here is to write instead of ; subtracting a negative coordinate turns it into addition.
Check your understanding
Which equation is the point-slope form of the line through with slope ?
Point-slope form is . Substitute the point and slope , remembering that with becomes .
The other choices use the wrong signs: would come from the point , and would come from .
Finding a line through two points
When you are handed two points instead of a point and a slope, find the slope first, then feed that slope and either point into point-slope form. The phrase “either point” is worth pausing on. Both points sit on the same line, so both must produce the same line, and they do. Choosing one point over the other changes only how the equation looks before you simplify, never which line it describes.
Worked example 3 Find the equation of the line through and
Step one is the slope, from the previous lesson’s formula. Take and :
Step two is point-slope form with this slope and one of the points. Using :
That is a complete equation of the line. To see that the other point gives the same line, use instead:
The two look different, but they are the same line in disguise. Clear each fraction and tidy up, and both collapse to a single equation. From the first,
and from the second,
the very same equation. So it truly does not matter which point you start from.
Check your understanding
Which equation represents the line through and ?
First find the slope from the two points.
Then use point-slope form with the slope and the point , giving . Checking the other point, at the left side is and the right side is , so it lies on the line. The distractors use the wrong slope or the wrong point.
Standard form
Point-slope form is the fastest to write, but answers are often requested in standard form, which lines the variables up on one side:
Here , , and are integers, and and are not both zero. By convention is made zero or positive (and, when possible, the three share no common factor). Standard form hides the slope and the point from view, but it treats and evenly. Standard form is also the natural way to write a vertical line, and it makes lines easy to compare and combine later.
To convert, start from point-slope form, distribute the slope, and move the -term and the constants to the sides that match . When the slope is a fraction, multiply through to clear the denominator so the coefficients come out as whole numbers.
Worked example 4 Write the line through with slope in standard form
Begin with point-slope form:
The slope has denominator , so multiply both sides by to clear it:
Distribute on both sides:
Now collect and on the left and the constants on the right by adding to both sides and adding to both sides:
This is standard form with , , and , and is positive. As a check, substitute the original point : , matching .
Horizontal and vertical lines
Two kinds of lines need a moment of care, because one of them breaks point-slope form.
A horizontal line has slope . Point-slope form still works: through a point with it gives , and the right side is just , so the equation collapses to . That matches what you already know, that a horizontal line has the constant equation , where is the shared height of all its points.
A vertical line is the exception. Its slope is undefined, so there is no to substitute and point-slope form cannot be used at all. You do not need it. Every point on a vertical line has the same -coordinate, so the equation simply states that: , where is that shared -value. Reach for this directly whenever the points share an -coordinate, or the line is described as vertical.
Worked example 5 Equations of a horizontal and a vertical line through
For the horizontal line through , the slope is . Point-slope form gives
Every point on it has height , so the equation is .
For the vertical line through , the slope is undefined, so point-slope form does not apply. Instead use the fact that every point shares the -coordinate :
The two lines cross at the point they were built from, the horizontal one running flat across it and the vertical one standing straight up through it.
Check your understanding
What is the equation of the vertical line through ?
A vertical line has the same -coordinate at every point, so its equation fixes at that value. The line through that runs straight up and down keeps everywhere.
The equation is the horizontal line through the point, and the choices with the coordinates swapped do not pass through at all.
Checking your equation
Every equation you write can be checked, and checking takes only a substitution. The point, or points, you started from must satisfy the finished equation, so put the coordinates in and confirm the two sides agree. This catches sign slips and arithmetic errors before they cost you anything.
Take the standard-form answer from earlier, built to pass through . Substitute:
The left side equals , matching the right, so is on the line and the equation checks out. For a two-point problem, test both given points, since a wrong slope can still accidentally satisfy one of them. A single substitution is cheap insurance on every equation you find.