Math

Line Equation From Two Points

Find line equation y = mx + b from two coordinate points.

Line Equation
Slope (m)
Y-intercept (b)
Equation

Frequently Asked Questions

How do I find a line equation from two points?

First find slope: m = (y₂ - y₁) / (x₂ - x₁). Then use point-slope form: y - y₁ = m(x - x₁). Rearrange to y = mx + b to find b-intercept.

What is point-slope form?

y - y₁ = m(x - x₁) where (x₁, y₁) is a known point and m is slope. Convert to slope-intercept by solving for y.

How do I find the y-intercept?

Substitute m and either point into y = mx + b, then solve for b.

What if the two points have the same x-coordinate?

The line is vertical (undefined slope). Equation is x = constant.

What if the two points are the same?

Cannot determine a unique line. Need two distinct points.