Equation of a line through two points
Find the equation and slope of the line through two points. Vertical lines are also supported.
Calculate the result
Worked example
Problem
Find the equation of the line through points A(1, 2) and B(3, 6). Check that it is satisfied by both points.
The line through points A(1, 2) and B(3, 6) has slope 2 and equation y = 2x.
Calculate the slope
Use point A
Common mistake
If the two points have the same x and different y, the line is vertical and is written x = x₁. Its slope is undefined.
