# How do you calculate the slope of (0,0) and (2,6)?

Aug 21, 2015

$m = 3$

#### Explanation:

For two points written in the general form

color(blue)((x_1"," y_1))" " and " "color(blue)((x_2"," y_2))

the slope of the line that passes through both of these points is defined as

$\textcolor{b l u e}{\text{slope} = m = \frac{\left({y}_{2} - {y}_{1}\right)}{\left({x}_{2} - {x}_{1}\right)}}$

$\left\{\begin{matrix}{x}_{1} = 0 \\ {y}_{1} = 0\end{matrix}\right. \text{ }$ and $\text{ } \left\{\begin{matrix}{x}_{2} = 2 \\ {y}_{2} = 6\end{matrix}\right.$.

This means that the slope will be equal to

$m = \frac{6 - 0}{2 - 0} = \frac{6}{2} = \textcolor{g r e e n}{3}$

To plot the line, use the formula

$\textcolor{b l u e}{y - {y}_{i} = m \cdot \left(x - {x}_{i}\right)}$

Plug in the coordinates of one of the two points to get

$y - {y}_{1} = m \cdot \left(x - {x}_{1}\right)$

$y - 0 = 3 \cdot \left(x - 0\right)$

$y = 3 x$

graph{3x [-10, 10, -5, 5]}