Slope from Two Points
Slope of the line passing through (x₁, y₁) and (x₂, y₂). Undefined when x₁ = x₂.
Derivation
Slope of a line
Let and be two distinct points on a line, with . Draw a right triangle by dropping a horizontal from and a vertical from . The horizontal leg has length and the vertical leg has length .
The angle the line makes with the positive -axis satisfies:
This signed ratio is the slope.
Remember
The sign encodes direction: positive for rising lines, negative for falling.
The choice of points does not matter
Take any other two points on the same line. The triangles formed are similar (same angle ), so the ratios of vertical to horizontal legs are equal.
Remember
Slope is a property of the line, not of the pair of points chosen.
Vertical lines
When , the horizontal leg is zero and the ratio is undefined.
Remember
Vertical lines have no slope.