# 5.2 Gradient of a Straight Line in Cartesian Coordinates

5.2 Finding the Gradient of a Straight Line

The gradient, m, of a straight line which passes through (x1, y1) and (x2, y2) is given by,

mPQ  = $\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$

Example 1:

Find the gradient of the straight line joining two points P and Q in the above diagram.

Solution:
P = (x1, y1) = (4, 3), Q = (x2, y2) = (10, 5)

Gradient of the straight line PQ
$\begin{array}{l}=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}\\ =\frac{5-3}{10-4}\\ =\frac{2}{6}=\frac{1}{3}\end{array}$

Example 2:
Calculate the gradient of a straight line which passes through point A (7, -3) and point B (-3, 6).

Solution:
A = (x1, y1) = (7, -3), B = (x2, y2) = (-3, 6)
Gradient of the straight line AB
$\begin{array}{l}=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}\\ =\frac{6-\left(-3\right)}{-3-7}\\ =-\frac{9}{10}\end{array}$