Finding the Equation of a Line
Learning goals
- Write point-slope form from a point and a slope
- Find the slope from two points, checking first whether they're vertical
- Convert to standard form with integer coefficients
- Express a horizontal line as and a vertical as
- Check an equation by substituting points that must lie on the line
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, with one exception to watch for: if the two points share an -coordinate, they sit on a vertical line, and a vertical line has no slope to compute (you saw why in the previous lesson). Otherwise, 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, or the vertical-line case below, 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
Start with the picture below. The line passes through with slope . Moving from to any other point on the line changes by and changes by , and a slope of means the vertical change is always twice the horizontal change:
That pattern works for any point and any slope, not only this one. Suppose you know one point on a line and the line’s slope. Call the known point and the slope . To describe every point on the line 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 also works in reverse: any pair that satisfies the equation lies on the line. When , dividing back by restores the slope condition, so that point is on the line too. When , the equation forces on its own, since the right side becomes : the only pair with that satisfies the equation is the fixed point itself. 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, first check whether they share an -coordinate. If they do, skip straight to the vertical-line case in the next section: the equation is , no slope needed. Otherwise, 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 equations look different, but check them against each other’s point and you will see they agree. Substitute into the second equation:
It holds, so both equations pass through both points. A line is fixed by two points, and no other line passes through both and , so these two equations, written from different starting points, describe the very same line. 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 zero or positive, and the three numbers share no common factor other than . 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 integers.
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 .
Check your understanding
Which equation is the standard form of the line through with slope ?
Start from point-slope form: . Multiply both sides by to clear the fraction: . Add and to both sides: .
Check with : . The other choices come from flipping a sign on , swapping the coefficients, or a slip in the constant term.
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, but what a substitution actually proves depends on what you started from.
For a two-point problem, substitute both points. The point you built the equation from always checks out, whatever slope you used, so the other point does the real work: with two different -coordinates, only the correct slope can make the equation true at both points.
For a point-and-slope problem, substituting the one given point is not enough by itself. Point-slope form is built so that the given point always satisfies it, whatever slope you used, so that substitution alone cannot catch a wrong slope. Use the slope to find a second point on the line, and check that one too.
Take the standard-form answer from earlier, built from the point and slope . Substituting the point confirms the location:
That matches, so is on the line. To confirm the slope too, step one run of and rise of from to the point , and check it as well:
Both points check out, so the location and the slope are both correct.