5B

Coordinate geometry of lines

Equation of a line from two points, general form ax + by + c = 0, parallel and perpendicular lines, distance, midpoint and collinear points.

Coordinate geometry turns shapes into numbers. Once points have coordinates, you can prove that sides are equal, that lines are parallel or that an angle is a right angle, all by calculation. Everything here comes from two ideas: gradient and Pythagoras' theorem.

Gradient and the equation of a line

Gradient and equation
$$m = \frac{y_2 - y_1}{x_2 - x_1} \qquad y - y_1 = m(x - x_1)$$

The second formula is the point-gradient form. It says: the gradient from the fixed point $(x_1, y_1)$ to any point $(x, y)$ on the line is $m$. Rearranged, it gives $y = mx + c$.

Example 1●●

Find the equation of the line through $(-1, 5)$ and $(3, -3)$. Write it in general form.

$m = \dfrac{-3 - 5}{3 - (-1)} = \dfrac{-8}{4} = -2$
Rise over run. Keep the points in the same order on top and bottom.
$y - 5 = -2(x + 1)$
Use point-gradient form with (−1, 5).
$y = -2x + 3$
$2x + y - 3 = 0$
General form has everything on one side equal to zero, with integer coefficients.

General form is $ax + by + c = 0$. To read the gradient, rearrange to $y = mx + c$. For $3x - 4y + 8 = 0$: $4y = 3x + 8$, so $y = \tfrac34 x + 2$ and $m = \tfrac34$.

Distance and midpoint

Draw the segment from $A$ to $B$ and make a right triangle with a horizontal and a vertical side. The sides are $x_2 - x_1$ and $y_2 - y_1$, so Pythagoras gives the length. The midpoint is just the average of the coordinates.

Distance and midpoint
$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \qquad M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)$$
Example 2●

For $A(-2, 1)$ and $B(4, 9)$, find the length $AB$ and the midpoint of $AB$.

$d = \sqrt{6^2 + 8^2} = \sqrt{100} = 10$
The horizontal change is 6 and the vertical change is 8.
$M = \left(\dfrac{-2 + 4}{2}, \dfrac{1 + 9}{2}\right) = (1, 5)$
Average the x-values and average the y-values.

Parallel and perpendicular lines

For the perpendicular rule, rotate a line with gradient $\tfrac{2}{3}$ by $90^\circ$. The rise of $2$ becomes a run, and the run of $3$ becomes a fall. The new gradient is $-\tfrac32$, and $\tfrac23 \times -\tfrac32 = -1$.

Example 3●●

Find the equation of the line through $(4, 1)$ perpendicular to $y = 2x - 3$.

$m = -\tfrac12$
Flip the gradient 2 and change its sign.
$y - 1 = -\tfrac12(x - 4)$, so $y = -\tfrac12 x + 3$
Point-gradient form with (4, 1).
$x + 2y - 6 = 0$
Multiply by 2 to clear the fraction for general form.

Your turn

Show that $O(0, 0)$, $A(2, 4)$ and $B(6, 2)$ form a right-angled triangle.

Show the working

$m_{OA} = \dfrac{4 - 0}{2 - 0} = 2$ and $m_{AB} = \dfrac{2 - 4}{6 - 2} = -\dfrac12$. Since $2 \times -\tfrac12 = -1$, $OA$ is perpendicular to $AB$, so the triangle has a right angle at $A$.

Flashcards
Point-gradient form
$y - y_1 = m(x - x_1)$
Distance formula
$\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$
Perpendicular gradients
$m_1 m_2 = -1$
General form
$ax + by + c = 0$
Practice
  1. Find the gradient of the line through $(1, 2)$ and $(4, 11)$.

  2. Find the distance between $(1, 2)$ and $(7, 10)$.

  3. Find the midpoint of $(-3, 4)$ and $(5, -2)$. Enter it as $x, y$.

  4. The gradient of $2x + 3y - 6 = 0$ is:

  5. Find the gradient of a line perpendicular to $y = 4x - 1$, as a decimal.

  6. The line through $(2, -1)$ with gradient $3$ is:

  7. The line through $(1, k)$ and $(3, 8)$ is parallel to $y = 2x + 1$. Find $k$.

  8. The points $A(1, 1)$, $B(4, 7)$ and $C(6, k)$ are collinear. Find $k$.

  9. Challenge: a line passes through $(4, 1)$ and is perpendicular to $y = 2x - 3$. Find its $y$-intercept.

  10. Challenge: the midpoint of $AB$ is $(3, -1)$ and $A = (7, 2)$. Find $B$. Enter it as $x, y$.

Formula sheet