What Is Equation of the Line That Passes Through the Points?
Two different points determine exactly one straight line. To find its equation, compute the slope (y₂ − y₁) ÷ (x₂ − x₁), then use either point to find the y-intercept in y = mx + b.
Enter the coordinates of the two points. The calculator returns the slope as an exact fraction, the equation in slope-intercept, point-slope and standard forms, the x-intercept, the distance between the points, their midpoint and a graph with the line drawn through them.
If the two x values are equal, the line is vertical and the slope is undefined, so the equation is x = a constant. If the two y values are equal, the line is horizontal and the slope is 0.
How to Use the Equation of the Line That Passes Through the Points Calculator
- Enter the coordinates of the two points.
- Read the slope and the equation in three forms.
- Check by substituting both points.
Equation of the Line That Passes Through the Points Formula
Slope
Slope-intercept form
Point-slope form
Standard form
Equation of the Line That Passes Through the Points Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| (x₁, y₁), (x₂, y₂) | The two points | |
| m | Slope, rise over run | |
| b | y-intercept, where the line crosses the y-axis | |
| Ax + By = C | Standard form of a line | Usually whole numbers |
Equation of the Line That Passes Through the Points Worked Example
With the example values loaded in the calculator above, the steps are:
- Slope m = (y₂ − y₁) ÷ (x₂ − x₁) = (8 − 2) ÷ (4 − 1) = 6 ÷ 3 = 2.
- Use the point (1, 2) in y = mx + b: 2 = 2 × 1 + b, so b = 0.
- The line is y = 2x.
- In standard form: 2x − y = 0.
Result: Equation (slope-intercept form) = y = 2x; Slope m = 2.
Worked example: (1, 2) and (4, 8)
The slope is (8 − 2) ÷ (4 − 1) = 6 ÷ 3 = 2. Using (1, 2): 2 = 2 × 1 + b, so b = 0.
The line is y = 2x. In point-slope form it is y − 2 = 2(x − 1), and in standard form 2x − y = 0.
Vertical and horizontal lines
If the two x values are equal, the line is vertical and the slope is undefined. The equation is x = a number. If the two y values are equal, the slope is 0 and the line is horizontal: y = a number.
Where Equation of the Line That Passes Through the Points Is Used
Algebra homework
Write the line through two given points in the form your teacher asks for.
Graphing
Get the intercepts and slope to sketch a line quickly.
Interpolation
Estimate a value between two measurements using the line joining them.
Common Equation of the Line That Passes Through the Points Mistakes to Avoid
- Keep the slope as a fraction while calculating to avoid rounding.
- Standard form is usually written with whole number coefficients and a positive x coefficient.
Equation of the Line That Passes Through the Points Terms and Definitions
- Slope
- The rise divided by the run between two points on a line.
- Intercept
- Where the line crosses an axis.
Equation of the Line That Passes Through the Points FAQs
How do you find the equation of a line through two points?
Compute the slope (y₂ − y₁) ÷ (x₂ − x₁), then use one point to solve y = mx + b for b.
What if the x values are the same?
The line is vertical with equation x = that value, and the slope is undefined.
What is point-slope form?
y − y₁ = m(x − x₁), built directly from the slope and one point.
What is standard form?
Ax + By = C, usually with whole number coefficients and A positive.
How do I find the x-intercept?
Set y = 0 and solve: x = −b ÷ m.
How can I check my equation?
Substitute both points. Each must make the equation true.