Determine the equation of a line through two points in slope-intercept and standard forms.
Given two points, the slope is m = (y₂−y₁)/(x₂−x₁). The slope-intercept form is y = mx + b, where b = y₁ − m·x₁.
Slope
m = (y₂ − y₁) / (x₂ − x₁)
Slope-Intercept Form
y = mx + b
Vertical lines have undefined slope. The equation is simply x = constant.
Rearrange y = mx + b to get −mx + y = b, then multiply through to clear fractions if needed.