Learn · Mathematics · Grade 11 · Analytic geometry

Lines in the plane: slope, equations and distance

Distance and midpoint between two points, slope as an angle, the equation of a line from a point and a slope or from two points, parallel and perpendicular lines, and the distance from a point to a line.

High school Lesson 29 of 31 Interactive figure Practice

First, the rules

Geometry with coordinates

★ Distance between two points
Example 1
|AB| = √(x₂ − x₁)² + (y₂ − y₁)²
Pythagoras on the horizontal and vertical legs.
Midpoint
Example 1
M = (x₁ + x₂2, y₁ + y₂2)
★ Slope
Examples 1, 2
m = y₂ − y₁x₂ − x₁ = tan α
α is the angle the line makes with the positive x-axis. Vertical line: no slope; horizontal: m = 0.
★ Parallel and perpendicular
Example 2
m₁ = m₂ parallel · m₁ · m₂ = −1 perpendicular
★ Equation from a point and a slope
Example 2
y − y₁ = m(x − x₁)
Three forms
Example 2
y = mx + n slope–intercept · ax + by + c = 0 general (slope −a / b) · xp + yq = 1 intercept form
★ Distance from a point to a line
Example 3
d = |ax₀ + by₀ + c|√a² + b²
Intersection of two lines
Example 3
Solve the two equations as a system (see systems of linear equations).

See it

Drag two points

The dashed legs are Δx and Δy; the slope is their ratio, the distance their hypotenuse. The green dot is the midpoint. Make the line vertical and watch the slope vanish.

Step by step

Worked examples

1

Distance, midpoint, slope

two points

A(−2, 1) and B(4, 9). Find |AB|, the midpoint of AB and the slope of AB.

Ask yourself: Compute Δx and Δy once — all three answers use them.

Show the solution
  1. Δx = 6, Δy = 8, so |AB| = √36 + 64 = 10 (a 6-8-10 triangle).
  2. Midpoint (−2 + 42, 1 + 92) = (1, 5).
  3. Slope m = 86 = 43.

Answer 10; (1, 5); 43

2

A perpendicular through a point

point–slope

Find the equation of the line through P(3, −1) perpendicular to the line 2x − 3y + 6 = 0. Give it in the form y = mx + n.

Ask yourself: First the slope of the given line (solve for y), then the negative reciprocal.

Show the solution
  1. Given line: y = 23x + 2, slope 2/3.
  2. Perpendicular slope: m = −32 (product −1).
  3. Through (3, −1): y + 1 = −32(x − 3) ⇒ y = −32x + 72.

Answer y = −32x + 72

3

Distance from a point to a line

formula

How far is the point (1, −2) from the line 3x + 4y − 5 = 0? Where do that line and x − 2y = 0 meet?

Ask yourself: The distance formula wants the general form ax + by + c = 0 — this one already is.

Show the solution
  1. d = |3 · 1 + 4 · (−2) − 5|√9 + 16 = |−10|5 = 2.
  2. Intersection: from the second line x = 2y; into the first: 6y + 4y − 5 = 0 ⇒ y = 12, x = 1.

Answer 2; (1, 12)

Practice: lines in the plane

0 / 0

Distance, midpoint, slope, equation through a point, perpendicular slope and point–line distance — exact answers. Your best score is kept in this browser only.

About this lesson

Analytic geometry of the line: the distance between two points and the midpoint, the slope m = Δy / Δx and its link to the angle with the x-axis (m = tan α), the point–slope and two-point forms, the general form ax + by + c = 0, parallel lines (same slope) and perpendicular lines (m₁ · m₂ = −1), the intersection of two lines, and the distance from a point to a line. Drag two points and read everything live, then practise.

Part of Learn mathematics · Grade 11 · Analytic geometry. Check a number with the scientific calculator or draw a function with the function plotter. Everything on this page runs in your browser; nothing you type is sent or stored, and your practice score stays in this browser only. Spotted an error? Tell us.