In this section, we will learn how to calculate and interpret the slope between two points. We will also define a linear function using our understanding of slope.
The Slope, \(m\text{,}\) between two points is determined by the change in output divided by the change in input between the two points. For points \((x_1, y_1)\) and \((x_2, y_2)\text{,}\) the slope is given by the formula:
The above equation is showing that the order in which we subtract the y-values and x-values does not matter. However, make sure that if you start with \(y_2\) in the numerator, then you also start with \(x_2\) in the denominator, and similaryly, if you start with \(y_1\) in the numerator, then you also start with \(x_1\) in the denominator.
We first decide which point will be \((x_1, y_1)\) and which point will be \((x_2, y_2)\text{.}\) This choice is up to you, and is the reason behind the order not mattering as shown in DefinitionΒ 2.1.1.
You can find the slope just as we did in example ExampleΒ 2.1.2 by substituting into the formula for slope. However, letβs use the alternative definition for this example. Namely, letβs find the change in \(y\) and the change in \(x\) from the graph.
To do this, pick a point to start with. Iβll choose \((1,1)\text{.}\) Then, to get to \((4,5)\) I must go up 4 units (the change in \(y\)) and right \(3\) units (the change in \(x\)). Note that going up or to the right is positive, while going down or to the left is negative. So, the change in \(y\) is \(4\) and the change in \(x\) is \(3\text{.}\) Therefore, the slope is:
\begin{equation*}
m = \frac{\text{Change in }y}{\text{Change in }x} = \frac{4}{3}
\end{equation*}
Recall that a function is Linear if the slope is constant for each pair of points. If you ever find a pair with a different slope, then it is not linear.