Slope of a Line and Angle Between Two Lines
Quick answer The slope of a line measures its steepness as the tangent of its inclination; the angle between two lines is found from a tan formula built out of their slopes.
The inclination of a line is the angle θ it makes with the positive direction of the x-axis, measured anticlockwise, where 0° ≤ θ < 180°. The slope (or gradient) of the line is defined as m = tanθ. A line parallel to the x-axis has θ = 0°, so m = 0; a line parallel to the y-axis has θ = 90°, where tanθ is undefined, so such a line has no slope.
If a line passes through two points A(x1, y1) and B(x2, y2) with x1 ≠ x2, its slope is m = (y2 − y1)/(x2 − x1). This value does not depend on which point is taken first, since reversing both differences leaves the ratio unchanged.
Two lines with slopes m1 and m2 are parallel if and only if m1 = m2, and are perpendicular if and only if m1m2 = −1. Three points are collinear exactly when the slope of the segment joining any two of them equals the slope of the segment joining another pair that shares a common point with the first.
If two lines have slopes m1 and m2, the angle θ between them satisfies tanθ = (m2 − m1)/(1 + m1m2). Taking the absolute value gives the acute angle between the lines; the obtuse angle is 180° minus this acute angle.
Worked example. Find the angle which the line joining the points (3, −1) and (4, −2) makes with the positive x-axis.
Slope m = (−2 − (−1))/(4 − 3) = −1/1 = −1. Since tanθ = −1 with 0° ≤ θ < 180°, θ = 135°.
Worked example (collinearity). Show that the points A(1, 4), B(3, −2) and C(−1, 10) are collinear.
Slope of AB = (−2 − 4)/(3 − 1) = −6/2 = −3. Slope of BC = (10 − (−2))/(−1 − 3) = 12/(−4) = −3. Since slope of AB = slope of BC and B is common to both, the points A, B, C lie on the same straight line, so they are collinear.
- Slope m = tanθ, where θ is the inclination of the line with the positive x-axis (0°≤θ<180°, θ≠90°).
- A horizontal line has slope 0; a vertical line has no defined slope.
- m1=m2 is the condition for parallel lines; m1·m2=−1 is the condition for perpendicular lines.
- Three points are collinear if and only if the slope of the segment joining any two of them equals the slope of the segment joining another pair sharing that same point.
