 # Coordinate geometry

The distance between two points

The length of the line joining the points (x1, y1) and (x2, y2) is:

Example:
Find the distance between the points (5, 3) and (1, 4).
Distance = Ö [(1 - 5)² + (4 - 3)²]

= Ö [16 + 1] = Ö17

The midpoint of a line joining two points

The midpoint of the line joining the points (x1, y1) and (x2, y2) is:

[½(x1 + x2), ½(y1 + y2)]

Example:
Find the coordinates of the midpoint of the line joining (1, 2) and (3, 1).
[½(4), ½(3)] = (2, 1.5)

The gradient of a line joining two points
The gradient of the line joining the points (x1, y1) and (x2, y2) is:

y2 - y1
x2 - x1

Example:
Find the gradient of the line joining the points (5, 3) and (1, 4).
Gradient = 4 - 3 = 1 = -0.25
1 - 5  -4

The equation of a line using one point and the gradient
The equation of a line which has gradient m and which passes through the point (x1, y1) is:
y - y1 = m(x - x1)

Example:
Find the equation of the line with gradient 2 passing through (1, 4).

y - 4 = 2(x - 1)
y - 4 = 2x - 2
y = 2x + 2

Since m = y2 - y1
x2 - x1

The equation of a line passing through (x1, y1) and (x2, y2) is therefore:

y - y1 = y2 - y1
x - x1    x2 - x1

Coordinate geometry