# Coordinate Geometry

The gradient is the slope of a given object in a x and y plane

## Example

Given that a straight line passes through the points A (5, -9) and B (3, 7), Find

(a) The gradient of a straight line passing through A and B.

(b) The equation of the line passing through the points A and B.

(c) The coordinates of a midpoint between A and B.

(d) The distance between points A and B.

Solutions:

(a)

A (5, -9) and B (3, 7)

Gradient = $\frac{\mathrm{Y2 - Y1}}{X2 - X1}$

Y2 = 7, Y1 = -9, X2 = 3, X1 = 5

Gradient = $\frac{\mathrm{7 - \left(-9\right)}}{3 - 5}$

Gradient = $\frac{\mathrm{7 + 9}}{3 - 5}$

Gradient = $\frac{\mathrm{16}}{-2}$

Answer: Gradient/M = $-8$

(b)

Formula for the equation of a straight line

y - Y1 = m(x - X1)

A (5, -9)

X1 = 5, Y1 = -9

replace the values X1 and Y1 in the equation

y - (-9) = -8(x - 5)

y + 9 = -8(x - 5)

y + 9 = -8x + 40

Format the solution in this format y = mx + c

y = -8x + 40 - 9

Answer: y = -8x + 31

(c)

Formula for Midpoint

M.p = $\left(\frac{\mathrm{X1 + X2}}{2},\frac{\mathrm{Y1 + Y2}}{2}\right)$

A (5, -9) and B (3, 7)

Y2 = 7, Y1 = -9, X2 = 3, X1 = 5

M.p = $\left(\frac{\mathrm{5 + 3}}{2},\frac{\mathrm{-9 + 7}}{2}\right)$

M.p = $\left(\frac{8}{2},\frac{\mathrm{-2}}{2}\right)$

Answer: M.p = $\left(4,\mathrm{-1}\right)$

(d)

Formula for distance between points

AB = $\sqrt{\left(X2- X1\right){}^{2}+\left(Y2- Y1\right){}^{2}}$

A (5, -9) and B (3, 7)

Y2 = 7, Y1 = -9, X2 = 3, X1 = 5

AB = $\sqrt{\left(3 - 5\right){}^{2}+\left(7 - \left(-9\right)\right){}^{2}}$

AB = $\sqrt{\left(-2\right){}^{2}+\left(7 + 9\right){}^{2}}$

AB = $\sqrt{\left(-2\right){}^{2}+\left(16\right){}^{2}}$

AB = $\sqrt{4+\mathrm{256}}$

AB = $\sqrt{\mathrm{260}}$

Answer: AB = $\mathrm{16.1}$

## How to find gradient of the straight line

Find the gradient of the line which passes through (-5, 3) and (-4, 1)

Formula:

M = $\frac{\mathrm{Y2 - Y1}}{X2 - X1}$

Given that:

Y2 = 1

Y1 = 3

X2 = -4

X1 = -5

Solution:

M = $\frac{\mathrm{1 - 3}}{-4 - \left(-5\right)}$

M = $\frac{\mathrm{-2}}{-4 + 5}$

M = $\frac{\mathrm{-2}}{1}$

## How to find the Coordinates from a gradient

The gradient of the line joining the points (-2, k) and (k, -14) is 2, Calculate the Coordinate value of k

Formula:

M = $\frac{\mathrm{Y2 - Y1}}{X2 - X1}$

Given that:

Y2 = -14

Y1 = k

X2 = k

X1 = -2

Solution:

2 = $\frac{\mathrm{-14 - k}}{k - \left(-2\right)}$

$\frac{2}{1}=\frac{\mathrm{-14 - k}}{k + 2}$

$2k + 4=\mathrm{-14 - k}$

$2k + k+ 4=\mathrm{-14}$

$2k + k=\mathrm{-14 -4}$

$3k=\mathrm{-18}$

$\frac{3}{k}=\frac{\mathrm{-18}}{3}$

$k=-6$

## How to find the midpoint of Coordinates, its distance and equation

Given that a straight line passes through the points A(5, -9) and B(3, 7).

a) Find its midpoint

b) Find the distance of AB

c) Find the equation of a straight line AB

## Formula for midpoint

M.p = $\left(\frac{\mathrm{X1 + X2}}{2},\frac{\mathrm{Y1 + Y2}}{2}\right)$

## Points to note

From the given Coordinates Points A and B one can derive the following:

X1 = 5

X2 = 3

Y1 = -9

Y2 = 7

M.p = $\left(\frac{\mathrm{5 + 3}}{2},\frac{\mathrm{-9 + 7}}{2}\right)$

M.p = $\left(\frac{8}{2},\frac{\mathrm{-2}}{2}\right)$

M.p = $\left(4,-1\right)$

Answer: Midpoint = $\left(4,-1\right)$

b)

## Formula of the distance between points

AB = $\sqrt{\left(X2- X1\right){}^{2}+\left(Y2- Y1\right){}^{2}}$

AB = $\sqrt{\left(3 - 5\right){}^{2}+\left(7 - \left(-9\right)\right){}^{2}}$

AB = $\sqrt{\left(-2\right){}^{2}+\left(7 + 9\right){}^{2}}$

AB = $\sqrt{\left(-2\right){}^{2}+\left(16\right){}^{2}}$

AB = $\sqrt{4+256}$

AB = $\sqrt{260}$

AB = $16.12$

Answer: distance AB = $16.12$

c)

The equation of a straight line is expressed as y = mx + c , where y is the Coordinate, m is the gradient, x is the Coordinate and c is the constant

## Formula to find the equation of a straight line

y - Y1 = m(x - X1)

## Points to note

To find the equation of a straight line using the formula above one has to get one set of Coordinates X1 and Y1 with a known gradient m. However when the gradient is not given to you, you have to find it thats when the equation can be found.

M = $\frac{\mathrm{Y2 - Y1}}{X2 - X1}$

M = $\frac{\mathrm{7 - \left(-9\right)}}{3 - 5}$

M = $\frac{\mathrm{7 + 9}}{-2}$

M = $\frac{\mathrm{16}}{-2}$

M = -8

### Set of Coordinates picked

B(3, 7)

X1 = 3 , Y1 = 7

y - Y1 = m(x - X1)

y - 7 = -8(x - 3)

y = -8x + 24

y = -8x + 24 + 7

y = -8x + 24 + 7

y = -8x + 31

Answer: Equation = y = -8x + 31

### How to find the equation of a straight line using the straight line equation formula

straight line equation formula

y = mx + c

## Points to note

using the formula above to find the equation of a straight line, the gradient must be found and with the help of a set of Coordinates find the constant c. When that is done add the gradient and constant into the straight line equation hence the equation is found

sets of Coordinates picked are: B(3, 7)

x = 3 , y = 7

y = mx + c

7 = -8(3) + c

7 = -24 + c

7 + 24 = + c

c = 31