Finding the Equation of a Line
Progress can't be saved in this browser, so this lesson's status can't be set.
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
One point is not enough: many lines pass through it in different directions. A slope alone is not enough either: many lines tilt the same way in different positions. Together, a point and a slope fix one line. The point fixes its location and the slope fixes its direction.
Try both choices in the figure. Keep the crossing at and change the rise from to . The lines turn through the same point . Next set rise and run , then change the crossing from to . The tilt stays fixed while the line moves up or down. Fix both controls and you have one line. This widget uses a point on the vertical axis; point-slope form can use any point.
Fix a line by choosing its point and its slope
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 different points also fix a line. If their -coordinates differ, calculate the slope and use either point. If they share an -coordinate, the line is vertical and needs a different rule, .
As in Graphing Linear Equations, our equation must describe exactly the points of the required line: every point on it must satisfy the equation, and every solution must lie on it.
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:
To turn this pattern into a general rule, start with the slope formula and clear its denominator. We must also check the starting point, where that denominator is zero.
Deriving point-slope form from the slope formula#
Try a line through with slope . From that point to another point on the line, the run is and the rise is . Since the line is nonvertical, an other point has , so
The cleared equation also includes the starting point: at both sides are . For a numerical check away from it, a run of and rise of reaches , where both sides are .
You can also start with a solution of the equation. For , both sides of are . Its slope from is , so it lies on the required line.
Now use a known point and any slope . At every other point of the nonvertical line, , so the slope formula gives
Multiply by the nonzero run to get point-slope form:
The starting point satisfies this equation too, since both sides are there.
To check the reverse direction, take any solution of the cleared equation. If , divide by : its slope from the known point is , so it lies on the required line. If , the equation forces , giving the known point itself. Thus the equation describes exactly the line.
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. 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
With two different points, first compare their -coordinates. If they agree, the line is vertical: write using that shared coordinate. Otherwise calculate the slope, then put it and either point into point-slope form. Choosing a different starting point changes how the equation looks, not the line.
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 different points, and no other line passes through both and , so these two equations, written from different starting points, describe the same line. You can start from either point.
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:
For the rational slopes and coordinates used here, we write , , and as integers, with zero or positive and no common factor greater than . At least one of and must be nonzero: otherwise the equation would describe either no points or the whole plane.
This form puts both variable terms on the left. It can describe vertical lines as well as lines with a slope. Grouping like terms also helps you compare two equations or combine them by elimination, as in Systems of Equations. Other texts may use a different sign or coefficient convention.
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
A horizontal line has slope . Through , point-slope form gives , hence . This is the form from graphing lines, with the height every point shares.
A vertical line has undefined slope, so there is no to put into point-slope form. Write directly, using the shared -coordinate of its points. For example, and share , so the line through them is .
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
For a two-point problem, substitute both given points. For a point-and-slope problem, use the slope to find a second point and check that too. The starting point satisfies point-slope form whatever slope you put in, so checking it on its own will not show a wrong slope.
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.