Suppose we have points \(\left( {{x_1},{y_1}} \right)\) and \(\left( {{x_2},{y_2}} \right)\), we can find the slope of the line passing through these points using the following formula:

$$m = {{{y_2} - {y_1}} \over {{x_2} - {x_1}}}$$

but \({x_1} \ne {x_2}\) since a division of zero is not allowed.

- If the slope \(m\) is positive, the line is rising.

- If the slope \(m\) is negative, the line is falling.

- If the slope \(m\) is zero, it is a horizontal line.

- If the slope \(m\) is undefined, it is a vertical line.

**Example 1:** Find the slope of the line through the points \(\left( { - 2,9} \right)\) and \(\left( {2,5} \right)\).

Let \(\left( { - 2,9} \right)\) be the first point while \(\left( {2,5} \right)\) be the second.

$$\eqalign{

& \left( {{x_1},{y_1}} \right) = \left( { - 2,9} \right) \cr

& \left( {{x_2},{y_2}} \right) = \left( {2,5} \right) \cr} $$

That means the values are

$$\eqalign{

{x_1} &= - 2 \cr

{y_1} &= 9 \cr

{x_2} &= 2 \cr

{y_2} &= 5 \cr} $$

We substitute the values in the slope formula and then simplify.

$$\eqalign{

m &= {{{y_2} - {y_1}} \over {{x_2} - {x_1}}} \cr

&= {{5 - 9} \over {2 - \left( { - 2} \right)}} \cr

&= {{5 - 9} \over {2 + 2}} \cr

&= {{ - 4} \over 4} \cr

m &= - 1 \cr} $$

The final answer is \(m=-1\). Since the slope is negative, the line is decreasing from left to right.

**Example 2:** Find the slope of the line through the points \(\left( { -5,-3} \right)\) and \(\left( {4,12} \right)\).

If \(\left( { - 5, - 3} \right)\) is the first point, we have

$$\eqalign{

& {x_1} = - 5 \cr

& {y_1} = - 3 \cr} $$

This forces the second point to be \(\left( {4,12} \right)\). Thus,

$$\eqalign{

{x_2} &= 4 \cr

{y_2} &= 12 \cr} $$

Plug the values into the formula then simplify.

$$\eqalign{

m &= {{{y_2} - {y_1}} \over {{x_2} - {x_1}}} \cr

&= {{12 - \left( { - 3} \right)} \over {4 - \left( { - 5} \right)}} \cr

&= {{12 + 3} \over {4 + 5}} \cr

&= {{15} \over 9} \cr

m &= {5 \over 3} \cr} $$

The final answer is \(m ={\large{ {5 \over 3}}}\). Because the slope is positive, the line is increasing from left to right.