Straight Lines and the Angle Between Them

Slope and equation of a line in every form, the angle between two lines, and parallel and perpendicular lines, with a worked example.

The slope (m) of a line is how steep it is: tan of the angle it makes with the positive x-axis.

Slope and equation

GivenSlopeEquation
Angle θ and y-intercept cm = tan θy = mx + c
Two points (x₁, y₁), (x₂, y₂)m = (y₂ − y₁)/(x₂ − x₁)y − y₁ = m(x − x₁)
Intercepts a and bm = −b/ax/a + y/b = 1
General formm = −a/b = −(coefficient of x)/(coefficient of y)ax + by + c = 0

Angle between two lines

  • y = m₁x + c₁, y = m₂x + c₂: tan θ = ± (m₁ − m₂)/(1 + m₁m₂)
  • a₁x + b₁y + c₁ = 0, a₂x + b₂y + c₂ = 0: tan θ = ± (a₂b₁ − a₁b₂)/(a₁a₂ + b₁b₂)
LinesParallelPerpendicular
Slope formm₁ = m₂m₁ · m₂ = −1
General forma₁b₂ = a₂b₁a₁a₂ + b₁b₂ = 0

Lines parallel or perpendicular to a given line

Given lineParallel linePerpendicular line
ax + by = cax + by = kbx − ay = k
6x + 3y = 86x + 3y = k3x − 6y = k
y = mx + cy = mx + ky = −(1/m)x + k
y = 5x + 4y = 5x + ky = −(1/5)x + k

Here k is a constant; find it from the point the new line passes through.

Worked example

Find the acute angle between y = 3x + 1 and y = −2x + 5.

  • m₁ = 3, m₂ = −2: tan θ = ± (3 − (−2))/(1 + 3(−2)) = ± 5/(−5) = ± 1
  • Acute angle: tan θ = 1, so θ = 45°