Formulas used
- Slope: m = (y₂ − y₁) / (x₂ − x₁)
- y-intercept: b = y₁ − m·x₁
- Equation: y = mx + b
- Angle: θ = atan(m) × 180 / π
- Distance: √((x₂ − x₁)² + (y₂ − y₁)²)
When x₁ = x₂ the slope is undefined — the line is vertical, equation x = constant.
FAQ
Positive vs negative slope?
Positive slope rises left-to-right; negative slope falls. A horizontal line has slope 0; a vertical line has undefined slope.
What is point-slope form?
y − y₁ = m(x − x₁). Useful when you have one point and the slope, not the y-intercept.