# How to Calculate Gradient of a straight line joining 2 points

To calculate the gradient of a line two points $(x_1,y_1)$ and $(x_2,y_2)$ are needed. For example, Suppose we are given 2 points (2,4) and (5,10). The first coordinate is the x - coordinate and the second coordinate is the y-coordinate. If one of the points is denoted $(x_1,y_1)$ then the second point is denoted $(x_2,y_2)$ as shown below.

The second step is to apply the gradient formula. The formula for gradient is \begin{align} m&= \frac{y_2-y_1}{x_2-x_1} \text { where m is the gradient} \end{align}
Let us now apply substitution where $x_1=2$ and $y_1 =4$ ; $x_2=5$ and $y_2=10$ \begin{align} m &= \frac{y_2-y_1}{x_2-x_1} \\ &=\frac{10-4}{5-2} \\ &=\frac{6}{3} \\ &= 2 \end{align} Thus our gradient is 2.

### Marked Exercise

Question: Calculate the gradient of the line joining the following points. Enter your solution in the corresponding answer boxes. After answering click mark my work button.
(3,8) and (7,16)

(1,8) and (3,18)