Equation of a Line
Find a line equation through two distinct points, including vertical lines.
Inputs
Formula
m = (y₂ − y₁)/(x₂ − x₁); y = mx + b (or x = x₁ for a vertical line)
- (x₁, y₁), (x₂, y₂) — two distinct points on the line
- m — line slope (undefined for a vertical line)
- b — y-intercept for a non-vertical line
- Slope = (y₂ − y₁)/(x₂ − x₁); intercept = y₁ − slope × x₁.
- Line equation: y = 2x + 0.
- Normalized standard form: -0.8944271909999159x + 0.4472135954999579y + 0 = 0.