Skip to content
4 MIN LESSON · MATHEMATICS

Straight Lines: Slope, Forms of the Equation and Distance Formulas

The slope of a line, conditions for parallel and perpendicular lines, the angle between two lines, the point-slope, two-point, slope-intercept, intercept and normal forms, and the distance of a point from a line.

A quick recap

For points P(x₁, y₁) and Q(x₂, y₂):

  • Distance: PQ = √((x₂ − x₁)² + (y₂ − y₁)²)

  • Midpoint: ((x₁ + x₂)/2, (y₁ + y₂)/2)

  • Section formula (dividing PQ internally in ratio m : n): ((mx₂ + nx₁)/(m + n), (my₂ + ny₁)/(m + n))

  • Area of a triangle with vertices (x₁, y₁), (x₂, y₂), (x₃, y₃): ½ |x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)|. If this is zero, the points are collinear.

Slope

The inclination θ of a line is the angle it makes with the positive x-axis, measured anticlockwise (0° ≤ θ < 180°). The slope is

m = tan θ (for θ ≠ 90°)

Through two points: m = (y₂ − y₁)/(x₂ − x₁).

  • A horizontal line has slope 0.

  • A vertical line has an undefined slope.

  • A line rising to the right has positive slope; one falling to the right has negative slope.

Three points A, B, C are collinear if the slope of AB equals the slope of BC.

Parallel and perpendicular lines

For non-vertical lines with slopes m₁ and m₂:

  • Parallel ⇔ m₁ = m₂

  • Perpendicular ⇔ m₁ m₂ = −1

Angle between two lines: if θ is the acute angle between them,

tan θ = |(m₂ − m₁) ⁄ (1 + m₁m₂)|

Example. The lines with slopes 1/2 and 3 make an angle with tan θ = |(3 − ½)/(1 + 3/2)| = |(5/2)/(5/2)| = 1, so θ = 45°.

Forms of the equation of a line

Form

Equation

When to use

Horizontal / vertical

y = b / x = a

lines parallel to an axis

Point-slope

y − y₁ = m(x − x₁)

a point and the slope are known

Two-point

y − y₁ = ((y₂ − y₁)/(x₂ − x₁))(x − x₁)

two points are known

Slope-intercept

y = mx + c

slope and y-intercept c are known

Intercept

x/a + y/b = 1

x-intercept a and y-intercept b are known

Normal

x cos ω + y sin ω = p

perpendicular distance p from origin and its angle ω are known

General

Ax + By + C = 0

any line

From the general form: slope = −A/B, x-intercept = −C/A, y-intercept = −C/B.

Example. The line through (2, 3) with slope −4 is y − 3 = −4(x − 2), that is 4x + y − 11 = 0.

Example. The line through (1, −2) and (3, 4) has slope 6/2 = 3, so y + 2 = 3(x − 1), that is 3x − y − 5 = 0.

Example. A line cuts off intercepts 3 and −2 on the axes: x/3 + y/(−2) = 1, that is 2x − 3y = 6.

Lines through a point, parallel or perpendicular to a given line

  • Any line parallel to Ax + By + C = 0 is Ax + By + k = 0.

  • Any line perpendicular to it is Bx − Ay + k = 0.

Find k using the given point.

Example. The line through (1, 2) perpendicular to 3x + 4y − 7 = 0 has the form 4x − 3y + k = 0. Substituting (1, 2): 4 − 6 + k = 0, so k = 2. The line is 4x − 3y + 2 = 0.

Distance of a point from a line

The perpendicular distance of (x₁, y₁) from Ax + By + C = 0 is

d = |Ax₁ + By₁ + C| ⁄ √(A² + B²)

Distance between parallel lines Ax + By + C₁ = 0 and Ax + By + C₂ = 0:

d = |C₁ − C₂| ⁄ √(A² + B²)

Example. Distance of (3, −5) from 3x − 4y − 26 = 0: |9 + 20 − 26| ⁄ 5 = 3/5.

Example. Distance between 6x + 8y − 5 = 0 and 6x + 8y + 15 = 0: |−5 − 15| ⁄ 10 = 2.

The two lines must have the same A and B before applying the formula. For 3x + 4y = 5 and 6x + 8y = 7, rewrite the first as 6x + 8y = 10 first.

Summary

  • Slope m = tan θ = (y₂ − y₁)/(x₂ − x₁); parallel: equal slopes; perpendicular: m₁m₂ = −1.

  • tan θ = |(m₂ − m₁)/(1 + m₁m₂)| gives the angle between lines.

  • Use the form of the equation that matches the given data.

  • Distance from a point: |Ax₁ + By₁ + C|/√(A² + B²).

Practise this topic →

Discussion

Sign in to join the discussion.

Sign in

No comments yet. Be the first to share your thoughts.