Describing lines algebraically — from slope and intercepts to distance formulas
"Geometry, as a logical system, is a means to make children feel the strength of the human spirit." — H. Freudenthal
Coordinate geometry combines algebra and geometry, pioneered by René Descartes in 1637. The most important concept for straight lines is slope — how steep a line is.
The inclination of a line is the angle θ it makes with the positive x-axis (measured counterclockwise). The slope is:
θ = 0°, slope m = 0. The line is flat.
θ = 90°, slope is undefined. The line is straight up.
For points (x₁, y₁) and (x₂, y₂):
m = (y₂ - y₁) / (x₂ - x₁)
Example: Points (3, -2) and (-1, 4)
m = (4 - (-2)) / (-1 - 3) = 6 / -4 = -3/2
Two lines are parallel if and only if their slopes are equal.
m₁ = m₂
Example: Lines with slopes 3 and 3 are parallel.
Two lines are perpendicular if and only if the product of their slopes is -1.
m₁ × m₂ = -1 or m₂ = -1/m₁
Example: If one line has slope 2, the perpendicular line has slope -1/2.
Parallel lines have the same slope (they go in the same direction).
Perpendicular lines have negative reciprocal slopes (one goes up, other goes down at right angle).
The acute angle θ between two lines with slopes m₁ and m₂:
Angle between lines with slopes 1/2 and 3:
tan θ = |(3 - 1/2) / (1 + 3×1/2)| = |(5/2) / (5/2)| = 1
θ = 45°
• If m₁ = m₂: lines are parallel, angle = 0°
• If m₁ × m₂ = -1: lines are perpendicular, angle = 90°
• If 1 + m₁m₂ = 0: denominator is zero, lines are perpendicular
There are several ways to write the equation of a line, depending on what information you have.
y - y₀ = m(x - x₀)
Example: Line through (-2, 3) with slope -4:
y - 3 = -4(x + 2) → 4x + y + 5 = 0
(y - y₁)/(y₂ - y₁) = (x - x₁)/(x₂ - x₁)
Example: Line through (1, -1) and (3, 5):
(y + 1)/(5 + 1) = (x - 1)/(3 - 1) → 3x - y - 4 = 0
y = mx + c
The line crosses the y-axis at (0, c). This is the most common form!
x/a + y/b = 1
Example: Line with x-intercept 3 and y-intercept 2:
x/3 + y/2 = 1 → 2x + 3y = 6
Ax + By + C = 0
Any line can be written in this form. A and B cannot both be zero.
Distance from point (x₁, y₁) to line Ax + By + C = 0:
d = |Ax₁ + By₁ + C| / √(A² + B²)
Example: Distance from (3, -5) to 3x - 4y - 26 = 0:
d = |3(3) - 4(-5) - 26| / √(9 + 16) = |9 + 20 - 26| / 5 = 3/5
For parallel lines Ax + By + C₁ = 0 and Ax + By + C₂ = 0:
d = |C₁ - C₂| / √(A² + B²)
Example: Lines 3x - 4y + 7 = 0 and 3x - 4y + 5 = 0:
d = |7 - 5| / √(9 + 16) = 2/5
Parallel lines have the same A and B coefficients. The distance formula only uses the difference in C values — the constant terms.
• Slope: m = tan θ = (y₂-y₁)/(x₂-x₁). Horizontal: m=0. Vertical: undefined.
• Parallel: m₁ = m₂
• Perpendicular: m₁ × m₂ = -1
• Angle between lines: tan θ = |(m₂-m₁)/(1+m₁m₂)|
• Point-slope: y - y₀ = m(x - x₀)
• Slope-intercept: y = mx + c
• Intercept form: x/a + y/b = 1
• General form: Ax + By + C = 0
• Distance from point: d = |Ax₁+By₁+C| / √(A²+B²)
• Distance between parallel lines: d = |C₁-C₂| / √(A²+B²)