Loading calculator...
Loading calculator...
Calculate the slope, y-intercept, line equation, distance, midpoint, and perpendicular slope between two points.
Key Formulas:
Slope: m = (y₂ - y₁) / (x₂ - x₁)
Line Equation: y = mx + b
Distance: d = sqrt((x₂-x₁)² + (y₂-y₁)²)
Midpoint: ((x₁+x₂)/2, (y₁+y₂)/2)
Perpendicular slope: m_perp = -1/m
Slope (m) measures the steepness and direction of a line. It is the ratio of vertical change (rise) to horizontal change (run): m = rise / run. A positive slope goes up left-to-right; negative goes down.
The y-intercept (b) is the value of y where the line crosses the y-axis (where x = 0). In the slope-intercept form y = mx + b, you can find b by rearranging: b = y - mx.
A vertical line (where x₁ = x₂) has an undefined slope because division by zero occurs in the formula. A vertical line is written as x = constant.
Parallel lines have identical slopes (m₁ = m₂). Perpendicular lines have slopes that are negative reciprocals of each other: m₁ × m₂ = -1, so m_perp = -1/m.
The distance formula uses the Pythagorean theorem: d = sqrt((x₂-x₁)² + (y₂-y₁)²). It treats the horizontal and vertical differences as the two legs of a right triangle.